2008-07-13 12:31:40 -05:00
|
|
|
bin_PROGRAMS = openocd bin2char
|
|
|
|
|
|
|
|
bin2char_SOURCES = bin2char.c
|
2008-03-11 16:32:03 -05:00
|
|
|
|
|
|
|
if ECOSBOARD
|
|
|
|
MAINFILE = ecosboard.c
|
|
|
|
else
|
2008-07-06 17:03:07 -05:00
|
|
|
MAINFILE = main.c jim.c
|
2008-03-11 16:32:03 -05:00
|
|
|
endif
|
|
|
|
|
2008-07-13 12:31:40 -05:00
|
|
|
openocd_SOURCES = $(MAINFILE) openocd.c startup_tcl.c
|
2006-06-02 05:36:31 -05:00
|
|
|
|
|
|
|
# set the include path found by configure
|
2008-07-11 07:17:56 -05:00
|
|
|
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/helper \
|
2006-06-02 05:36:31 -05:00
|
|
|
-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
|
|
|
|
2007-12-10 10:55:14 -06:00
|
|
|
# pass path to prefix path
|
|
|
|
openocd_CPPFLAGS = \
|
|
|
|
-DPKGLIBDIR=\"$(pkglibdir)\" \
|
|
|
|
-DPKGBLDDATE=\"`date +%F-%R`\" \
|
|
|
|
-DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh`\" \
|
|
|
|
@CPPFLAGS@
|
|
|
|
|
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
|
2008-05-01 14:31:13 -05:00
|
|
|
FTDI2232LIB = -lftdi -lusb
|
2006-06-02 05:36:31 -05:00
|
|
|
else
|
2007-08-14 04:48:54 -05:00
|
|
|
if PRESTO_LIBFTDI
|
2008-05-01 14:31:13 -05:00
|
|
|
FTDI2232LIB = -lftdi -lusb
|
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
|
2008-05-14 09:13:38 -05:00
|
|
|
if JLINK
|
|
|
|
LIBUSB = -lusb
|
|
|
|
else
|
2007-07-15 06:19:33 -05:00
|
|
|
LIBUSB =
|
|
|
|
endif
|
2008-05-14 09:13:38 -05:00
|
|
|
endif
|
2007-07-15 06:19:33 -05:00
|
|
|
|
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
|
|
|
|
2008-07-13 12:31:40 -05:00
|
|
|
openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.a \
|
2006-06-02 05:36:31 -05:00
|
|
|
$(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)
|
2008-07-04 01:31:43 -05:00
|
|
|
|
2008-07-06 14:17:43 -05:00
|
|
|
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
|
|
|
|
|
2008-07-13 12:31:40 -05:00
|
|
|
# Convert .tcl to cfile
|
|
|
|
startup_tcl.c: bin2char startup.tcl
|
|
|
|
./bin2char startup_tcl < $(srcdir)/startup.tcl > startup_tcl.c
|