X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2FMakefile.am;h=bad4153a9c9595f191e40bfc2c7ff2b2a5bb86cd;hp=d630bd623f08390acad076478ed1f75a3131bb7d;hb=3a4af874874ad623553ac061a771d428bce1e814;hpb=45f71f108215374bb406fff1a9b6bc27e548866a diff --git a/src/Makefile.am b/src/Makefile.am index d630bd623f..bad4153a9c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,14 +32,13 @@ endif libopenocd_la_SOURCES = \ hello.c \ - openocd.c \ - startup_tcl.c + openocd.c noinst_HEADERS = \ hello.h \ openocd.h -libopenocd_la_CPPFLAGS = -DPKGBLDDATE=\"`date +%F-%R`\" +libopenocd_la_CPPFLAGS = # banner output includes RELSTR appended to $VERSION from the configure script # guess-rev.sh returns either a repository version ID or "-snapshot" @@ -49,6 +48,7 @@ libopenocd_la_CPPFLAGS += -DGITVERSION=\"\" else libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\" libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\" +libopenocd_la_CPPFLAGS += -DPKGBLDDATE=\"`date +%F-%R`\" endif # add default CPPFLAGS @@ -75,7 +75,11 @@ libopenocd_la_LIBADD = \ $(top_builddir)/src/rtos/librtos.la \ $(top_builddir)/src/helper/libhelper.la \ $(LIBFTDI_LIBS) $(MINGWLDADD) \ - $(HIDAPI_LIBS) $(LIBUSB1_LIBS) $(LIBUSB0_LIBS) + $(HIDAPI_LIBS) $(LIBUSB0_LIBS) $(LIBUSB1_LIBS) + +if !INTERNAL_LIBJAYLINK +libopenocd_la_LIBADD += $(libjaylink_LIBS) +endif STARTUP_TCL_SRCS = \ $(srcdir)/helper/startup.tcl \ @@ -86,23 +90,23 @@ STARTUP_TCL_SRCS = \ EXTRA_DIST = $(STARTUP_TCL_SRCS) -BUILT_SOURCES = startup.tcl +BUILT_SOURCES = startup_tcl.inc startup.tcl: $(STARTUP_TCL_SRCS) cat $^ > $@ -BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD) +BIN2C = $(top_srcdir)/src/helper/bin2char.sh -# Convert .tcl to cfile -startup_tcl.c: startup.tcl $(BIN2C) - $(BIN2C) openocd_startup_tcl < $< > $@ || rm -f $@ +# Convert .tcl to c-array +startup_tcl.inc: startup.tcl $(BIN2C) + $(BIN2C) < $< > $@ || { rm -f $@; false; } -# add startup_tcl.c to make clean list -CLEANFILES = startup.tcl startup_tcl.c +# add generated files to make clean list +CLEANFILES = startup.tcl startup_tcl.inc # we do not want generated file in the dist dist-hook: - rm -f $(distdir)/startup_tcl.c + rm -f $(distdir)/startup_tcl.inc MAINTAINERCLEANFILES = $(srcdir)/Makefile.in