Convert to non-recursive make
[openocd.git] / src / jtag / Makefile.am
1 noinst_LTLIBRARIES += %D%/libjtag.la
2
3 JTAG_SRCS =
4 %C%_libjtag_la_LIBADD =
5
6 BUILT_SOURCES += %D%/minidriver_imp.h
7 CLEANFILES += %D%/minidriver_imp.h
8
9 if MINIDRIVER
10
11 if ZY1000
12 JTAG_SRCS += %D%/zy1000/zy1000.c
13 JTAG_MINIDRIVER_DIR = %D%/zy1000
14 endif
15 if MINIDRIVER_DUMMY
16 JTAG_SRCS += %D%/minidummy/minidummy.c %D%/commands.c
17 JTAG_MINIDRIVER_DIR = %D%/minidummy
18 endif
19
20 MINIDRIVER_IMP_DIR = %D%/minidriver
21
22 %D%/jtag_minidriver.h: $(JTAG_MINIDRIVER_DIR)/jtag_minidriver.h
23         cp $< $@
24
25 BUILT_SOURCES += %D%/jtag_minidriver.h
26
27 CLEANFILES += %D%/jtag_minidriver.h
28
29 else
30
31 MINIDRIVER_IMP_DIR = %D%/drivers
32 JTAG_SRCS += %D%/commands.c
33
34 if HLADAPTER
35 include %D%/hla/Makefile.am
36 %C%_libjtag_la_LIBADD += $(top_builddir)/%D%/hla/libocdhla.la
37 endif
38
39 if AICE
40 include %D%/aice/Makefile.am
41 %C%_libjtag_la_LIBADD += $(top_builddir)/%D%/aice/libocdaice.la
42 endif
43
44 include %D%/drivers/Makefile.am
45 %C%_libjtag_la_LIBADD += $(top_builddir)/%D%/drivers/libocdjtagdrivers.la
46
47 endif
48 # endif // MINIDRIVER
49
50 %D%/minidriver_imp.h: $(MINIDRIVER_IMP_DIR)/minidriver_imp.h
51         cp $< $@
52
53
54 %C%_libjtag_la_SOURCES = \
55         %D%/adapter.c \
56         %D%/core.c \
57         %D%/interface.c \
58         %D%/interfaces.c \
59         %D%/tcl.c \
60         %D%/commands.h \
61         %D%/driver.h \
62         %D%/interface.h \
63         %D%/interfaces.h \
64         %D%/minidriver.h \
65         %D%/jtag.h \
66         %D%/minidriver/minidriver_imp.h \
67         %D%/minidummy/jtag_minidriver.h \
68         %D%/swd.h \
69         %D%/tcl.h \
70         $(JTAG_SRCS)
71
72 STARTUP_TCL_SRCS += %D%/startup.tcl