Convert to non-recursive make
[openocd.git] / src / jtag / drivers / Makefile.am
index f3d5ab0..c26d997 100644 (file)
-include $(top_srcdir)/common.mk
+noinst_LTLIBRARIES += %D%/libocdjtagdrivers.la
+%C%_libocdjtagdrivers_la_LIBADD =
 
-noinst_LTLIBRARIES = libocdjtagdrivers.la
+%C%_libocdjtagdrivers_la_SOURCES = \
+       $(DRIVERFILES) \
+       $(DRIVERHEADERS)
 
-libocdjtagdrivers_la_SOURCES = \
-       $(DRIVERFILES)
+%C%_libocdjtagdrivers_la_CPPFLAGS = $(AM_CPPFLAGS)
+
+ULINK_FIRMWARE = %D%/OpenULINK
+
+EXTRA_DIST += $(ULINK_FIRMWARE) \
+       %D%/usb_blaster/README.CheapClone \
+       %D%/Makefile.rlink \
+       %D%/rlink_call.m4 \
+       %D%/rlink_init.m4
 
 DRIVERFILES =
 
 # Standard Driver: common files
-DRIVERFILES += driver.c
+DRIVERFILES += %D%/driver.c
+
+if USE_LIBUSB1
+DRIVERFILES += %D%/libusb1_common.c
+%C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBUSB1_CFLAGS)
+%C%_libocdjtagdrivers_la_LIBADD += $(LIBUSB1_LIBS)
+endif
+
+if USE_LIBUSB0
+DRIVERFILES += %D%/usb_common.c
+%C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBUSB0_CFLAGS)
+%C%_libocdjtagdrivers_la_LIBADD += $(LIBUSB0_LIBS)
+if !USE_LIBUSB1
+DRIVERFILES += %D%/libusb0_common.c
+endif
+endif
+
+if USE_LIBFTDI
+%C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBFTDI_CFLAGS)
+%C%_libocdjtagdrivers_la_LIBADD += $(LIBFTDI_LIBS)
+endif
+
+if USE_HIDAPI
+%C%_libocdjtagdrivers_la_CPPFLAGS += $(HIDAPI_CFLAGS)
+%C%_libocdjtagdrivers_la_LIBADD += $(HIDAPI_LIBS)
+endif
+
+if USE_LIBJAYLINK
+%C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBJAYLINK_CFLAGS)
+%C%_libocdjtagdrivers_la_LIBADD += $(LIBJAYLINK_LIBS)
+endif
+
+if JLINK
+DRIVERFILES += %D%/jlink.c
+if INTERNAL_LIBJAYLINK
+SUBDIRS += %D%/libjaylink
+DIST_SUBDIRS += %D%/libjaylink
 
-if USB
-DRIVERFILES += usb_common.c
+%C%_libocdjtagdrivers_la_LIBADD += %D%/libjaylink/libjaylink/libjaylink.la
+%C%_libocdjtagdrivers_la_CPPFLAGS += -I$(builddir)/%D%/libjaylink/libjaylink -I$(srcdir)/%D%/libjaylink
+endif
 endif
 
 if BITBANG
-DRIVERFILES += bitbang.c
+DRIVERFILES += %D%/bitbang.c
 endif
 if PARPORT
-DRIVERFILES += parport.c
+DRIVERFILES += %D%/parport.c
 endif
 if DUMMY
-DRIVERFILES += dummy.c
+DRIVERFILES += %D%/dummy.c
+endif
+if FTDI
+DRIVERFILES += %D%/ftdi.c %D%/mpsse.c
 endif
-if FT2232_DRIVER
-DRIVERFILES += ft2232.c
+if JTAG_VPI
+DRIVERFILES += %D%/jtag_vpi.c
 endif
 if USB_BLASTER_DRIVER
-DRIVERFILES += usb_blaster.c
+%C%_libocdjtagdrivers_la_LIBADD += %D%/usb_blaster/libocdusbblaster.la
 endif
 if AMTJTAGACCEL
-DRIVERFILES += amt_jtagaccel.c
+DRIVERFILES += %D%/amt_jtagaccel.c
 endif
 if EP93XX
-DRIVERFILES += ep93xx.c
+DRIVERFILES += %D%/ep93xx.c
 endif
 if AT91RM9200
