]> git.sur5r.net Git - openocd/blob - src/Makefile.am
- configure check added for tclsh
[openocd] / src / Makefile.am
1 bin_PROGRAMS = openocd
2
3 if ECOSBOARD
4 MAINFILE = ecosboard.c
5 else
6 MAINFILE = main.c jim.c
7 endif
8
9 openocd_SOURCES = $(MAINFILE) openocd.c startup.c
10
11 # set the include path found by configure
12 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/helper \
13         -I$(top_srcdir)/src/jtag -I$(top_srcdir)/src/target -I$(top_srcdir)/src/xsvf -I$(top_srcdir)/src/server \
14         -I$(top_srcdir)/src/flash -I$(top_srcdir)/src/pld $(all_includes)
15
16 # pass path to prefix path
17 openocd_CPPFLAGS = \
18  -DPKGLIBDIR=\"$(pkglibdir)\" \
19  -DPKGBLDDATE=\"`date +%F-%R`\" \
20  -DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh`\" \
21  @CPPFLAGS@
22
23 # the library search path.
24 openocd_LDFLAGS = $(all_libraries) 
25 SUBDIRS = helper jtag xsvf target server flash pld
26
27 if IS_MINGW
28 MINGWLDADD = -lwsock32
29 else
30 MINGWLDADD =
31 endif
32
33 if FT2232_LIBFTDI
34 FTDI2232LIB = -lftdi -lusb
35 else
36 if PRESTO_LIBFTDI
37 FTDI2232LIB = -lftdi -lusb
38 else
39 FTDI2232LIB =
40 endif
41 endif
42
43 if USBPROG
44 LIBUSB = -lusb
45 else
46 if JLINK
47 LIBUSB = -lusb
48 else
49 LIBUSB =
50 endif
51 endif
52
53 if IS_WIN32
54 if FTD2XXDIR
55 FTD2XXLDADD = @WITH_FTD2XX@/FTD2XX.lib
56 else
57 FTD2XXLDADD = -lftd2xx
58 endif
59 else
60 FTD2XXLDADD = -lftd2xx 
61 endif
62   
63 if FT2232_FTD2XX
64 FTD2XXLIB = $(FTD2XXLDADD)
65 else
66 if PRESTO_FTD2XX
67 FTD2XXLIB = $(FTD2XXLDADD)
68 else
69 FTD2XXLIB =
70 endif
71 endif
72
73 openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.a \
74         $(top_builddir)/src/target/libtarget.a $(top_builddir)/src/jtag/libjtag.a \
75         $(top_builddir)/src/helper/libhelper.a \
76         $(top_builddir)/src/server/libserver.a $(top_builddir)/src/helper/libhelper.a \
77         $(top_builddir)/src/flash/libflash.a $(top_builddir)/src/target/libtarget.a \
78         $(top_builddir)/src/pld/libpld.a \
79         $(FTDI2232LIB) $(FTD2XXLIB) $(MINGWLDADD) $(LIBUSB)
80
81         
82         
83 nobase_dist_pkglib_DATA = \
84         tcl/bitsbytes.tcl  \
85         tcl/chip/atmel/at91/aic.tcl  \
86         tcl/chip/atmel/at91/at91sam7x128.tcl  \
87         tcl/chip/atmel/at91/at91sam7x256.tcl  \
88         tcl/chip/atmel/at91/pmc.tcl  \
89         tcl/chip/atmel/at91/rtt.tcl  \
90         tcl/chip/atmel/at91/usarts.tcl  \
91         tcl/cpu/arm/arm7tdmi.tcl  \
92         tcl/cpu/arm/arm920.tcl  \
93         tcl/cpu/arm/arm946.tcl  \
94         tcl/cpu/arm/arm966.tcl  \
95         tcl/memory.tcl  \
96         tcl/mmr_helpers.tcl  \
97         tcl/readable.tcl  
98
99 # Convert .tcl to .c file
100 startup.c: $(top_srcdir)/src/startup.tcl Makefile  $(top_srcdir)/src/file2c.tcl
101         ${TCLSH} $(top_srcdir)/src/file2c.tcl $(top_srcdir)/src/startup.tcl startup.c
102
103 # add startup.c to make clean list
104 CLEANFILES = startup.c