2016-11-06 19:19:26 +00:00
|
|
|
noinst_LTLIBRARIES += %D%/libopenocd.la
|
|
|
|
bin_PROGRAMS += %D%/openocd
|
2010-11-12 11:41:55 +00:00
|
|
|
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_openocd_SOURCES = \
|
|
|
|
%D%/main.c
|
2009-05-10 22:03:57 +00:00
|
|
|
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_libopenocd_la_SOURCES = \
|
|
|
|
%D%/hello.c %D%/hello.h \
|
|
|
|
%D%/openocd.c %D%/openocd.h
|
2008-03-11 21:32:03 +00:00
|
|
|
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_openocd_LDADD = %D%/libopenocd.la
|
2008-03-11 21:32:03 +00:00
|
|
|
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_openocd_LDADD += $(MINGWLDADD)
|
2010-11-17 10:26:21 +00:00
|
|
|
|
|
|
|
if INTERNAL_JIMTCL
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_openocd_LDADD += $(top_builddir)/jimtcl/libjim.a
|
2010-11-17 10:26:21 +00:00
|
|
|
else
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_openocd_LDADD += -ljim
|
2010-11-17 10:26:21 +00:00
|
|
|
endif
|
2009-05-10 22:03:57 +00:00
|
|
|
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_libopenocd_la_CPPFLAGS =
|
2009-01-20 04:03:31 +00:00
|
|
|
|
2009-10-07 05:43:05 +00:00
|
|
|
# banner output includes RELSTR appended to $VERSION from the configure script
|
|
|
|
# guess-rev.sh returns either a repository version ID or "-snapshot"
|
2009-01-20 04:03:31 +00:00
|
|
|
if RELEASE
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"\"
|
|
|
|
%C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"\"
|
2009-01-20 04:03:31 +00:00
|
|
|
else
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
|
|
|
|
%C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\"
|
|
|
|
%C%_libopenocd_la_CPPFLAGS += -DPKGBLDDATE=\"`date +%F-%R`\"
|
2011-07-09 21:44:39 +00:00
|
|
|
endif
|
2009-01-20 04:03:31 +00:00
|
|
|
|
|
|
|
# add default CPPFLAGS
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
|
2007-12-10 16:55:14 +00:00
|
|
|
|
2006-06-02 10:36:31 +00:00
|
|
|
# the library search path.
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_libopenocd_la_LDFLAGS = $(all_libraries)
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2006-07-17 14:13:27 +00:00
|
|
|
if IS_MINGW
|
2009-10-20 00:48:19 +00:00
|
|
|
MINGWLDADD = -lws2_32
|
2006-07-17 14:13:27 +00:00
|
|
|
else
|
|
|
|
MINGWLDADD =
|
|
|
|
endif
|
|
|
|
|
2016-11-06 19:19:26 +00:00
|
|
|
%C%_libopenocd_la_LIBADD = \
|
|
|
|
%D%/xsvf/libxsvf.la \
|
|
|
|
%D%/svf/libsvf.la \
|
|
|
|
%D%/pld/libpld.la \
|
|
|
|
%D%/jtag/libjtag.la \
|
|
|
|
%D%/transport/libtransport.la \
|
|
|
|
%D%/flash/libflash.la \
|
|
|
|
%D%/target/libtarget.la \
|
|
|
|
%D%/server/libserver.la \
|
|
|
|
%D%/rtos/librtos.la \
|
2020-09-17 13:23:31 +00:00
|
|
|
%D%/helper/libhelper.la \
|
|
|
|
%D%/rtt/librtt.la
|
2009-11-17 16:30:51 +00:00
|
|
|
|
2016-11-06 19:19:26 +00:00
|
|
|
BIN2C = $(srcdir)/%D%/helper/bin2char.sh
|
2009-11-17 16:30:51 +00:00
|
|
|
|
2016-11-06 19:19:26 +00:00
|
|
|
STARTUP_TCL_SRCS =
|
|
|
|
EXTRA_DIST += $(STARTUP_TCL_SRCS)
|
2009-11-17 16:30:51 +00:00
|
|
|
|
2016-11-06 19:19:26 +00:00
|
|
|
BUILT_SOURCES += %D%/startup_tcl.inc
|
2009-11-17 16:30:51 +00:00
|
|
|
|
2014-06-18 21:10:45 +00:00
|
|
|
# Convert .tcl to c-array
|
2016-11-06 19:19:26 +00:00
|
|
|
%D%/startup_tcl.inc: $(STARTUP_TCL_SRCS)
|
2021-03-15 12:53:17 +00:00
|
|
|
mkdir -p %D%
|
2016-11-06 19:19:26 +00:00
|
|
|
cat $^ | $(BIN2C) > $@ || { rm -f $@; false; }
|
2009-11-17 16:30:51 +00:00
|
|
|
|
2014-06-18 21:10:45 +00:00
|
|
|
# add generated files to make clean list
|
2016-11-06 19:19:26 +00:00
|
|
|
CLEANFILES += %D%/startup_tcl.inc
|
2009-11-17 16:30:51 +00:00
|
|
|
|
2011-06-17 11:22:37 +00:00
|
|
|
# we do not want generated file in the dist
|
2016-11-06 19:19:26 +00:00
|
|
|
#dist-hook:
|
|
|
|
# rm -f $(distdir)/%D%/startup_tcl.inc
|
|
|
|
|
|
|
|
include %D%/helper/Makefile.am
|
|
|
|
include %D%/jtag/Makefile.am
|
|
|
|
include %D%/transport/Makefile.am
|
|
|
|
include %D%/xsvf/Makefile.am
|
|
|
|
include %D%/svf/Makefile.am
|
|
|
|
include %D%/target/Makefile.am
|
|
|
|
include %D%/rtos/Makefile.am
|
|
|
|
include %D%/server/Makefile.am
|
|
|
|
include %D%/flash/Makefile.am
|
|
|
|
include %D%/pld/Makefile.am
|
2020-09-17 13:23:31 +00:00
|
|
|
include %D%/rtt/Makefile.am
|