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