db3e6ff2a4b193369fd7201b63c5d34e632d58a0
[openocd.git] / src / jtag / Makefile.am
1 include $(top_srcdir)/common.mk
2
3 METASOURCES = AUTO
4 noinst_LTLIBRARIES = libjtag.la
5
6 SUBDIRS =
7 DRIVERFILES =
8 libjtag_la_LIBADD =
9
10 CLEANFILES =
11
12 BUILT_SOURCES =
13
14 BUILT_SOURCES += minidriver_imp.h
15 CLEANFILES += minidriver_imp.h
16
17 if MINIDRIVER
18
19 if ZY1000
20 DRIVERFILES += zy1000/zy1000.c
21 JTAG_MINIDRIVER_DIR = $(srcdir)/zy1000
22 endif
23 if MINIDRIVER_DUMMY
24 DRIVERFILES += minidummy/minidummy.c commands.c
25 JTAG_MINIDRIVER_DIR = $(srcdir)/minidummy
26 endif
27
28 MINIDRIVER_IMP_DIR = $(srcdir)/minidriver
29
30 jtag_minidriver.h: $(JTAG_MINIDRIVER_DIR)/jtag_minidriver.h
31         cp $< $@
32
33 BUILT_SOURCES += jtag_minidriver.h
34
35 CLEANFILES += jtag_minidriver.h
36
37 else
38
39 MINIDRIVER_IMP_DIR = $(srcdir)/drivers
40 DRIVERFILES += commands.c
41
42 if HLADAPTER
43 SUBDIRS += hla
44 libjtag_la_LIBADD += $(top_builddir)/src/jtag/hla/libocdhla.la
45 endif
46
47 if AICE
48 SUBDIRS += aice
49 libjtag_la_LIBADD += $(top_builddir)/src/jtag/aice/libocdaice.la
50 endif
51
52 SUBDIRS += drivers
53 libjtag_la_LIBADD += $(top_builddir)/src/jtag/drivers/libocdjtagdrivers.la
54
55
56 endif
57
58 # endif // MINIDRIVER
59
60 minidriver_imp.h: $(MINIDRIVER_IMP_DIR)/minidriver_imp.h
61         cp $< $@
62
63
64 libjtag_la_SOURCES = \
65         adapter.c \
66         core.c \
67         interface.c \
68         interfaces.c \
69         tcl.c \
70         $(DRIVERFILES)
71
72 noinst_HEADERS = \
73         commands.h \
74         driver.h \
75         interface.h \
76         interfaces.h \
77         minidriver.h \
78         jtag.h \
79         minidriver/minidriver_imp.h \
80         minidummy/jtag_minidriver.h \
81         swd.h \
82         tcl.h
83
84 EXTRA_DIST = startup.tcl
85
86 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in