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)
66 libopenocd_la_LIBADD = \
67 $(top_builddir)/src/xsvf/libxsvf.la \
68 $(top_builddir)/src/svf/libsvf.la \
69 $(top_builddir)/src/pld/libpld.la \
70 $(top_builddir)/src/jtag/libjtag.la \
71 $(top_builddir)/src/transport/libtransport.la \
72 $(top_builddir)/src/flash/libflash.la \
73 $(top_builddir)/src/target/libtarget.la \
74 $(top_builddir)/src/server/libserver.la \
75 $(top_builddir)/src/rtos/librtos.la \
76 $(top_builddir)/src/helper/libhelper.la \
77 $(LIBFTDI_LIBS) $(MINGWLDADD) \
78 $(HIDAPI_LIBS) $(LIBUSB1_LIBS) $(LIBUSB0_LIBS)
81 $(srcdir)/helper/startup.tcl \
82 $(srcdir)/jtag/startup.tcl \
83 $(srcdir)/target/startup.tcl \
84 $(srcdir)/flash/startup.tcl \
85 $(srcdir)/server/startup.tcl
87 EXTRA_DIST = $(STARTUP_TCL_SRCS)
89 BUILT_SOURCES = startup.tcl
91 startup.tcl: $(STARTUP_TCL_SRCS)
94 BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD)
96 # Convert .tcl to cfile
97 startup_tcl.c: startup.tcl $(BIN2C)
98 $(BIN2C) openocd_startup_tcl < $< > $@ || rm -f $@
100 # add startup_tcl.c to make clean list
101 CLEANFILES = startup.tcl startup_tcl.c
103 # we do not want generated file in the dist
105 rm -f $(distdir)/startup_tcl.c
107 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
109 # The "quick" target builds executables & reinstalls the executables
110 # Primary use: developer types to quicken the edit/compile/debug
111 # cycle. by not requiring a "full build and full install". Note the
112 # assumption is: You are only rebuilding the EXE.... and everything
113 # else is/was previously installed.
115 # use at your own risk
116 quick: all install-binPROGRAMS