2006-06-02 05:36:31 -05:00
|
|
|
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 \
|
2006-11-22 07:03:10 -06:00
|
|
|
-I$(top_srcdir)/src/flash -I$(top_srcdir)/src/pld $(all_includes)
|
2006-06-02 05:36:31 -05:00
|
|
|
|
|
|
|
# the library search path.
|
|
|
|
openocd_LDFLAGS = $(all_libraries)
|
2006-11-22 07:03:10 -06:00
|
|
|
SUBDIRS = helper jtag xsvf target server flash pld
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2006-07-17 09:13:27 -05:00
|
|
|
if IS_MINGW
|
|
|
|
MINGWLDADD = -lwsock32
|
|
|
|
else
|
|
|
|
MINGWLDADD =
|
|
|
|
endif
|
|
|
|
|
2006-08-11 12:49:41 -05:00
|
|
|
if FT2232_LIBFTDI
|
2006-06-02 05:36:31 -05:00
|
|
|
FTDI2232LIB = -lftdi
|
|
|
|
else
|
2007-08-14 04:48:54 -05:00
|
|
|
if PRESTO_LIBFTDI
|
|
|
|
FTDI2232LIB = -lftdi
|
2007-08-14 05:05:40 -05:00
|
|
|
else
|
2006-06-02 05:36:31 -05:00
|
|
|
FTDI2232LIB =
|
|
|
|
endif
|
2007-08-14 05:05:40 -05:00
|
|
|
endif
|
2006-06-02 05:36:31 -05:00
|
|
|
|
2007-07-15 06:19:33 -05:00
|
|
|
if USBPROG
|
|
|
|
LIBUSB = -lusb
|
|
|
|
else
|
|
|
|
LIBUSB =
|
|
|
|
endif
|
|
|
|
|
2006-07-17 09:13:27 -05:00
|
|
|
if IS_WIN32
|
2006-06-02 05:36:31 -05:00
|
|
|
if FTD2XXDIR
|
|
|
|
FTD2XXLDADD = @WITH_FTD2XX@/FTD2XX.lib
|
|
|
|
else
|
|
|
|
FTD2XXLDADD = -lftd2xx
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
FTD2XXLDADD = -lftd2xx
|
|
|
|
endif
|
|
|
|
|
2006-08-11 12:49:41 -05:00
|
|
|
if FT2232_FTD2XX
|
2006-06-02 05:36:31 -05:00
|
|
|
FTD2XXLIB = $(FTD2XXLDADD)
|
|
|
|
else
|
2007-08-14 04:48:54 -05:00
|
|
|
if PRESTO_FTD2XX
|
2007-07-15 06:19:33 -05:00
|
|
|
FTD2XXLIB = $(FTD2XXLDADD)
|
|
|
|
else
|
2006-06-02 05:36:31 -05:00
|
|
|
FTD2XXLIB =
|
|
|
|
endif
|
2007-07-15 06:19:33 -05:00
|
|
|
endif
|
2006-06-02 05:36:31 -05:00
|
|
|
|
|
|
|
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 \
|
2006-11-22 07:03:10 -06:00
|
|
|
$(top_builddir)/src/pld/libpld.a \
|
2007-07-15 06:19:33 -05:00
|
|
|
$(FTDI2232LIB) $(FTD2XXLIB) $(MINGWLDADD) $(LIBUSB)
|