Changed openocd version info creation to be more useful.
[fw/openocd] / src / Makefile.am
1 bin_PROGRAMS = openocd
2 openocd_SOURCES = openocd.c
3
4 # set the include path found by configure
5 INCLUDES = -I$(top_srcdir)/src/helper \
6         -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 # pass path to prefix path
10 openocd_CPPFLAGS = \
11  -DPKGLIBDIR=\"$(pkglibdir)\" \
12  -DPKGBLDDATE=\"`date +%F-%R`\" \
13  -DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh`\" \
14  @CPPFLAGS@
15
16 # the library search path.
17 openocd_LDFLAGS = $(all_libraries) 
18 SUBDIRS = helper jtag xsvf target server flash pld
19
20 if IS_MINGW
21 MINGWLDADD = -lwsock32
22 else
23 MINGWLDADD =
24 endif
25
26 if FT2232_LIBFTDI
27 FTDI2232LIB = -lftdi
28 else
29 if PRESTO_LIBFTDI
30 FTDI2232LIB = -lftdi
31 else
32 FTDI2232LIB =
33 endif
34 endif
35
36 if USBPROG
37 LIBUSB = -lusb
38 else
39 LIBUSB =
40 endif
41
42 if IS_WIN32
43 if FTD2XXDIR
44 FTD2XXLDADD = @WITH_FTD2XX@/FTD2XX.lib
45 else
46 FTD2XXLDADD = -lftd2xx
47 endif
48 else
49 FTD2XXLDADD = -lftd2xx 
50 endif
51   
52 if FT2232_FTD2XX
53 FTD2XXLIB = $(FTD2XXLDADD)
54 else
55 if PRESTO_FTD2XX
56 FTD2XXLIB = $(FTD2XXLDADD)
57 else
58 FTD2XXLIB =
59 endif
60 endif
61
62 openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.a \
63         $(top_builddir)/src/target/libtarget.a $(top_builddir)/src/jtag/libjtag.a \
64         $(top_builddir)/src/helper/libhelper.a \
65         $(top_builddir)/src/server/libserver.a $(top_builddir)/src/helper/libhelper.a \
66         $(top_builddir)/src/flash/libflash.a $(top_builddir)/src/target/libtarget.a \
67         $(top_builddir)/src/pld/libpld.a \
68         $(FTDI2232LIB) $(FTD2XXLIB) $(MINGWLDADD) $(LIBUSB)