- Added support for native MinGW builds (thanks to Spencer Oliver and Michael Fischer...
[openocd.git] / 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 $(all_includes)
8
9 # the library search path.
10 openocd_LDFLAGS = $(all_libraries) 
11 SUBDIRS = helper jtag xsvf target server flash
12
13 if IS_MINGW
14 MINGWLDADD = -lwsock32
15 else
16 MINGWLDADD =
17 endif
18
19 if FTDI2232
20 FTDI2232LIB = -lftdi
21 else
22 FTDI2232LIB =
23 endif
24
25 if IS_WIN32
26 if FTD2XXDIR
27 FTD2XXLDADD = @WITH_FTD2XX@/FTD2XX.lib
28 else
29 FTD2XXLDADD = -lftd2xx
30 endif
31 else
32 FTD2XXLDADD = -lftd2xx 
33 endif
34   
35 if FTD2XX
36 FTD2XXLIB = $(FTD2XXLDADD)
37 else
38 FTD2XXLIB =
39 endif
40
41 openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.a \
42         $(top_builddir)/src/target/libtarget.a $(top_builddir)/src/jtag/libjtag.a \
43         $(top_builddir)/src/helper/libhelper.a \
44         $(top_builddir)/src/server/libserver.a $(top_builddir)/src/helper/libhelper.a \
45         $(top_builddir)/src/flash/libflash.a $(top_builddir)/src/target/libtarget.a \
46         $(FTDI2232LIB) $(FTD2XXLIB) $(MINGWLDADD)