libopenocd_la_SOURCES = \
hello.c \
- openocd.c
+ openocd.c \
+ startup_tcl.c
noinst_HEADERS = \
openocd.h
libopenocd_la_LIBADD += -lmicrohttpd
endif
+STARTUP_TCL_SRCS = \
+ $(srcdir)/helper/startup.tcl
+
+EXTRA_DIST = $(STARTUP_TCL_SRCS)
+
+BUILT_SOURCES = startup.tcl
+
+startup.tcl: $(STARTUP_TCL_SRCS)
+ cat $^ > $@
+
+BIN2C = $(builddir)/helper/bin2char$(EXEEXT_FOR_BUILD)
+
+# Convert .tcl to cfile
+startup_tcl.c: startup.tcl $(BIN2C)
+ $(BIN2C) 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
time_support.c \
replacements.c \
fileio.c \
- membuf.c \
- startup_tcl.c
+ membuf.c
if IOUTIL
libhelper_la_SOURCES += ioutil.c
jim.h \
jim-eventloop.h \
system.h \
- startup.tcl \
bin2char.c
BIN2C = bin2char$(EXEEXT_FOR_BUILD)
$(BIN2C): bin2char.c
${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} $(srcdir)/bin2char.c -o $@
-# Convert .tcl to cfile
-startup_tcl.c: startup.tcl $(BIN2C)
- ./$(BIN2C) startup_tcl < $(srcdir)/startup.tcl > $@
-
-# add startup_tcl.c to make clean list
-CLEANFILES = startup_tcl.c bin2char$(EXEEXT_FOR_BUILD)
+CLEANFILES = bin2char$(EXEEXT_FOR_BUILD)
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in