1 # SPDX-License-Identifier: GPL-2.0-or-later
3 noinst_LTLIBRARIES += %D%/libopenocd.la
4 bin_PROGRAMS += %D%/openocd
6 %C%_openocd_SOURCES = \
9 %C%_libopenocd_la_SOURCES = \
10 %D%/hello.c %D%/hello.h \
11 %D%/openocd.c %D%/openocd.h
13 %C%_openocd_LDADD = %D%/libopenocd.la
15 %C%_openocd_LDADD += $(MINGWLDADD)
18 %C%_openocd_LDADD += $(top_builddir)/jimtcl/libjim.a
20 %C%_openocd_LDADD += -ljim
23 %C%_libopenocd_la_CPPFLAGS =
25 # banner output includes RELSTR appended to $VERSION from the configure script
26 # guess-rev.sh returns either a repository version ID or "-snapshot"
28 %C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"\"
29 %C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"\"
31 %C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
32 %C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\"
33 %C%_libopenocd_la_CPPFLAGS += -DPKGBLDDATE=\"`date +%F-%R`\"
36 # add default CPPFLAGS
37 %C%_libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
39 # the library search path.
40 %C%_libopenocd_la_LDFLAGS = $(all_libraries)
48 %C%_libopenocd_la_LIBADD = \
53 %D%/transport/libtransport.la \
54 %D%/flash/libflash.la \
55 %D%/target/libtarget.la \
56 %D%/server/libserver.la \
58 %D%/helper/libhelper.la \
61 BIN2C = $(srcdir)/%D%/helper/bin2char.sh
64 EXTRA_DIST += $(STARTUP_TCL_SRCS)
66 BUILT_SOURCES += %D%/startup_tcl.inc
68 # Convert .tcl to c-array
69 %D%/startup_tcl.inc: $(STARTUP_TCL_SRCS)
71 cat $^ | $(BIN2C) > $@ || { rm -f $@; false; }
73 # add generated files to make clean list
74 CLEANFILES += %D%/startup_tcl.inc
76 # we do not want generated file in the dist
78 # rm -f $(distdir)/%D%/startup_tcl.inc
80 include %D%/helper/Makefile.am
81 include %D%/jtag/Makefile.am
82 include %D%/transport/Makefile.am
83 include %D%/xsvf/Makefile.am
84 include %D%/svf/Makefile.am
85 include %D%/target/Makefile.am
86 include %D%/rtos/Makefile.am
87 include %D%/server/Makefile.am
88 include %D%/flash/Makefile.am
89 include %D%/pld/Makefile.am
90 include %D%/rtt/Makefile.am