X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2FMakefile.am;h=d630bd623f08390acad076478ed1f75a3131bb7d;hp=60d1189bff65c8197bec43fc9f3364831f1d6c2a;hb=ae3baa9d5a09fa6b3ef23c74ea16f7a10b8a6406;hpb=c8b57198025c414f8d19577e6846021843c2a751 diff --git a/src/Makefile.am b/src/Makefile.am index 60d1189bff..d630bd623f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,14 +12,10 @@ SUBDIRS = \ server \ rtos -lib_LTLIBRARIES = libopenocd.la +noinst_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) @@ -62,38 +63,6 @@ else MINGWLDADD = endif -if FT2232_LIBFTDI -FTDI2232LIB = -lftdi -lusb -else -if USB_BLASTER_LIBFTDI -FTDI2232LIB = -lftdi -lusb -else -if PRESTO_LIBFTDI -FTDI2232LIB = -lftdi -lusb -else -FTDI2232LIB = -endif -endif -endif - -if USBPROG -LIBUSB = -lusb -else -if JLINK -LIBUSB = -lusb -else -if RLINK -LIBUSB = -lusb -else -if VSLLINK -LIBUSB = -lusb -else -LIBUSB = -endif -endif -endif -endif - libopenocd_la_LIBADD = \ $(top_builddir)/src/xsvf/libxsvf.la \ $(top_builddir)/src/svf/libsvf.la \ @@ -105,7 +74,8 @@ libopenocd_la_LIBADD = \ $(top_builddir)/src/server/libserver.la \ $(top_builddir)/src/rtos/librtos.la \ $(top_builddir)/src/helper/libhelper.la \ - $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB) + $(LIBFTDI_LIBS) $(MINGWLDADD) \ + $(HIDAPI_LIBS) $(LIBUSB1_LIBS) $(LIBUSB0_LIBS) STARTUP_TCL_SRCS = \ $(srcdir)/helper/startup.tcl \ @@ -130,6 +100,9 @@ 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