From cb7965da154793430d935f4965d7360198b711ba Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 16 Oct 2009 13:52:40 -0700 Subject: xscale: better fix for debug_handler.bin Generate a C struct with the data, and use that, instead of an assembly language file. The assembly language causes issues on Darwin and MS-Windows, which don't necessarily use GNU AS; or if they do, don't necessarily use its ELF syntax. It's also better in two other ways: fewer global symbols; and the init-time size check gets optimized away at compile time. (Unless it fails, in which case bigger chunks of the file vanish.) Signed-off-by: David Brownell --- src/helper/Makefile.am | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/helper/Makefile.am') diff --git a/src/helper/Makefile.am b/src/helper/Makefile.am index 7047253b..67250a18 100644 --- a/src/helper/Makefile.am +++ b/src/helper/Makefile.am @@ -52,12 +52,16 @@ noinst_HEADERS = \ startup.tcl \ bin2char.c -bin2char$(EXEEXT_FOR_BUILD): bin2char.c +BIN2C = bin2char$(EXEEXT_FOR_BUILD) + +BUILT_SOURCES = $(BIN2C) + +$(BIN2C): bin2char.c ${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} $(srcdir)/bin2char.c -o $@ # Convert .tcl to cfile -startup_tcl.c: startup.tcl bin2char$(EXEEXT_FOR_BUILD) - ./bin2char$(EXEEXT_FOR_BUILD) startup_tcl < $(srcdir)/startup.tcl > $@ +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) -- cgit v1.2.3