From 5e5b9095f3ccd75c24bbeb55f27b0cb3f96fc9e3 Mon Sep 17 00:00:00 2001 From: kvigor Date: Mon, 16 Oct 2000 23:48:41 +0000 Subject: [PATCH] Replace Perl version of packihx with C version git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@467 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- Makefile | 12 ++++++++---- configure | 4 +++- configure.in | 1 + packihx/Makefile.in | 10 ++-------- packihx/clean.mk | 7 +++++++ src/Makefile.in | 7 +------ 6 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 packihx/clean.mk diff --git a/Makefile b/Makefile index bf177067..1b3c8d23 100644 --- a/Makefile +++ b/Makefile @@ -9,11 +9,12 @@ PRJDIR = . SDCC_MISC = debugger/mcs51 sim/ucsim SDCC_LIBS = support/cpp SDCC_ASLINK = as/mcs51 as link +SDCC_PACKIHX = packihx PKGS = $(SDCC_MISC) $(SDCC_LIBS) $(SDCC_ASLINK) \ - src device/include device/lib + src device/include device/lib $(SDCC_PACKIHX) PKGS_TINI = $(SDCC_LIBS) $(SDCC_ASLINK) \ - src device/include + src device/include $(SDCC_PACKIHX) PORTS = mcs51 z80 srcdir = . @@ -41,6 +42,9 @@ sdcc-aslink: sdcc-misc: for misc in $(SDCC_MISC); do $(MAKE) -C $$misc; done +sdcc-packihx: + $(MAKE) -C $(SDCC_PACKIHX) + sdcc-device: $(MAKE) -C device/include $(MAKE) -C device/lib @@ -49,10 +53,10 @@ sdcc-device-tini: $(MAKE) -C device/include $(MAKE) -C device/lib modelDS390 -sdcc: sdcc-cc sdcc-aslink sdcc-misc sdcc-device +sdcc: sdcc-cc sdcc-aslink sdcc-misc sdcc-device sdcc-packihx $(MAKE) -f main.mk all -sdcc-tini: sdcc-cc sdcc-aslink sdcc-device-tini +sdcc-tini: sdcc-cc sdcc-aslink sdcc-device-tini sdcc-packihx $(MAKE) -f main.mk all # Some interesting sub rules diff --git a/configure b/configure index dec4f296..336f8341 100755 --- a/configure +++ b/configure @@ -2585,6 +2585,8 @@ fi # =========================================================================== subdirs="sim/ucsim" +subdirs="sim/ucsim packihx" + # MLH: removed as the rules are already in Makefile.common #as/z80/Makefile #link/z80/Makefile @@ -3006,7 +3008,7 @@ if test "$no_recursion" != yes; then esac done - for ac_config_dir in sim/ucsim; do + for ac_config_dir in sim/ucsim packihx; do # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. diff --git a/configure.in b/configure.in index e954c4f8..ffbeae5e 100755 --- a/configure.in +++ b/configure.in @@ -235,6 +235,7 @@ fi # Generating output files # =========================================================================== AC_CONFIG_SUBDIRS(sim/ucsim) +AC_CONFIG_SUBDIRS(packihx) # MLH: removed as the rules are already in Makefile.common #as/z80/Makefile #link/z80/Makefile diff --git a/packihx/Makefile.in b/packihx/Makefile.in index 97c642f0..9a73b911 100644 --- a/packihx/Makefile.in +++ b/packihx/Makefile.in @@ -8,7 +8,7 @@ OBJECTS = packihx.o SOURCES = $(patsubst %.o,%.c,$(OBJECTS)) -TARGET = packihx +TARGET = $(PRJDIR)/bin/packihx all: $(TARGET) @@ -50,10 +50,4 @@ $(TARGET): $(OBJECTS) checkconf: -clean: - rm -f *core *[%~] *.[oa] *.output - rm -f .[a-z]*~ \#* - rm -f packihx - -distclean: clean - rm -f config.* +include clean.mk diff --git a/packihx/clean.mk b/packihx/clean.mk new file mode 100644 index 00000000..abc1f1f7 --- /dev/null +++ b/packihx/clean.mk @@ -0,0 +1,7 @@ +clean: + rm -f *core *[%~] *.[oa] *.output + rm -f .[a-z]*~ \#* + rm -f packihx + +distclean: clean + rm -f config.* diff --git a/src/Makefile.in b/src/Makefile.in index 2a3f65e7..ff320931 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -42,11 +42,10 @@ endif SOURCES = $(patsubst %.o,%.c,$(OBJECTS)) TARGET = $(PRJDIR)/bin/sdcc -PACKIHX = $(PRJDIR)/bin/packihx # Compiling entire program or any subproject # ------------------------------------------ -all: ports checkconf $(LIBGC) $(TARGET) $(PACKIHX) +all: ports checkconf $(LIBGC) $(TARGET) ports: for i in $(PORTS); do $(MAKE) -C $$i; done @@ -58,7 +57,6 @@ $(PRJDIR)/support/gc/libgc.a: # --------------------------------------------------- install: all installdirs $(INSTALL) -s $(TARGET) $(bindir)/sdcc - $(INSTALL) $(PACKIHX) $(bindir)/packihx # Deleting all the installed files @@ -99,9 +97,6 @@ include clean.mk $(TARGET): $(OBJECTS) $(PORT_LIBS) $(CC) -o $@ $(OBJECTS) $(PORT_LIBS) $(LIBDIRS) $(LIBS) -$(PACKIHX): packihx - $(INSTALL) packihx $(PACKIHX) - .c.o: $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ -- 2.47.2