Convert to non-recursive make
[openocd.git] / src / jtag / Makefile.am
index 4a0f5d2..50ee263 100644 (file)
@@ -1,93 +1,72 @@
+noinst_LTLIBRARIES += %D%/libjtag.la
 
-if FTD2XXDIR
-if IS_MINGW
-FTD2XXINC = -I@WITH_FTD2XX@
-else
-FTD2XXINC = -I@WITH_FTD2XX@/
+JTAG_SRCS =
+%C%_libjtag_la_LIBADD =
+
+BUILT_SOURCES += %D%/minidriver_imp.h
+CLEANFILES += %D%/minidriver_imp.h
+
+if MINIDRIVER
+
+if ZY1000
+JTAG_SRCS += %D%/zy1000/zy1000.c
+JTAG_MINIDRIVER_DIR = %D%/zy1000
 endif
-else
-FTD2XXINC =
+if MINIDRIVER_DUMMY
+JTAG_SRCS += %D%/minidummy/minidummy.c %D%/commands.c
+JTAG_MINIDRIVER_DIR = %D%/minidummy
 endif
 
-INCLUDES = -I$(top_srcdir)/src/helper $(FTD2XXINC) $(all_includes) -I$(top_srcdir)/src/target 
-METASOURCES = AUTO
-noinst_LIBRARIES = libjtag.a
+MINIDRIVER_IMP_DIR = %D%/minidriver
 
-if BITBANG
-BITBANGFILES = bitbang.c
-else
-BITBANGFILES =
-endif
+%D%/jtag_minidriver.h: $(JTAG_MINIDRIVER_DIR)/jtag_minidriver.h
+       cp $< $@
 
-if PARPORT
-PARPORTFILES = parport.c
-else
-PARPORTFILES =
-endif
+BUILT_SOURCES += %D%/jtag_minidriver.h
 
-if FT2232_LIBFTDI
-FT2232FILES = ft2232.c
-else
-if FT2232_FTD2XX
-FT2232FILES = ft2232.c
-else
-FT2232FILES =
-endif
-endif
+CLEANFILES += %D%/jtag_minidriver.h
 
-if AMTJTAGACCEL
-AMTJTAGACCELFILES = amt_jtagaccel.c
 else
-AMTJTAGACCELFILES =
-endif
 
-if EP93XX
-EP93XXFILES = ep93xx.c
-else
-EP93XXFILES =
-endif
+MINIDRIVER_IMP_DIR = %D%/drivers
+JTAG_SRCS += %D%/commands.c
 
-if ECOSBOARD
-ECOSBOARDFILES = eCosBoard.c
-else
-ECOSBOARDFILES =
+if HLADAPTER
+include %D%/hla/Makefile.am
+%C%_libjtag_la_LIBADD += $(top_builddir)/%D%/hla/libocdhla.la
 endif
 
-if AT91RM9200
-AT91RM9200FILES = at91rm9200.c
-else
-AT91RM9200FILES =
+if AICE
+include %D%/aice/Makefile.am
+%C%_libjtag_la_LIBADD += $(top_builddir)/%D%/aice/libocdaice.la
 endif
 
-if GW16012
-GW16012FILES = gw16012.c
-else
-GW16012FILES =
-endif
+include %D%/drivers/Makefile.am
+%C%_libjtag_la_LIBADD += $(top_builddir)/%D%/drivers/libocdjtagdrivers.la
 
-if BITQ
-BITQFILES = bitq.c
-else
-BITQFILES =
 endif
+# endif // MINIDRIVER
 
-if PRESTO_LIBFTDI
-PRESTOFILES = presto.c
-else
-if PRESTO_FTD2XX
-PRESTOFILES = presto.c
-else
-PRESTOFILES =
-endif
-endif
+%D%/minidriver_imp.h: $(MINIDRIVER_IMP_DIR)/minidriver_imp.h
+       cp $< $@
 
-if USBPROG
-USBPROGFILES = usbprog.c
-else
-USBPROGFILES =
-endif
 
-libjtag_a_SOURCES = jtag.c $(BITBANGFILES) $(PARPORTFILES) $(FT2232FILES) $(AMTJTAGACCELFILES) $(EP93XXFILES) \
-       $(AT91RM9200FILES) $(GW16012FILES) $(BITQFILES) $(PRESTOFILES) $(USBPROGFILES) $(ECOSBOARDFILES)
+%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)
 
-noinst_HEADERS = bitbang.h jtag.h
+STARTUP_TCL_SRCS += %D%/startup.tcl