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

bin2char_SOURCES = bin2char.c
4
5
6
7

if ECOSBOARD
MAINFILE = ecosboard.c
else
oharboe's avatar
oharboe committed
8
MAINFILE = main.c jim.c
9
10
endif

11
openocd_SOURCES = $(MAINFILE) openocd.c startup_tcl.c
12
13

# set the include path found by configure
oharboe's avatar
oharboe committed
14
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/helper \
15
	-I$(top_srcdir)/src/jtag -I$(top_srcdir)/src/target -I$(top_srcdir)/src/xsvf -I$(top_srcdir)/src/server \
16
	-I$(top_srcdir)/src/flash -I$(top_srcdir)/src/pld $(all_includes)
17

18
19
20
21
22
23
24
# pass path to prefix path
openocd_CPPFLAGS = \
 -DPKGLIBDIR=\"$(pkglibdir)\" \
 -DPKGBLDDATE=\"`date +%F-%R`\" \
 -DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh`\" \
 @CPPFLAGS@

25
26
# the library search path.
openocd_LDFLAGS = $(all_libraries) 
27
SUBDIRS = helper jtag xsvf target server flash pld
28

29
30
31
32
33
34
if IS_MINGW
MINGWLDADD = -lwsock32
else
MINGWLDADD =
endif

35
if FT2232_LIBFTDI
36
FTDI2232LIB = -lftdi -lusb
37
else
38
if PRESTO_LIBFTDI
39
FTDI2232LIB = -lftdi -lusb
drath's avatar
drath committed
40
else
41
42
FTDI2232LIB =
endif
drath's avatar
drath committed
43
endif
44

45
46
47
if USBPROG
LIBUSB = -lusb
else
48
49
50
if JLINK
LIBUSB = -lusb
else
51
52
LIBUSB =
endif
53
endif
54

55
if IS_WIN32
56
57
58
59
60
61
62
63
64
if FTD2XXDIR
FTD2XXLDADD = @WITH_FTD2XX@/FTD2XX.lib
else
FTD2XXLDADD = -lftd2xx
endif
else
FTD2XXLDADD = -lftd2xx 
endif
  
65
if FT2232_FTD2XX
66
67
FTD2XXLIB = $(FTD2XXLDADD)
else
68
if PRESTO_FTD2XX
69
70
FTD2XXLIB = $(FTD2XXLDADD)
else
71
72
FTD2XXLIB =
endif
73
endif
74

75
openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.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) $(FTD2XXLIB) $(MINGWLDADD) $(LIBUSB)
oharboe's avatar
oharboe committed
82

oharboe's avatar
oharboe committed
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
nobase_dist_pkglib_DATA = \
	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/cpu/arm/arm7tdmi.tcl  \
	tcl/cpu/arm/arm920.tcl  \
	tcl/cpu/arm/arm946.tcl  \
	tcl/cpu/arm/arm966.tcl  \
	tcl/memory.tcl  \
	tcl/mmr_helpers.tcl  \
	tcl/readable.tcl  

99
100
101
# Convert .tcl to cfile
startup_tcl.c: bin2char startup.tcl
	./bin2char startup_tcl < $(srcdir)/startup.tcl > startup_tcl.c