2016-11-06 13:19:26 -06:00
|
|
|
noinst_LTLIBRARIES += %D%/libopenocd.la
|
|
|
|
bin_PROGRAMS += %D%/openocd
|
2010-11-12 05:41:55 -06:00
|
|
|
|
2016-11-06 13:19:26 -06:00
|
|
|
%C%_openocd_SOURCES = \
|
|
|
|
%D%/main.c
|
2009-05-10 17:03:57 -05:00
|
|
|
|
2016-11-06 13:19:26 -06:00
|
|
|
%C%_libopenocd_la_SOURCES = \
|
|
|
|
%D%/hello.c %D%/hello.h \
|
|
|
|
%D%/openocd.c %D%/openocd.h
|
2008-03-11 16:32:03 -05:00
|
|
|
|
2016-11-06 13:19:26 -06:00
|
|
|
%C%_openocd_LDADD = %D%/libopenocd.la
|
2008-03-11 16:32:03 -05:00
|
|
|
|
2016-11-06 13:19:26 -06:00
|
|
|
%C%_openocd_LDADD += $(MINGWLDADD)
|
2010-11-17 04:26:21 -06:00
|
|
|
|
|
|
|
if INTERNAL_JIMTCL
|
2016-11-06 13:19:26 -06:00
|
|
|
%C%_openocd_LDADD += $(top_builddir)/jimtcl/libjim.a
|
2010-11-17 04:26:21 -06:00
|
|
|
else
|
2016-11-06 13:19:26 -06:00
|
|
|
%C%_openocd_LDADD += -ljim
|
2010-11-17 04:26:21 -06:00
|
|
|
endif
|
2009-05-10 17:03:57 -05:00
|
|
|
|
2016-11-06 13:19:26 -06:00
|
|
|
%C%_libopenocd_la_CPPFLAGS =
|
2009-01-19 22:03:31 -06:00
|
|
|
|
2009-10-07 00:43:05 -05: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-19 22:03:31 -06:00
|
|
|
if RELEASE
|
2016-11-06 13:19:26 -06:00
|
|
|
%C%_libopenocd_la_CPPFLAGS += -DRELSTR=\"\"
|
|
|
|
%C%_libopenocd_la_CPPFLAGS += -DGITVERSION=\"\"
|
2009-01-19 22:03:31 -06:00
|
|
|
else
|
2016-11-06 13:19:26 -06: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 16:44:39 -05:00
|
|
|
endif
|
2009-01-19 22:03:31 -06:00
|
|
|
|
|
|
|
# add default CPPFLAGS
|
2016-11-06 13:19:26 -06:00
|
|
|
%C%_libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
|
2007-12-10 10:55:14 -06:00
|
|
|
|
2006-06-02 05:36:31 -05:00
|
|
|
# the library search path.
|
2016-11-06 13:19:26 -06:00
|
|
|
%C%_libopenocd_la_LDFLAGS = $(all_libraries)
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2006-07-17 09:13:27 -05:00
|
|
|
if IS_MINGW
|
2009-10-19 19:48:19 -05:00
|
|
|
MINGWLDADD = -lws2_32
|
2006-07-17 09:13:27 -05:00
|
|
|
else
|
|
|
|
MINGWLDADD =
|
|
|
|
endif
|
|
|
|
|
2016-11-06 13:19:26 -06: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 08:23:31 -05:00
|
|
|
%D%/helper/libhelper.la \
|
|
|
|
%D%/rtt/librtt.la
|
2009-11-17 10:30:51 -06:00
|
|
|
|
2016-11-06 13:19:26 -06:00
|
|
|
BIN2C = $(srcdir)/%D%/helper/bin2char.sh
|
2009-11-17 10:30:51 -06:00
|
|
|
|
2016-11-06 13:19:26 -06:00
|
|
|
STARTUP_TCL_SRCS =
|
|
|
|
EXTRA_DIST += $(STARTUP_TCL_SRCS)
|
2009-11-17 10:30:51 -06:00
|
|
|
|
2016-11-06 13:19:26 -06:00
|
|
|
BUILT_SOURCES += %D%/startup_tcl.inc
|
2009-11-17 10:30:51 -06:00
|
|
|
|
2014-06-18 16:10:45 -05:00
|
|
|
# Convert .tcl to c-array
|
2016-11-06 13:19:26 -06:00
|
|
|
%D%/startup_tcl.inc: $(STARTUP_TCL_SRCS)
|
2021-03-15 07:53:17 -05:00
|
|
|
mkdir -p %D%
|
2016-11-06 13:19:26 -06:00
|
|
|
cat $^ | $(BIN2C) > $@ || { rm -f $@; false; }
|
2009-11-17 10:30:51 -06:00
|
|
|
|
2014-06-18 16:10:45 -05:00
|
|
|
# add generated files to make clean list
|
2016-11-06 13:19:26 -06:00
|
|
|
CLEANFILES += %D%/startup_tcl.inc
|
2009-11-17 10:30:51 -06:00
|
|
|
|
2011-06-17 06:22:37 -05:00
|
|
|
# we do not want generated file in the dist
|
2016-11-06 13:19:26 -06: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 08:23:31 -05:00
|
|
|
include %D%/rtt/Makefile.am
|