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 if HAVE_JIMTCL_PKG_CONFIG
21 %C%_openocd_LDADD += $(JIMTCL_LIBS)
23 %C%_openocd_LDADD += -ljim
27 %C%_libopenocd_la_CPPFLAGS =
29 # banner output includes RELSTR appended to $VERSION from the configure script
30 # guess-rev.sh returns either a repository version ID or "-snapshot"
32 %C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"\"
33 %C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"\"
35 %C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
36 %C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\"
37 %C%_libopenocd_la_CPPFLAGS += -DPKGBLDDATE=\"`date +%F-%R`\"
40 # add default CPPFLAGS
41 %C%_libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
43 # the library search path.
44 %C%_libopenocd_la_LDFLAGS = $(all_libraries)
52 %C%_libopenocd_la_LIBADD = \
57 %D%/transport/libtransport.la \
58 %D%/flash/libflash.la \
59 %D%/target/libtarget.la \
60 %D%/server/libserver.la \
62 %D%/helper/libhelper.la \
65 BIN2C = $(srcdir)/%D%/helper/bin2char.sh
68 EXTRA_DIST += $(STARTUP_TCL_SRCS)
70 BUILT_SOURCES += %D%/startup_tcl.inc
72 # Convert .tcl to c-array
73 %D%/startup_tcl.inc: $(STARTUP_TCL_SRCS)
75 cat $^ | $(BIN2C) > $@ || { rm -f $@; false; }
77 # add generated files to make clean list
78 CLEANFILES += %D%/startup_tcl.inc
80 # we do not want generated file in the dist
82 # rm -f $(distdir)/%D%/startup_tcl.inc
84 include %D%/helper/Makefile.am
85 include %D%/jtag/Makefile.am
86 include %D%/transport/Makefile.am
87 include %D%/xsvf/Makefile.am
88 include %D%/svf/Makefile.am
89 include %D%/target/Makefile.am
90 include %D%/rtos/Makefile.am
91 include %D%/server/Makefile.am
92 include %D%/flash/Makefile.am
93 include %D%/pld/Makefile.am
94 include %D%/rtt/Makefile.am