Makefile.am 2.32 KB
Newer Older
1
bin_PROGRAMS = openocd
2
3

if ECOSBOARD
oharboe's avatar
oharboe committed
4
MAINFILE = ecosboard.c
5
else
6
MAINFILE = main.c
7
8
endif

9
openocd_SOURCES = $(MAINFILE) openocd.c
10
11

# set the include path found by configure
12
13
14
15
16
17
18
19
20
21
AM_CPPFLAGS = \
	-I$(top_srcdir)/src \
	-I$(top_srcdir)/src/helper \
	-I$(top_srcdir)/src/jtag \
	-I$(top_srcdir)/src/target \
	-I$(top_srcdir)/src/xsvf \
	-I$(top_srcdir)/src/svf \
	-I$(top_srcdir)/src/server \
	-I$(top_srcdir)/src/flash \
	-I$(top_srcdir)/src/pld
22

23
24
25
# pass path to prefix path
openocd_CPPFLAGS = \
 -DPKGLIBDIR=\"$(pkglibdir)\" \
kc8apf's avatar
kc8apf committed
26
27
28
29
30
 -DPKGBLDDATE=\"`date +%F-%R`\"

if RELEASE
openocd_CPPFLAGS += -DRELSTR=\"Release\" -DPKGBLDREV=\"\"
else
31
openocd_CPPFLAGS += -DRELSTR=\"svn:\" -DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
kc8apf's avatar
kc8apf committed
32
33
34
endif

# add default CPPFLAGS
35
openocd_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
36

37
38
# the library search path.
openocd_LDFLAGS = $(all_libraries) 
39
SUBDIRS = helper jtag xsvf svf target server flash pld
40

41
42
43
44
45
46
if IS_MINGW
MINGWLDADD = -lwsock32
else
MINGWLDADD =
endif

47
if FT2232_LIBFTDI
48
FTDI2232LIB = -lftdi -lusb
49
else
50
if PRESTO_LIBFTDI
51
FTDI2232LIB = -lftdi -lusb
drath's avatar
drath committed
52
else
53
54
FTDI2232LIB =
endif
drath's avatar
drath committed
55
endif
56

57
58
59
if USBPROG
LIBUSB = -lusb
else
60
61
62
if JLINK
LIBUSB = -lusb
else
63
64
65
if RLINK
LIBUSB = -lusb
else
duane's avatar
duane committed
66
67
68
if VSLLINK
LIBUSB = -lusb
else
69
70
LIBUSB =
endif
71
endif
72
endif
duane's avatar
duane committed
73
endif
74

75
openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.a $(top_builddir)/src/svf/libsvf.a \
76
77
78
79
	$(top_builddir)/src/target/libtarget.a $(top_builddir)/src/jtag/libjtag.a \
	$(top_builddir)/src/helper/libhelper.a \
	$(top_builddir)/src/server/libserver.a $(top_builddir)/src/helper/libhelper.a \
	$(top_builddir)/src/flash/libflash.a $(top_builddir)/src/target/libtarget.a \
80
	$(top_builddir)/src/pld/libpld.a \
81
	$(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB)
oharboe's avatar
oharboe committed
82

83
84
85
86
if HTTPD
openocd_LDADD += -lmicrohttpd
endif

oharboe's avatar
oharboe committed
87
nobase_dist_pkglib_DATA = \
88
89
90
91
92
93
94
95
96
97
98
99
100
101
	tcl/bitsbytes.tcl			\
	tcl/chip/atmel/at91/aic.tcl		\
	tcl/chip/atmel/at91/at91sam7x128.tcl	\
	tcl/chip/atmel/at91/at91sam7x256.tcl	\
	tcl/chip/atmel/at91/pmc.tcl		\
	tcl/chip/atmel/at91/rtt.tcl		\
	tcl/chip/atmel/at91/usarts.tcl		\
	tcl/chip/st/stm32/stm32.tcl		\
	tcl/chip/st/stm32/stm32_rcc.tcl		\
	tcl/chip/st/stm32/stm32_regs.tcl	\
	tcl/cpu/arm/arm7tdmi.tcl		\
	tcl/cpu/arm/arm920.tcl			\
	tcl/cpu/arm/arm946.tcl			\
	tcl/cpu/arm/arm966.tcl			\
102
	tcl/cpu/arm/cortex_m3.tcl               \
103
104
105
	tcl/memory.tcl				\
	tcl/mmr_helpers.tcl			\
	tcl/readable.tcl
106
107

MAINTAINERCLEANFILES = Makefile.in