X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2FMakefile.am;h=3a92fffee3c43bd426a6f22c1001449fef026d7e;hp=77449862dadc8547a91075877080131aaeaa08a4;hb=b48d1f66378fac886d5bc32d7302da48c89d8a75;hpb=d80fca527a6618595a118381a2cd2a569f85889f diff --git a/src/Makefile.am b/src/Makefile.am index 77449862da..3a92fffee3 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 @@ -28,6 +30,10 @@ else openocd_LDADD += -ljim endif +if ULINK +openocd_LDADD += -lm +endif + libopenocd_la_SOURCES = \ hello.c \ openocd.c \ @@ -43,10 +49,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) @@ -74,22 +81,13 @@ endif endif endif -if USBPROG -LIBUSB = -lusb -else -if JLINK -LIBUSB = -lusb -else -if RLINK -LIBUSB = -lusb -else -if VSLLINK -LIBUSB = -lusb -else LIBUSB = +if USE_LIBUSB1 +LIBUSB += -lusb-1.0 endif -endif -endif + +if USE_LIBUSB0 +LIBUSB += -lusb endif libopenocd_la_LIBADD = \ @@ -97,9 +95,11 @@ libopenocd_la_LIBADD = \ $(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) @@ -126,7 +126,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