]> git.sur5r.net Git - openocd/blob - src/helper/Makefile.am
Extend autotools build to create shared library libopenocd with libtool:
[openocd] / src / helper / Makefile.am
1 AM_CPPFLAGS = \
2         -I$(top_srcdir)/src/server \
3         -I$(top_srcdir)/src/target \
4         -DPKGDATADIR=\"$(pkgdatadir)\" \
5         -DPKGLIBDIR=\"$(pkglibdir)\"
6
7 METASOURCES = AUTO
8 noinst_LTLIBRARIES = libhelper.la
9
10 if ECOSBOARD
11 CONFIGFILES = 
12 else
13 CONFIGFILES = options.c jim.c jim-eventloop.c 
14 endif
15
16
17
18 libhelper_la_SOURCES = \
19         binarybuffer.c $(CONFIGFILES) configuration.c \
20         log.c command.c time_support.c \
21         replacements.c fileio.c startup_tcl.c
22
23 if IOUTIL
24 libhelper_la_SOURCES += ioutil.c
25 endif
26
27 libhelper_la_CFLAGS =
28 if IS_MINGW
29 # FD_* macros are sloppy with their signs on MinGW32 platform
30 libhelper_la_CFLAGS += -Wno-sign-compare
31 endif
32
33 noinst_HEADERS = binarybuffer.h configuration.h types.h log.h command.h \
34         time_support.h replacements.h fileio.h jim.h jim-eventloop.h \
35         startup.tcl bin2char.c
36
37 bin2char$(EXEEXT_FOR_BUILD): bin2char.c
38         ${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} $(srcdir)/bin2char.c -o $@
39
40 # Convert .tcl to cfile
41 startup_tcl.c: startup.tcl bin2char$(EXEEXT_FOR_BUILD)
42         ./bin2char$(EXEEXT_FOR_BUILD) startup_tcl < $(srcdir)/startup.tcl > $@
43
44 # add startup_tcl.c to make clean list
45 CLEANFILES = startup_tcl.c bin2char$(EXEEXT_FOR_BUILD)
46
47 MAINTAINERCLEANFILES = Makefile.in