X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2FMakefile.am;h=1be24ea23ab2387a6d0de14237ec7b1fa32c1005;hb=c2c19c50186f6686c072f65ade8984771987305f;hp=c2d37c1010601cb18e300c0e365270e03a3f964d;hpb=838cd58e24a18102b8a140df9fa993fe65706828;p=openocd.git diff --git a/src/Makefile.am b/src/Makefile.am index c2d37c1010..1be24ea23a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,11 +4,13 @@ SUBDIRS = \ jtag \ helper \ target \ + transport \ flash \ svf \ xsvf \ pld \ - server + server \ + rtos lib_LTLIBRARIES = libopenocd.la bin_PROGRAMS = openocd @@ -20,7 +22,13 @@ MAINFILE = main.c endif openocd_SOURCES = $(MAINFILE) -openocd_LDADD = libopenocd.la -ljim +openocd_LDADD = libopenocd.la + +if INTERNAL_JIMTCL +openocd_LDADD += $(top_builddir)/jimtcl/libjim.a +else +openocd_LDADD += -ljim +endif libopenocd_la_SOURCES = \ hello.c \ @@ -37,10 +45,11 @@ libopenocd_la_CPPFLAGS = -DPKGBLDDATE=\"`date +%F-%R`\" # guess-rev.sh returns either a repository version ID or "-snapshot" if RELEASE libopenocd_la_CPPFLAGS += -DRELSTR=\"\" +libopenocd_la_CPPFLAGS += -DGITVERSION=\"\" else libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\" -endif libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\" +endif # add default CPPFLAGS libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS) @@ -77,6 +86,9 @@ else if RLINK LIBUSB = -lusb else +if ULINK +LIBUSB = -lusb +else if VSLLINK LIBUSB = -lusb else @@ -85,15 +97,18 @@ endif endif endif endif +endif libopenocd_la_LIBADD = \ $(top_builddir)/src/xsvf/libxsvf.la \ $(top_builddir)/src/svf/libsvf.la \ $(top_builddir)/src/pld/libpld.la \ $(top_builddir)/src/jtag/libjtag.la \ + $(top_builddir)/src/transport/libtransport.la \ $(top_builddir)/src/flash/libflash.la \ $(top_builddir)/src/target/libtarget.la \ $(top_builddir)/src/server/libserver.la \ + $(top_builddir)/src/rtos/librtos.la \ $(top_builddir)/src/helper/libhelper.la \ $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB) @@ -120,7 +135,10 @@ startup_tcl.c: startup.tcl $(BIN2C) # add startup_tcl.c to make clean list CLEANFILES = startup.tcl startup_tcl.c - +# we do not want generated file in the dist +dist-hook: + rm -f $(distdir)/startup_tcl.c + MAINTAINERCLEANFILES = $(srcdir)/Makefile.in # The "quick" target builds executables & reinstalls the executables