command: fix leak when executing commands
[openocd/ntfreak.git] / src / helper / Makefile.am
blob25585a4896468309717118949694c1ac6a06bbbe
1 include $(top_srcdir)/common.mk
3 METASOURCES = AUTO
4 noinst_LTLIBRARIES = libhelper.la
6 if ECOSBOARD
7 CONFIGFILES = time_support_ecos.c
8 else
9 CONFIGFILES = options.c time_support_common.c
10 endif
14 libhelper_la_SOURCES = \
15         binarybuffer.c \
16         $(CONFIGFILES) \
17         configuration.c \
18         log.c \
19         command.c \
20         time_support.c \
21         replacements.c \
22         fileio.c \
23         util.c
25 if IOUTIL
26 libhelper_la_SOURCES += ioutil.c
27 else
28 libhelper_la_SOURCES += ioutil_stubs.c
29 endif
31 libhelper_la_CFLAGS =
32 if IS_MINGW
33 # FD_* macros are sloppy with their signs on MinGW32 platform
34 libhelper_la_CFLAGS += -Wno-sign-compare
35 endif
37 noinst_HEADERS = \
38         binarybuffer.h \
39         configuration.h \
40         ioutil.h \
41         util.h \
42         types.h \
43         log.h \
44         command.h \
45         time_support.h \
46         replacements.h \
47         fileio.h \
48         system.h \
49         bin2char.c
51 EXTRA_DIST = startup.tcl
53 BIN2C = bin2char$(EXEEXT_FOR_BUILD)
55 BUILT_SOURCES = $(BIN2C)
57 $(BIN2C): bin2char.c
58         ${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} $(srcdir)/bin2char.c -o $@
60 CLEANFILES = bin2char$(EXEEXT_FOR_BUILD)
62 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in