From: borutr Date: Mon, 3 Jul 2006 10:11:18 +0000 (+0000) Subject: sdcc-build: X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=8e59bbd8bbe6ea78f0d9bdd1fed4c5cb495ca6d8;p=fw%2Fsdcc sdcc-build: * local/ppc-osx3.mk: added * emu/rrz80/cpu/z80.h: detect __BIG_ENDIAN__ if defined by preprocessor sdcc: * src/configure.in, src/configure, src/Makefile.in: defined CPPFLAGS * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in * src/avr/Makefile.in, rc/ds390/Makefile.in, src/ds400/Makefile.in, src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in, src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in: git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4256 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 0c80cdc4..cff59524 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-07-03 Borut Razem + + * src/configure.in, src/configure, src/Makefile.in: defined CPPFLAGS + * src/port.mk: defined CPPFLAGS, renamed to src/port.mk.in + * src/avr/Makefile.in, rc/ds390/Makefile.in, src/ds400/Makefile.in, + src/hc08/Makefile.in, src/mcs51/Makefile.in, src/pic16/Makefile.in, + src/pic/Makefile.in, src/xa51/Makefile.in, src/z80/Makefile.in: + 2006-07-02 Raphael Neider * src/pic16/devices.inc, diff --git a/configure b/configure index 2aa7c97e..b4e337d4 100755 --- a/configure +++ b/configure @@ -7932,7 +7932,7 @@ fi test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/Makefile" - ac_config_files="$ac_config_files main.mk:main_in.mk src/Makefile device/include/Makefile support/librarian/Makefile support/makebin/Makefile support/regression/Makefile support/valdiag/Makefile Makefile Makefile.common:Makefile.common.in" + ac_config_files="$ac_config_files main.mk:main_in.mk src/Makefile src/port.mk:src/port.mk.in device/include/Makefile support/librarian/Makefile support/makebin/Makefile support/regression/Makefile support/valdiag/Makefile Makefile Makefile.common:Makefile.common.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -8016,9 +8016,10 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -8488,6 +8489,7 @@ do "device/lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/lib/Makefile" ;; "main.mk" ) CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/port.mk" ) CONFIG_FILES="$CONFIG_FILES src/port.mk:src/port.mk.in" ;; "device/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES device/include/Makefile" ;; "support/librarian/Makefile" ) CONFIG_FILES="$CONFIG_FILES support/librarian/Makefile" ;; "support/makebin/Makefile" ) CONFIG_FILES="$CONFIG_FILES support/makebin/Makefile" ;; diff --git a/configure.in b/configure.in index 993a3520..d1e44932 100755 --- a/configure.in +++ b/configure.in @@ -685,6 +685,7 @@ test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/Makefile]) AC_CONFIG_FILES([main.mk:main_in.mk src/Makefile +src/port.mk:src/port.mk.in device/include/Makefile support/librarian/Makefile support/makebin/Makefile diff --git a/src/Makefile.in b/src/Makefile.in index 6084aa72..72364261 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -18,7 +18,7 @@ PORT_LIBS = $(PORTS:%=%/port.a) LIBS = -lm @LIBS@ #CFLAGS += -Werror -CPPFLAGS += -I$(srcdir) +CPPFLAGS += -I$(srcdir) @CPPFLAGS@ ifdef SDCC_SUB_VERSION CFLAGS += -DSDCC_SUB_VERSION_STR=\"$(SDCC_SUB_VERSION)\" diff --git a/src/avr/Makefile.in b/src/avr/Makefile.in index dfb8a524..a0a932b7 100644 --- a/src/avr/Makefile.in +++ b/src/avr/Makefile.in @@ -4,4 +4,4 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Make all in this directory -include $(srcdir)/../port.mk +include ../port.mk diff --git a/src/ds390/Makefile.in b/src/ds390/Makefile.in index dfb8a524..a0a932b7 100644 --- a/src/ds390/Makefile.in +++ b/src/ds390/Makefile.in @@ -4,4 +4,4 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Make all in this directory -include $(srcdir)/../port.mk +include ../port.mk diff --git a/src/ds400/Makefile.in b/src/ds400/Makefile.in index dfb8a524..a0a932b7 100644 --- a/src/ds400/Makefile.in +++ b/src/ds400/Makefile.in @@ -4,4 +4,4 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Make all in this directory -include $(srcdir)/../port.mk +include ../port.mk diff --git a/src/hc08/Makefile.in b/src/hc08/Makefile.in index dfb8a524..a0a932b7 100644 --- a/src/hc08/Makefile.in +++ b/src/hc08/Makefile.in @@ -4,4 +4,4 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Make all in this directory -include $(srcdir)/../port.mk +include ../port.mk diff --git a/src/mcs51/Makefile.in b/src/mcs51/Makefile.in index dfb8a524..a0a932b7 100644 --- a/src/mcs51/Makefile.in +++ b/src/mcs51/Makefile.in @@ -4,4 +4,4 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Make all in this directory -include $(srcdir)/../port.mk +include ../port.mk diff --git a/src/pic/Makefile.in b/src/pic/Makefile.in index 8f8d493f..743a9332 100644 --- a/src/pic/Makefile.in +++ b/src/pic/Makefile.in @@ -6,4 +6,4 @@ top_srcdir = @top_srcdir@ # Make all in this directory PORT = pic -include $(srcdir)/../port.mk +include ../port.mk diff --git a/src/pic16/Makefile.in b/src/pic16/Makefile.in index dfb8a524..a0a932b7 100644 --- a/src/pic16/Makefile.in +++ b/src/pic16/Makefile.in @@ -4,4 +4,4 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Make all in this directory -include $(srcdir)/../port.mk +include ../port.mk diff --git a/src/port.mk b/src/port.mk deleted file mode 100644 index 466a2eae..00000000 --- a/src/port.mk +++ /dev/null @@ -1,49 +0,0 @@ -# Common Makefile for all ports. -# Input: SOURCES - list of C files included in the project -# SPECIAL - list of special files that should be included in dependencies -# PEEPRULES - list of all peephole rules (.rul) derrived files -# PREBUILD - list of special files to build before deps. - -# Ports are always located in sdcc/src/ - -# Output -LIB = port.a -# Include the sdcc/src directory -INCLUDEFLAGS = -I$(srcdir)/.. -I.. - -# If the sources aren't specified, assume all in this directory. -ifndef SOURCES -SOURCES = $(notdir $(wildcard $(srcdir)/*.c)) -endif - -# If the peephole rules aren't specified, assume all. -ifndef PEEPRULES -PEEPDEFS = $(notdir $(wildcard $(srcdir)/*.def)) -PEEPRULES = $(PEEPDEFS:.def=.rul) -endif - -PREBUILD += $(PEEPRULES) - -all: $(PREBUILD) dep $(LIB) - -include $(top_builddir)Makefile.common - -$(LIB): $(OBJ) - rm -f $(LIB) - $(AR) r $(LIB) $(OBJ) - $(RANLIB) $(LIB) - -%.rul: %.def - $(AWK) -f $(srcdir)/../SDCCpeeph.awk $< > $@ - -dep: Makefile.dep - -Makefile.dep: $(PREBUILD) Makefile $(SOURCES) $(SPECIAL) - $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep - -# don't include Makefile.dep for the listed targets: -ifeq "$(findstring $(MAKECMDGOALS),clean distclean)" "" - include Makefile.dep -endif - -include $(srcdir)/../port-clean.mk diff --git a/src/port.mk.in b/src/port.mk.in new file mode 100644 index 00000000..cc97e094 --- /dev/null +++ b/src/port.mk.in @@ -0,0 +1,51 @@ +# Common Makefile for all ports. +# Input: SOURCES - list of C files included in the project +# SPECIAL - list of special files that should be included in dependencies +# PEEPRULES - list of all peephole rules (.rul) derrived files +# PREBUILD - list of special files to build before deps. + +# Ports are always located in sdcc/src/ + +CPPFLAGS += @CPPFLAGS@ + +# Output +LIB = port.a +# Include the sdcc/src directory +INCLUDEFLAGS = -I$(srcdir)/.. -I.. + +# If the sources aren't specified, assume all in this directory. +ifndef SOURCES +SOURCES = $(notdir $(wildcard $(srcdir)/*.c)) +endif + +# If the peephole rules aren't specified, assume all. +ifndef PEEPRULES +PEEPDEFS = $(notdir $(wildcard $(srcdir)/*.def)) +PEEPRULES = $(PEEPDEFS:.def=.rul) +endif + +PREBUILD += $(PEEPRULES) + +all: $(PREBUILD) dep $(LIB) + +include $(top_builddir)Makefile.common + +$(LIB): $(OBJ) + rm -f $(LIB) + $(AR) r $(LIB) $(OBJ) + $(RANLIB) $(LIB) + +%.rul: %.def + $(AWK) -f $(srcdir)/../SDCCpeeph.awk $< > $@ + +dep: Makefile.dep + +Makefile.dep: $(PREBUILD) Makefile $(SOURCES) $(SPECIAL) + $(CPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.c,$^) >Makefile.dep + +# don't include Makefile.dep for the listed targets: +ifeq "$(findstring $(MAKECMDGOALS),clean distclean)" "" + include Makefile.dep +endif + +include $(srcdir)/../port-clean.mk diff --git a/src/xa51/Makefile.in b/src/xa51/Makefile.in index dfb8a524..a0a932b7 100644 --- a/src/xa51/Makefile.in +++ b/src/xa51/Makefile.in @@ -4,4 +4,4 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Make all in this directory -include $(srcdir)/../port.mk +include ../port.mk diff --git a/src/z80/Makefile.in b/src/z80/Makefile.in index dfb8a524..a0a932b7 100644 --- a/src/z80/Makefile.in +++ b/src/z80/Makefile.in @@ -4,4 +4,4 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Make all in this directory -include $(srcdir)/../port.mk +include ../port.mk