Makefile.am 1.47 KB
Newer Older
1
2
3
4
5
6
bin_PROGRAMS = openocd
openocd_SOURCES = openocd.c

# set the include path found by configure
INCLUDES = -I$(top_srcdir)/src/helper \
	-I$(top_srcdir)/src/jtag -I$(top_srcdir)/src/target -I$(top_srcdir)/src/xsvf -I$(top_srcdir)/src/server \
7
	-I$(top_srcdir)/src/flash -I$(top_srcdir)/src/pld $(all_includes)
8

9
10
11
12
13
14
15
# pass path to prefix path
openocd_CPPFLAGS = \
 -DPKGLIBDIR=\"$(pkglibdir)\" \
 -DPKGBLDDATE=\"`date +%F-%R`\" \
 -DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh`\" \
 @CPPFLAGS@

16
17
# the library search path.
openocd_LDFLAGS = $(all_libraries) 
18
SUBDIRS = helper jtag xsvf target server flash pld
19

20
21
22
23
24
25
if IS_MINGW
MINGWLDADD = -lwsock32
else
MINGWLDADD =
endif

26
if FT2232_LIBFTDI
27
28
FTDI2232LIB = -lftdi
else
29
30
if PRESTO_LIBFTDI
FTDI2232LIB = -lftdi
drath's avatar
drath committed
31
else
32
33
FTDI2232LIB =
endif
drath's avatar
drath committed
34
endif
35

36
37
38
39
40
41
if USBPROG
LIBUSB = -lusb
else
LIBUSB =
endif

42
if IS_WIN32
43
44
45
46
47
48
49
50
51
if FTD2XXDIR
FTD2XXLDADD = @WITH_FTD2XX@/FTD2XX.lib
else
FTD2XXLDADD = -lftd2xx
endif
else
FTD2XXLDADD = -lftd2xx 
endif
  
52
if FT2232_FTD2XX
53
54
FTD2XXLIB = $(FTD2XXLDADD)
else
55
if PRESTO_FTD2XX
56
57
FTD2XXLIB = $(FTD2XXLDADD)
else
58
59
FTD2XXLIB =
endif
60
endif
61
62
63
64
65
66

openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.a \
	$(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 \
67
	$(top_builddir)/src/pld/libpld.a \
68
	$(FTDI2232LIB) $(FTD2XXLIB) $(MINGWLDADD) $(LIBUSB)