From 8b7d5201d0f582e0f03ebed689d384b505de6312 Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Sat, 26 Apr 2003 20:58:14 +0000 Subject: [PATCH] * as/Makefile: new EXEEXT * as/z80/Makefile: remove trailing slash of BUILDIR * as/z80/clean.mk: new EXEEXT * Makefile.common.in: add to CFLAGS (and others), don't replace it * support/cpp2/Makefile.in: new EXEEXT git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2566 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 8 ++++++++ Makefile.common.in | 10 +++++----- as/Makefile | 12 ++++++------ as/z80/Makefile | 2 +- as/z80/clean.mk | 6 ++++-- support/cpp2/Makefile.in | 9 +++++---- 6 files changed, 29 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8641431f..cd441bc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-04-26 Bernhard Held + + * as/Makefile: new EXEEXT + * as/z80/Makefile: remove trailing slash of BUILDIR + * as/z80/clean.mk: new EXEEXT + * Makefile.common.in: add to CFLAGS (and others), don't replace it + * support/cpp2/Makefile.in: new EXEEXT + 2003-04-24 Bernhard Held Cygwin's gcc always appends .exe: 'gcc -o a a.c' creates a.exe; diff --git a/Makefile.common.in b/Makefile.common.in index 8dd978b5..405c8bb0 100644 --- a/Makefile.common.in +++ b/Makefile.common.in @@ -46,13 +46,13 @@ transform = @program_transform_name@ # Flags -DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@) -CPPFLAGS = $(INCLUDEFLAGS) -I. -I$(PRJDIR) -I$(SLIB) -CFLAGS = -Wall @CFLAGS@ -LDFLAGS = @LDFLAGS@ +DEFS += $(subs -DHAVE_CONFIG_H,,@DEFS@) +CPPFLAGS += $(INCLUDEFLAGS) -I. -I$(PRJDIR) -I$(SLIB) +CFLAGS += -Wall @CFLAGS@ +LDFLAGS += @LDFLAGS@ M_OR_MM = @M_OR_MM@ -EXTRALIBS = @LIBS@ +EXTRALIBS += @LIBS@ # Shared settings between all the sub Makefiles # Done here so that we don't have to start a Make from the top levelport diff --git a/as/Makefile b/as/Makefile index d9b8c97c..67898be3 100644 --- a/as/Makefile +++ b/as/Makefile @@ -1,5 +1,5 @@ PRJDIR = .. -BUILDDIR=../../bin/ +BUILDDIR=../../bin include $(PRJDIR)/Makefile.common PORTS = z80 gbz80 @@ -9,16 +9,16 @@ all: $(MAKE) -C z80 _as-z80 _as-gbz80 E=$(E) BUILDDIR=$(BUILDDIR) install: all install-doc - $(INSTALL) $(PRJDIR)/bin/as-z80 `echo $(bindir)/as-z80|sed '$(transform)'` - $(STRIP) `echo $(bindir)/as-z80|sed '$(transform)'` - $(INSTALL) $(PRJDIR)/bin/as-gbz80 `echo $(bindir)/as-gbz80|sed '$(transform)'` - $(STRIP) `echo $(bindir)/as-gbz80|sed '$(transform)'` + $(INSTALL) $(PRJDIR)/bin/as-z80$(EXEEXT) `echo $(bindir)/as-z80$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(bindir)/as-z80$(EXEEXT)|sed '$(transform)'` + $(INSTALL) $(PRJDIR)/bin/as-gbz80$(EXEEXT) `echo $(bindir)/as-gbz80$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(bindir)/as-gbz80$(EXEEXT)|sed '$(transform)'` install-doc: $(INSTALL) -d $(docdir)/aslink cp -f `find doc -maxdepth 1 -not -type d` $(docdir)/aslink uninstall: - cd $(bindir); rm -f as-z80 as-gbz80 + cd $(bindir); rm -f as-z80$(EXEEXT) as-gbz80$(EXEEXT) include clean.mk diff --git a/as/z80/Makefile b/as/z80/Makefile index beb428f4..526ba30b 100644 --- a/as/z80/Makefile +++ b/as/z80/Makefile @@ -14,7 +14,7 @@ SRC = asdata.c asexpr.c aslex.c aslist.c asmain.c asout.c \ OBJS = $(SRC:%.c=$(OBJDIR)/%.o) SLIBOBJS = $(SLIBSRC:%.c=$(OBJDIR)/%.o) -BINS = $(BUILDDIR)as$(EXT)$(EXEEXT) +BINS = $(BUILDDIR)/as$(EXT)$(EXEEXT) CFLAGS += $(CPPFLAGS) $(OPTS) -I. -DINDEXLIB -DMLH_MAP -DUNIX -DSDK CFLAGS += -funsigned-char diff --git a/as/z80/clean.mk b/as/z80/clean.mk index 03e9e8da..cf18deed 100644 --- a/as/z80/clean.mk +++ b/as/z80/clean.mk @@ -1,11 +1,13 @@ # Deleting all files created by building the program # -------------------------------------------------- +include ../../Makefile.common + clean: rm -rf obj rm -f *core *[%~] *.[oa] rm -f .[a-z]*~ - rm -f $(BUILDDIR)/as-z80 as-z80 - rm -f $(BUILDDIR)/as-gbz80 as-gbz80 + rm -f $(BUILDDIR)/as-z80$(EXEEXT) as-z80$(EXEEXT) + rm -f $(BUILDDIR)/as-gbz80$(EXEEXT) as-gbz80$(EXEEXT) # Deleting all files created by configuring or building the program # ----------------------------------------------------------------- diff --git a/support/cpp2/Makefile.in b/support/cpp2/Makefile.in index c4ec20e5..007393cc 100644 --- a/support/cpp2/Makefile.in +++ b/support/cpp2/Makefile.in @@ -22,8 +22,9 @@ #the Free Software Foundation, 59 Temple Place - Suite 330, #Boston MA 02111-1307, USA. +EXEEXT = @EXEEXT@ PRJDIR = ../.. -TARGET = $(PRJDIR)/bin/sdcpp +TARGET = $(PRJDIR)/bin/sdcpp$(EXEEXT) # This is the default target. all: $(TARGET) @@ -108,11 +109,11 @@ OBSTACK=obstack.o install: all mkdir -p $(bindir) - $(INSTALL) $(TARGET) `echo $(bindir)/sdcpp|sed '$(transform)'` - $(STRIP) `echo $(bindir)/sdcpp|sed '$(transform)'` + $(INSTALL) $(TARGET) `echo $(bindir)/sdcpp$(EXEEXT)|sed '$(transform)'` + $(STRIP) `echo $(bindir)/sdcpp$(EXEEXT)|sed '$(transform)'` uninstall: - rm -f $(bindir)/sdcpp + rm -f $(bindir)/sdcpp$(EXEEXT) clean: -rm -f $(TARGET) *.o core libcpp.a -- 2.30.2