X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2FMakefile.am;h=502a63d50c28cdfeb1ad44ddec748d5d692febec;hb=de6acb2d364493530f8d616169245e3a59a4a4d5;hp=20b6425149739084083c3fea2ec000bc1f817461;hpb=76dec044c02bb6d045c2e699501c8e07d75f6013;p=openocd.git diff --git a/src/Makefile.am b/src/Makefile.am index 20b6425149..502a63d50c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,7 +6,7 @@ else MAINFILE = main.c jim.c endif -openocd_SOURCES = $(MAINFILE) openocd.c startup.c +openocd_SOURCES = $(MAINFILE) openocd.c # set the include path found by configure INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/helper \ @@ -70,7 +70,7 @@ FTD2XXLIB = endif endif -openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.a \ +openocd_LDADD = $(top_builddir)/src/startup.o $(top_builddir)/src/xsvf/libxsvf.a \ $(top_builddir)/src/target/libtarget.a $(top_builddir)/src/jtag/libjtag.a \ $(top_builddir)/src/helper/libhelper.a \ $(top_builddir)/src/server/libserver.a $(top_builddir)/src/helper/libhelper.a \ @@ -78,8 +78,6 @@ openocd_LDADD = $(top_builddir)/src/xsvf/libxsvf.a \ $(top_builddir)/src/pld/libpld.a \ $(FTDI2232LIB) $(FTD2XXLIB) $(MINGWLDADD) $(LIBUSB) - - nobase_dist_pkglib_DATA = \ tcl/bitsbytes.tcl \ tcl/chip/atmel/at91/aic.tcl \ @@ -96,9 +94,9 @@ nobase_dist_pkglib_DATA = \ tcl/mmr_helpers.tcl \ tcl/readable.tcl -# Convert .tcl to .c file -startup.c: $(top_srcdir)/src/startup.tcl Makefile $(top_srcdir)/src/file2c.tcl - ${TCLSH} $(top_srcdir)/src/file2c.tcl $(top_srcdir)/src/startup.tcl startup.c +# Convert .tcl to object -# add startup.c to make clean list -CLEANFILES = startup.c +$(top_builddir)/src/startup.o: $(top_srcdir)/src/startup.tcl + abs_builddir=`cd $(top_builddir) && pwd` && \ + cd $(top_srcdir)/src && \ + ${OBJCOPY} -I binary -O ${OBJCOPY_FORMAT} -B ${OBJCOPY_ARCH} startup.tcl $$abs_builddir/src/startup.o