AM_CPPFLAGS = \
- -I$(top_srcdir)/src/helper \
- -I$(top_srcdir)/src/target
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src
METASOURCES = AUTO
noinst_LTLIBRARIES = libjtag.la
-if BITBANG
-BITBANGFILES = bitbang.c
-else
-BITBANGFILES =
-endif
+SUBDIRS =
+DRIVERFILES =
+libjtag_la_LIBADD =
-if PARPORT
-PARPORTFILES = parport.c
-else
-PARPORTFILES =
-endif
+CLEANFILES =
-if DUMMY
-DUMMYFILES = dummy.c
-else
-DUMMYFILES =
-endif
+BUILT_SOURCES =
-if FT2232_LIBFTDI
-FT2232FILES = ft2232.c
-else
-if FT2232_FTD2XX
-FT2232FILES = ft2232.c
-else
-FT2232FILES =
-endif
-endif
+BUILT_SOURCES += minidriver_imp.h
+CLEANFILES += minidriver_imp.h
-if AMTJTAGACCEL
-AMTJTAGACCELFILES = amt_jtagaccel.c
-else
-AMTJTAGACCELFILES =
-endif
-
-if EP93XX
-EP93XXFILES = ep93xx.c
-else
-EP93XXFILES =
-endif
+if MINIDRIVER
-if ECOSBOARD
-ECOSBOARDFILES = zy1000/zy1000.c
-AM_CPPFLAGS += -I$(srcdir)/zy1000
-else
-ECOSBOARDFILES =
+if ZY1000
+DRIVERFILES += zy1000/zy1000.c
+JTAG_MINIDRIVER_DIR = $(srcdir)/zy1000
endif
-
if MINIDRIVER_DUMMY
-MINIDUMMYFILES = minidummy/minidummy.c commands.c
-AM_CPPFLAGS += -I$(srcdir)/minidummy
-else
-MINIDUMMYFILES =
+DRIVERFILES += minidummy/minidummy.c commands.c
+JTAG_MINIDRIVER_DIR = $(srcdir)/minidummy
endif
-if MINIDRIVER
-DRIVERFILES = $(MINIDUMMYFILES)
-else
-DRIVERFILES = driver.c commands.c
-endif
+MINIDRIVER_IMP_DIR = $(srcdir)/minidriver
-if AT91RM9200
-AT91RM9200FILES = at91rm9200.c
-else
-AT91RM9200FILES =
-endif
+jtag_minidriver.h: $(JTAG_MINIDRIVER_DIR)/jtag_minidriver.h
+ cp $< $@
-if GW16012
-GW16012FILES = gw16012.c
-else
-GW16012FILES =
-endif
+BUILT_SOURCES += jtag_minidriver.h
-if BITQ
-BITQFILES = bitq.c
-else
-BITQFILES =
-endif
+CLEANFILES += jtag_minidriver.h
-if PRESTO_LIBFTDI
-PRESTOFILES = presto.c
-else
-if PRESTO_FTD2XX
-PRESTOFILES = presto.c
else
-PRESTOFILES =
-endif
-endif
-if USBPROG
-USBPROGFILES = usbprog.c
-else
-USBPROGFILES =
-endif
+MINIDRIVER_IMP_DIR = $(srcdir)/drivers
+DRIVERFILES += commands.c
-if JLINK
-JLINKFILES = jlink.c
-else
-JLINKFILES =
-endif
+SUBDIRS += drivers
+libjtag_la_LIBADD += $(top_builddir)/src/jtag/drivers/libocdjtagdrivers.la
-if RLINK
-RLINKFILES = rlink/rlink.c rlink/rlink_speed_table.c
-else
-RLINKFILES =
endif
-if VSLLINK
-VSLLINKFILES = vsllink.c
-else
-VSLLINKFILES =
-endif
+# endif // MINIDRIVER
+
+minidriver_imp.h: $(MINIDRIVER_IMP_DIR)/minidriver_imp.h
+ cp $< $@
-if ARMJTAGEW
-ARMJTAGEWFILES = arm-jtag-ew.c
-else
-ARMJTAGEWFILES =
-endif
libjtag_la_SOURCES = \
+ adapter.c \
core.c \
- tcl.c \
interface.c \
- $(DRIVERFILES) \
- $(BITBANGFILES) \
- $(PARPORTFILES) \
- $(DUMMYFILES) \
- $(FT2232FILES) \
- $(AMTJTAGACCELFILES) \
- $(EP93XXFILES) \
- $(AT91RM9200FILES) \
- $(GW16012FILES) \
- $(BITQFILES) \
- $(PRESTOFILES) \
- $(USBPROGFILES) \
- $(ECOSBOARDFILES) \
- $(JLINKFILES) \
- $(RLINKFILES) \
- $(VSLLINKFILES) \
- $(ARMJTAGEWFILES)
+ interfaces.c \
+ tcl.c \
+ transport.c \
+ $(DRIVERFILES)
noinst_HEADERS = \
- interface.h \
commands.h \
+ driver.h \
+ interface.h \
+ interfaces.h \
minidriver.h \
- bitbang.h \
jtag.h \
- bitq.h \
- rlink/dtc_cmd.h \
- rlink/ep1_cmd.h \
- rlink/rlink.h \
- rlink/st7.h \
+ transport.h \
+ minidriver/minidriver_imp.h \
minidummy/jtag_minidriver.h
+EXTRA_DIST = startup.tcl
+
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in