Fix make maintainer-clean for out-of-tree builds.
[fw/openocd] / src / helper / Makefile.am
1 AM_CPPFLAGS = \
2         -I$(top_srcdir)/src/server \
3         -I$(top_srcdir)/src/target \
4         -DPKGDATADIR=\"$(pkgdatadir)\"
5
6 METASOURCES = AUTO
7 noinst_LTLIBRARIES = libhelper.la
8
9 if ECOSBOARD
10 CONFIGFILES = 
11 else
12 CONFIGFILES = options.c jim.c jim-eventloop.c 
13 endif
14
15
16
17 libhelper_la_SOURCES = \
18         binarybuffer.c \
19         $(CONFIGFILES) \
20         configuration.c \
21         log.c \
22         command.c \
23         time_support.c \
24         replacements.c \
25         fileio.c \
26         startup_tcl.c
27
28 if IOUTIL
29 libhelper_la_SOURCES += ioutil.c
30 endif
31
32 libhelper_la_CFLAGS =
33 if IS_MINGW
34 # FD_* macros are sloppy with their signs on MinGW32 platform
35 libhelper_la_CFLAGS += -Wno-sign-compare
36 endif
37
38 noinst_HEADERS = \
39         binarybuffer.h \
40         configuration.h \
41         types.h \
42         log.h \
43         command.h \
44         time_support.h \
45         replacements.h \
46         fileio.h \
47         jim.h \
48         jim-eventloop.h \
49         system.h \
50         startup.tcl \
51         bin2char.c
52
53 bin2char$(EXEEXT_FOR_BUILD): bin2char.c
54         ${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} $(srcdir)/bin2char.c -o $@
55
56 # Convert .tcl to cfile
57 startup_tcl.c: startup.tcl bin2char$(EXEEXT_FOR_BUILD)
58         ./bin2char$(EXEEXT_FOR_BUILD) startup_tcl < $(srcdir)/startup.tcl > $@
59
60 # add startup_tcl.c to make clean list
61 CLEANFILES = startup_tcl.c bin2char$(EXEEXT_FOR_BUILD)
62
63 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in