-DRIVERFILES += at91rm9200.c
+DRIVERFILES += %D%/at91rm9200.c
 endif
 if GW16012
-DRIVERFILES += gw16012.c
+DRIVERFILES += %D%/gw16012.c
 endif
 if BITQ
-DRIVERFILES += bitq.c
+DRIVERFILES += %D%/bitq.c
 endif
-if PRESTO_DRIVER
-DRIVERFILES += presto.c
+if PRESTO
+DRIVERFILES += %D%/presto.c
 endif
 if USBPROG
-DRIVERFILES += usbprog.c
-endif
-if JLINK
-DRIVERFILES += jlink.c
+DRIVERFILES += %D%/usbprog.c
 endif
 if RLINK
-DRIVERFILES += rlink.c rlink_speed_table.c
+DRIVERFILES += %D%/rlink.c %D%/rlink_speed_table.c
+endif
+if ULINK
+DRIVERFILES += %D%/ulink.c
+ulinkdir = $(pkgdatadir)/OpenULINK
+dist_ulink_DATA = $(ULINK_FIRMWARE)/ulink_firmware.hex
+%C%_libocdjtagdrivers_la_LIBADD += -lm
 endif
 if VSLLINK
-DRIVERFILES += vsllink.c
+DRIVERFILES += %D%/versaloon/usbtoxxx/usbtogpio.c
+DRIVERFILES += %D%/versaloon/usbtoxxx/usbtojtagraw.c
+DRIVERFILES += %D%/versaloon/usbtoxxx/usbtoswd.c
+DRIVERFILES += %D%/versaloon/usbtoxxx/usbtopwr.c
+DRIVERFILES += %D%/versaloon/usbtoxxx/usbtoxxx.c
+DRIVERFILES += %D%/versaloon/versaloon.c
+DRIVERFILES += %D%/vsllink.c
 endif
 if ARMJTAGEW
-DRIVERFILES += arm-jtag-ew.c
+DRIVERFILES += %D%/arm-jtag-ew.c
 endif
 if BUSPIRATE
-DRIVERFILES += buspirate.c
+DRIVERFILES += %D%/buspirate.c
+endif
+if REMOTE_BITBANG
+DRIVERFILES += %D%/remote_bitbang.c
+endif
+if HLADAPTER
+DRIVERFILES += %D%/stlink_usb.c
+DRIVERFILES += %D%/ti_icdi_usb.c
+endif
+if OSBDM
+DRIVERFILES += %D%/osbdm.c
+endif
+if OPENDOUS
+DRIVERFILES += %D%/opendous.c
+endif
+if SYSFSGPIO
+DRIVERFILES += %D%/sysfsgpio.c
+endif
+if BCM2835GPIO
+DRIVERFILES += %D%/bcm2835gpio.c
+endif
+
+if OPENJTAG
+DRIVERFILES += %D%/openjtag.c
+endif
+
+if CMSIS_DAP
+DRIVERFILES += %D%/cmsis_dap_usb.c
 endif
 
-noinst_HEADERS = \
-       bitbang.h \
-       bitq.h \
-       minidriver_imp.h \
-       rlink.h \
-       rlink_dtc_cmd.h \
-       rlink_ep1_cmd.h \
-       rlink_st7.h \
-       usb_common.h
+DRIVERHEADERS = \
+       %D%/bitbang.h \
+       %D%/bitq.h \
+       %D%/libusb0_common.h \
+       %D%/libusb1_common.h \
+       %D%/libusb_common.h \
+       %D%/minidriver_imp.h \
+       %D%/mpsse.h \
+       %D%/rlink.h \
+       %D%/rlink_dtc_cmd.h \
+       %D%/rlink_ep1_cmd.h \
+       %D%/rlink_st7.h \
+       %D%/usb_common.h \
+       %D%/versaloon/usbtoxxx/usbtoxxx.h \
+       %D%/versaloon/usbtoxxx/usbtoxxx_internal.h \
+       %D%/versaloon/versaloon.h \
+       %D%/versaloon/versaloon_include.h \
+       %D%/versaloon/versaloon_internal.h
 
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
+include %D%/usb_blaster/Makefile.am