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