1 include $(top_srcdir)/common.mk
15 noinst_LTLIBRARIES = libopenocd.la
16 bin_PROGRAMS = openocd
20 openocd_SOURCES = $(MAINFILE)
21 openocd_LDADD = libopenocd.la
24 openocd_LDADD += $(top_builddir)/jimtcl/libjim.a
26 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=\"\"
48 libopenocd_la_CPPFLAGS += -DGITVERSION=\"\"
50 libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
51 libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\"
54 # add default CPPFLAGS
55 libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
57 # the library search path.
58 libopenocd_la_LDFLAGS = $(all_libraries)
67 FTDI2232LIB = -lftdi -lusb
70 FTDI2232LIB = -lftdi -lusb
78 LIBUSB += $(LIBUSB1_LIBS)
82 LIBUSB += $(LIBUSB0_LIBS)
85 libopenocd_la_LIBADD = \
86 $(top_builddir)/src/xsvf/libxsvf.la \
87 $(top_builddir)/src/svf/libsvf.la \
88 $(top_builddir)/src/pld/libpld.la \
89 $(top_builddir)/src/jtag/libjtag.la \
90 $(top_builddir)/src/transport/libtransport.la \
91 $(top_builddir)/src/flash/libflash.la \
92 $(top_builddir)/src/target/libtarget.la \
93 $(top_builddir)/src/server/libserver.la \
94 $(top_builddir)/src/rtos/librtos.la \
95 $(top_builddir)/src/helper/libhelper.la \
96 $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB)
99 $(srcdir)/helper/startup.tcl \
100 $(srcdir)/jtag/startup.tcl \
101 $(srcdir)/target/startup.tcl \
102 $(srcdir)/flash/startup.tcl \
103 $(srcdir)/server/startup.tcl
105 EXTRA_DIST = $(STARTUP_TCL_SRCS)
107 BUILT_SOURCES = startup.tcl
109 startup.tcl: $(STARTUP_TCL_SRCS)
112 BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD)
114 # Convert .tcl to cfile
115 startup_tcl.c: startup.tcl $(BIN2C)
116 $(BIN2C) openocd_startup_tcl < $< > $@ || rm -f $@
118 # add startup_tcl.c to make clean list
119 CLEANFILES = startup.tcl startup_tcl.c
121 # we do not want generated file in the dist
123 rm -f $(distdir)/startup_tcl.c
125 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
127 # The "quick" target builds executables & reinstalls the executables
128 # Primary use: developer types to quicken the edit/compile/debug
129 # cycle. by not requiring a "full build and full install". Note the
130 # assumption is: You are only rebuilding the EXE.... and everything
131 # else is/was previously installed.
133 # use at your own risk
134 quick: all install-binPROGRAMS