]> git.sur5r.net Git - openocd/blobdiff - src/Makefile.am
allow #include directives to use module name
[openocd] / src / Makefile.am
index 77ae5ae2e771e0975950ddae0942bd913e94aeca..203375209206002baf33d9829bd2af2109897aec 100644 (file)
@@ -14,9 +14,11 @@ openocd_LDADD = libopenocd.la
 
 libopenocd_la_SOURCES = \
        hello.c \
-       openocd.c
+       openocd.c \
+       startup_tcl.c
 
 noinst_HEADERS = \
+       hello.h \
        openocd.h
 
 
@@ -97,6 +99,30 @@ if HTTPD
 libopenocd_la_LIBADD += -lmicrohttpd
 endif
 
+STARTUP_TCL_SRCS = \
+       $(srcdir)/helper/startup.tcl \
+       $(srcdir)/jtag/startup.tcl \
+       $(srcdir)/target/startup.tcl \
+       $(srcdir)/flash/startup.tcl \
+       $(srcdir)/server/startup.tcl
+
+EXTRA_DIST = $(STARTUP_TCL_SRCS)
+
+BUILT_SOURCES = startup.tcl
+
+startup.tcl: $(STARTUP_TCL_SRCS)
+       cat $^ > $@
+
+BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD)
+
+# Convert .tcl to cfile
+startup_tcl.c: startup.tcl $(BIN2C)
+       $(BIN2C) openocd_startup_tcl < $< > $@ || rm -f $@
+
+# add startup_tcl.c to make clean list
+CLEANFILES = startup.tcl startup_tcl.c
+
+
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 
 # The "quick" target builds executables & reinstalls the executables