Convert to non-recursive make
[openocd.git] / src / jtag / Makefile.am
index 3163b24..50ee263 100644 (file)
-AM_CPPFLAGS = \
-       -I$(top_srcdir)/src/helper \
-       -I$(top_srcdir)/src/target
+noinst_LTLIBRARIES += %D%/libjtag.la
 
-METASOURCES = AUTO
-noinst_LTLIBRARIES = libjtag.la
+JTAG_SRCS =
+%C%_libjtag_la_LIBADD =
 
-if BITBANG
-BITBANGFILES = bitbang.c
-else
-BITBANGFILES =
-endif
-
-if PARPORT
-PARPORTFILES = parport.c
-else
-PARPORTFILES =
-endif
+BUILT_SOURCES += %D%/minidriver_imp.h
+CLEANFILES += %D%/minidriver_imp.h
 
-if DUMMY
-DUMMYFILES = dummy.c
-else
-DUMMYFILES =
-endif
+if MINIDRIVER
 
-if FT2232_LIBFTDI
-FT2232FILES = ft2232.c
-else
-if FT2232_FTD2XX
-FT2232FILES = ft2232.c
-else
-FT2232FILES =
+if ZY1000
+JTAG_SRCS += %D%/zy1000/zy1000.c
+JTAG_MINIDRIVER_DIR = %D%/zy1000
 endif
+if MINIDRIVER_DUMMY
+JTAG_SRCS += %D%/minidummy/minidummy.c %D%/commands.c
+JTAG_MINIDRIVER_DIR = %D%/minidummy
 endif
 
-if AMTJTAGACCEL
-AMTJTAGACCELFILES = amt_jtagaccel.c
-else
-AMTJTAGACCELFILES =
-endif
+MINIDRIVER_IMP_DIR = %D%/minidriver
 
-if EP93XX
-EP93XXFILES = ep93xx.c
-else
-EP93XXFILES =
-endif
+%D%/jtag_minidriver.h: $(JTAG_MINIDRIVER_DIR)/jtag_minidriver.h
+       cp $< $@
 
-if ECOSBOARD
-ECOSBOARDFILES = zy1000.c
-else
-ECOSBOARDFILES =
-endif
+BUILT_SOURCES += %D%/jtag_minidriver.h
 
-if AT91RM9200
-AT91RM9200FILES = at91rm9200.c
-else
-AT91RM9200FILES =
-endif
+CLEANFILES += %D%/jtag_minidriver.h
 
-if GW16012
-GW16012FILES = gw16012.c
 else
-GW16012FILES =
-endif
 
-if BITQ
-BITQFILES = bitq.c
-else
-BITQFILES =
-endif
+MINIDRIVER_IMP_DIR = %D%/drivers
+JTAG_SRCS += %D%/commands.c
 
-if PRESTO_LIBFTDI
-PRESTOFILES = presto.c
-else
-if PRESTO_FTD2XX
-PRESTOFILES = presto.c
-else
-PRESTOFILES =
-endif
+if HLADAPTER
+include %D%/hla/Makefile.am
+%C%_libjtag_la_LIBADD += $(top_builddir)/%D%/hla/libocdhla.la
 endif
 
-if USBPROG
-USBPROGFILES = usbprog.c
-else
-USBPROGFILES =
+if AICE
+include %D%/aice/Makefile.am
+%C%_libjtag_la_LIBADD += $(top_builddir)/%D%/aice/libocdaice.la
 endif
 
-if JLINK
-JLINKFILES = jlink.c
-else
-JLINKFILES =
-endif
+include %D%/drivers/Makefile.am
+%C%_libjtag_la_LIBADD += $(top_builddir)/%D%/drivers/libocdjtagdrivers.la
 
-if RLINK
-RLINKFILES = rlink/rlink.c rlink/rlink_speed_table.c
-else
-RLINKFILES =
 endif
+# endif // MINIDRIVER
 
-if VSLLINK
-VSLLINKFILES = vsllink.c
-else
-VSLLINKFILES =
-endif
+%D%/minidriver_imp.h: $(MINIDRIVER_IMP_DIR)/minidriver_imp.h
+       cp $< $@
 
-if ARMJTAGEW
-ARMJTAGEWFILES = arm-jtag-ew.c
-else
-ARMJTAGEWFILES =
-endif
 
-libjtag_la_SOURCES = jtag.c \
-       $(BITBANGFILES) \
-       $(PARPORTFILES) \
-       $(DUMMYFILES) \
-       $(FT2232FILES) \
-       $(AMTJTAGACCELFILES) \
-       $(EP93XXFILES) \
-       $(AT91RM9200FILES) \
-       $(GW16012FILES) \
-       $(BITQFILES) \
-       $(PRESTOFILES) \
-       $(USBPROGFILES) \
-       $(ECOSBOARDFILES) \
-       $(JLINKFILES) \
-       $(RLINKFILES) \
-       $(VSLLINKFILES) \
-       $(ARMJTAGEWFILES)
-
-noinst_HEADERS = \
-       bitbang.h \
-       jtag.h \
-       bitq.h \
-       rlink/dtc_cmd.h \
-       rlink/ep1_cmd.h \
-       rlink/rlink.h \
-       rlink/st7.h
-
-MAINTAINERCLEANFILES = Makefile.in
+%C%_libjtag_la_SOURCES = \
+       %D%/adapter.c \
+       %D%/core.c \
+       %D%/interface.c \
+       %D%/interfaces.c \
+       %D%/tcl.c \
+       %D%/commands.h \
+       %D%/driver.h \
+       %D%/interface.h \
+       %D%/interfaces.h \
+       %D%/minidriver.h \
+       %D%/jtag.h \
+       %D%/minidriver/minidriver_imp.h \
+       %D%/minidummy/jtag_minidriver.h \
+       %D%/swd.h \
+       %D%/tcl.h \
+       $(JTAG_SRCS)
+
+STARTUP_TCL_SRCS += %D%/startup.tcl