2009-05-10 22:03:57 +00:00
|
|
|
SUBDIRS = helper jtag xsvf svf target server flash pld
|
|
|
|
|
|
|
|
lib_LTLIBRARIES = libopenocd.la
|
2008-07-17 06:21:29 +00:00
|
|
|
bin_PROGRAMS = openocd
|
2008-03-11 21:32:03 +00:00
|
|
|
|
|
|
|
if ECOSBOARD
|
2008-09-25 14:31:10 +00:00
|
|
|
MAINFILE = ecosboard.c
|
2008-03-11 21:32:03 +00:00
|
|
|
else
|
2008-07-17 17:34:53 +00:00
|
|
|
MAINFILE = main.c
|
2008-03-11 21:32:03 +00:00
|
|
|
endif
|
|
|
|
|
2009-09-21 18:40:55 +00:00
|
|
|
openocd_SOURCES = $(MAINFILE)
|
2009-05-10 22:03:57 +00:00
|
|
|
openocd_LDADD = libopenocd.la
|
|
|
|
|
|
|
|
libopenocd_la_SOURCES = openocd.c
|
2006-06-02 10:36:31 +00:00
|
|
|
|
|
|
|
# set the include path found by configure
|
2009-05-02 22:35:02 +00:00
|
|
|
AM_CPPFLAGS = \
|
|
|
|
-I$(top_srcdir)/src \
|
|
|
|
-I$(top_srcdir)/src/helper \
|
|
|
|
-I$(top_srcdir)/src/jtag \
|
|
|
|
-I$(top_srcdir)/src/target \
|
|
|
|
-I$(top_srcdir)/src/xsvf \
|
|
|
|
-I$(top_srcdir)/src/svf \
|
|
|
|
-I$(top_srcdir)/src/server \
|
|
|
|
-I$(top_srcdir)/src/flash \
|
|
|
|
-I$(top_srcdir)/src/pld
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2009-05-27 07:49:58 +00:00
|
|
|
libopenocd_la_CPPFLAGS = -DPKGBLDDATE=\"`date +%F-%R`\"
|
2009-01-20 04:03:31 +00:00
|
|
|
|
|
|
|
if RELEASE
|
2009-05-10 22:03:57 +00:00
|
|
|
libopenocd_la_CPPFLAGS += -DRELSTR=\"Release\" -DPKGBLDREV=\"\"
|
2009-01-20 04:03:31 +00:00
|
|
|
else
|
2009-05-10 22:03:57 +00:00
|
|
|
libopenocd_la_CPPFLAGS += -DRELSTR=\"svn:\" -DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
|
2009-01-20 04:03:31 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# add default CPPFLAGS
|
2009-05-10 22:03:57 +00:00
|
|
|
libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
|
2007-12-10 16:55:14 +00:00
|
|
|
|
2006-06-02 10:36:31 +00:00
|
|
|
# the library search path.
|
2009-09-21 18:40:55 +00:00
|
|
|
libopenocd_la_LDFLAGS = $(all_libraries)
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2006-07-17 14:13:27 +00:00
|
|
|
if IS_MINGW
|
|
|
|
MINGWLDADD = -lwsock32
|
|
|
|
else
|
|
|
|
MINGWLDADD =
|
|
|
|
endif
|
|
|
|
|
2006-08-11 17:49:41 +00:00
|
|
|
if FT2232_LIBFTDI
|
2008-05-01 19:31:13 +00:00
|
|
|
FTDI2232LIB = -lftdi -lusb
|
2006-06-02 10:36:31 +00:00
|
|
|
else
|
2007-08-14 09:48:54 +00:00
|
|
|
if PRESTO_LIBFTDI
|
2008-05-01 19:31:13 +00:00
|
|
|
FTDI2232LIB = -lftdi -lusb
|
2007-08-14 10:05:40 +00:00
|
|
|
else
|
2006-06-02 10:36:31 +00:00
|
|
|
FTDI2232LIB =
|
|
|
|
endif
|
2007-08-14 10:05:40 +00:00
|
|
|
endif
|
2006-06-02 10:36:31 +00:00
|
|
|
|
2007-07-15 11:19:33 +00:00
|
|
|
if USBPROG
|
|
|
|
LIBUSB = -lusb
|
|
|
|
else
|
2008-05-14 14:13:38 +00:00
|
|
|
if JLINK
|
|
|
|
LIBUSB = -lusb
|
|
|
|
else
|
2008-12-19 04:25:22 +00:00
|
|
|
if RLINK
|
|
|
|
LIBUSB = -lusb
|
|
|
|
else
|
2008-12-27 02:56:55 +00:00
|
|
|
if VSLLINK
|
|
|
|
LIBUSB = -lusb
|
|
|
|
else
|
2007-07-15 11:19:33 +00:00
|
|
|
LIBUSB =
|
|
|
|
endif
|
2008-05-14 14:13:38 +00:00
|
|
|
endif
|
2008-12-19 04:25:22 +00:00
|
|
|
endif
|
2008-12-27 02:56:55 +00:00
|
|
|
endif
|
2007-07-15 11:19:33 +00:00
|
|
|
|
2009-05-10 22:03:57 +00:00
|
|
|
libopenocd_la_LIBADD = \
|
|
|
|
$(top_builddir)/src/xsvf/libxsvf.la \
|
|
|
|
$(top_builddir)/src/svf/libsvf.la \
|
|
|
|
$(top_builddir)/src/pld/libpld.la \
|
|
|
|
$(top_builddir)/src/jtag/libjtag.la \
|
|
|
|
$(top_builddir)/src/flash/libflash.la \
|
|
|
|
$(top_builddir)/src/target/libtarget.la \
|
|
|
|
$(top_builddir)/src/server/libserver.la \
|
|
|
|
$(top_builddir)/src/helper/libhelper.la \
|
2008-12-27 01:15:50 +00:00
|
|
|
$(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB)
|
2008-07-04 06:31:43 +00:00
|
|
|
|
2008-12-16 22:20:10 +00:00
|
|
|
if HTTPD
|
2009-05-10 22:03:57 +00:00
|
|
|
libopenocd_la_LIBADD += -lmicrohttpd
|
2008-12-16 22:20:10 +00:00
|
|
|
endif
|
|
|
|
|
2009-06-09 10:28:16 +00:00
|
|
|
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
|
2009-06-24 02:00:19 +00:00
|
|
|
|
|
|
|
# The "quick" target builds executables & reinstalls the executables
|
|
|
|
# Primary use: developer types to quicken the edit/compile/debug
|
|
|
|
# cycle. by not requiring a "full build and full install". Note the
|
|
|
|
# assumption is: You are only rebuilding the EXE.... and everything
|
|
|
|
# else is/was previously installed.
|
|
|
|
#
|
2009-09-21 18:40:55 +00:00
|
|
|
# use at your own risk
|
2009-06-24 02:00:19 +00:00
|
|
|
quick: all install-binPROGRAMS
|
|
|
|
|