1 include $(top_srcdir)/common.mk
15 lib_LTLIBRARIES = libopenocd.la
16 bin_PROGRAMS = openocd
19 MAINFILE = ecosboard.c
24 openocd_SOURCES = $(MAINFILE)
25 openocd_LDADD = libopenocd.la
28 openocd_LDADD += $(top_builddir)/jimtcl/libjim.a
30 openocd_LDADD += -ljim
33 libopenocd_la_SOURCES = \
42 libopenocd_la_CPPFLAGS = -DPKGBLDDATE=\"`date +%F-%R`\"
44 # banner output includes RELSTR appended to $VERSION from the configure script
45 # guess-rev.sh returns either a repository version ID or "-snapshot"
47 libopenocd_la_CPPFLAGS += -DRELSTR=\"\"
49 libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
51 libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\"
53 # add default CPPFLAGS
54 libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
56 # the library search path.
57 libopenocd_la_LDFLAGS = $(all_libraries)
66 FTDI2232LIB = -lftdi -lusb
68 if USB_BLASTER_LIBFTDI
69 FTDI2232LIB = -lftdi -lusb
72 FTDI2232LIB = -lftdi -lusb
97 libopenocd_la_LIBADD = \
98 $(top_builddir)/src/xsvf/libxsvf.la \
99 $(top_builddir)/src/svf/libsvf.la \
100 $(top_builddir)/src/pld/libpld.la \
101 $(top_builddir)/src/jtag/libjtag.la \
102 $(top_builddir)/src/transport/libtransport.la \
103 $(top_builddir)/src/flash/libflash.la \
104 $(top_builddir)/src/target/libtarget.la \
105 $(top_builddir)/src/server/libserver.la \
106 $(top_builddir)/src/rtos/librtos.la \
107 $(top_builddir)/src/helper/libhelper.la \
108 $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB)
111 $(srcdir)/helper/startup.tcl \
112 $(srcdir)/jtag/startup.tcl \
113 $(srcdir)/target/startup.tcl \
114 $(srcdir)/flash/startup.tcl \
115 $(srcdir)/server/startup.tcl
117 EXTRA_DIST = $(STARTUP_TCL_SRCS)
119 BUILT_SOURCES = startup.tcl
121 startup.tcl: $(STARTUP_TCL_SRCS)
124 BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD)
126 # Convert .tcl to cfile
127 startup_tcl.c: startup.tcl $(BIN2C)
128 $(BIN2C) openocd_startup_tcl < $< > $@ || rm -f $@
130 # add startup_tcl.c to make clean list
131 CLEANFILES = startup.tcl startup_tcl.c
134 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
136 # The "quick" target builds executables & reinstalls the executables
137 # Primary use: developer types to quicken the edit/compile/debug
138 # cycle. by not requiring a "full build and full install". Note the
139 # assumption is: You are only rebuilding the EXE.... and everything
140 # else is/was previously installed.
142 # use at your own risk
143 quick: all install-binPROGRAMS