1 include $(top_srcdir)/common.mk
13 lib_LTLIBRARIES = libopenocd.la
14 bin_PROGRAMS = openocd
17 MAINFILE = ecosboard.c
22 openocd_SOURCES = $(MAINFILE)
23 openocd_LDADD = libopenocd.la -ljim
25 libopenocd_la_SOURCES = \
34 libopenocd_la_CPPFLAGS = -DPKGBLDDATE=\"`date +%F-%R`\"
36 # banner output includes RELSTR appended to $VERSION from the configure script
37 # guess-rev.sh returns either a repository version ID or "-snapshot"
39 libopenocd_la_CPPFLAGS += -DRELSTR=\"\"
41 libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
43 libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\"
45 # add default CPPFLAGS
46 libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
48 # the library search path.
49 libopenocd_la_LDFLAGS = $(all_libraries)
58 FTDI2232LIB = -lftdi -lusb
60 if USB_BLASTER_LIBFTDI
61 FTDI2232LIB = -lftdi -lusb
64 FTDI2232LIB = -lftdi -lusb
89 libopenocd_la_LIBADD = \
90 $(top_builddir)/src/xsvf/libxsvf.la \
91 $(top_builddir)/src/svf/libsvf.la \
92 $(top_builddir)/src/pld/libpld.la \
93 $(top_builddir)/src/jtag/libjtag.la \
94 $(top_builddir)/src/flash/libflash.la \
95 $(top_builddir)/src/target/libtarget.la \
96 $(top_builddir)/src/server/libserver.la \
97 $(top_builddir)/src/helper/libhelper.la \
98 $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB)
101 $(srcdir)/helper/startup.tcl \
102 $(srcdir)/jtag/startup.tcl \
103 $(srcdir)/target/startup.tcl \
104 $(srcdir)/flash/startup.tcl \
105 $(srcdir)/server/startup.tcl
107 EXTRA_DIST = $(STARTUP_TCL_SRCS)
109 BUILT_SOURCES = startup.tcl
111 startup.tcl: $(STARTUP_TCL_SRCS)
114 BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD)
116 # Convert .tcl to cfile
117 startup_tcl.c: startup.tcl $(BIN2C)
118 $(BIN2C) openocd_startup_tcl < $< > $@ || rm -f $@
120 # add startup_tcl.c to make clean list
121 CLEANFILES = startup.tcl startup_tcl.c
124 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
126 # The "quick" target builds executables & reinstalls the executables
127 # Primary use: developer types to quicken the edit/compile/debug
128 # cycle. by not requiring a "full build and full install". Note the
129 # assumption is: You are only rebuilding the EXE.... and everything
130 # else is/was previously installed.
132 # use at your own risk
133 quick: all install-binPROGRAMS