2717dc5417dae117fcad6dd26cfee1cf0fa72ffe
[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 SUBDIRS += drivers
43 libjtag_la_LIBADD += $(top_builddir)/src/jtag/drivers/libocdjtagdrivers.la
44
45 endif
46
47 # endif // MINIDRIVER
48
49 minidriver_imp.h: $(MINIDRIVER_IMP_DIR)/minidriver_imp.h
50         cp $< $@
51
52
53 libjtag_la_SOURCES = \
54         adapter.c \
55         core.c \
56         interface.c \
57         interfaces.c \
58         tcl.c \
59         $(DRIVERFILES)
60
61 noinst_HEADERS = \
62         commands.h \
63         driver.h \
64         interface.h \
65         interfaces.h \
66         minidriver.h \
67         jtag.h \
68         minidriver/minidriver_imp.h \
69         minidummy/jtag_minidriver.h
70
71 EXTRA_DIST = startup.tcl
72
73 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in