X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2FMakefile.am;h=c78e81c801fb48324a30578460b0e21104b1ab3a;hp=60d1189bff65c8197bec43fc9f3364831f1d6c2a;hb=d5e564625f72e1018f56a707b60d47a5ca9fece9;hpb=c8b57198025c414f8d19577e6846021843c2a751 diff --git a/src/Makefile.am b/src/Makefile.am index 60d1189bff..c78e81c801 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,11 +15,7 @@ SUBDIRS = \ lib_LTLIBRARIES = libopenocd.la bin_PROGRAMS = openocd -if ECOSBOARD -MAINFILE = ecosboard.c -else MAINFILE = main.c -endif openocd_SOURCES = $(MAINFILE) openocd_LDADD = libopenocd.la @@ -30,6 +26,10 @@ else openocd_LDADD += -ljim endif +if ULINK +openocd_LDADD += -lm +endif + libopenocd_la_SOURCES = \ hello.c \ openocd.c \ @@ -45,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) @@ -76,22 +77,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 = \ @@ -130,7 +122,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