From 7d80791ad318f8bfc810a555949c1cb7dd26dca7 Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Wed, 18 Jan 2006 20:49:36 +0000 Subject: [PATCH] Add definitions for the 'sun' platform (SUN Solaris) --- GNUmakef.def | 28 ++++++++++++++++++++++++++++ GNUmakef.inc | 4 ++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/GNUmakef.def b/GNUmakef.def index 1d5b3c6..92af0a9 100644 --- a/GNUmakef.def +++ b/GNUmakef.def @@ -24,10 +24,16 @@ ifeq ($(OSTYPE),beos) # BeOS build PLATFORM=be endif +ifeq ($(findstring solaris, $(OSTYPE)), solaris) +PLATFORM=sun +endif + endif # ifndef PLATFORM ifeq ($(PLATFORM),cyg) CAT=cat +SED=sed +GREP=grep CC=gcc -mno-cygwin CXX=g++ -mno-cygwin AR=ar @@ -39,6 +45,8 @@ LIBEXT=.a else ifeq ($(PLATFORM),emx) CAT=cat +SED=sed +GREP=grep CC=gcc AR=ar RANLIB=ar s @@ -58,6 +66,8 @@ CXX=$(CC) else ifeq ($(PLATFORM),djg) CAT=command.com /c type +SED=sed +GREP=grep CC=gcc CXX=gxx AR=ar @@ -69,6 +79,8 @@ LIBEXT=.a else ifeq ($(PLATFORM),be) CAT=cat +SED=sed +GREP=grep CC=gcc CXX=g++ AR=ar @@ -77,8 +89,22 @@ EXEEXT= OBJEXT=.o LIBEXT=.a LNKFLAGS+=-lbe -ltextencoding +else +ifeq ($(PLATFORM),sun) # SUN Solaris +CAT=cat +SED=gsed +GREP=ggrep +CC=gcc +CXX=g++ +AR=ar +RANLIB=ranlib +EXEEXT= +OBJEXT=.o +LIBEXT=.a else # Linux, *BSD or another unix-like OS CAT=cat +SED=sed +GREP=grep CC=gcc CXX=g++ AR=ar @@ -91,6 +117,8 @@ endif endif endif endif +endif +endif CFLAGS+=-g -funsigned-char $(INCS) -Wall -Wno-sign-compare -pedantic -O2 -DPRAGMA_PACK # -fomit-frame-pointer LNKFLAGS+=-g CPPFLAGS+=$(CFLAGS) -fno-rtti # -fno-exceptions diff --git a/GNUmakef.inc b/GNUmakef.inc index a584f23..b28eed0 100644 --- a/GNUmakef.inc +++ b/GNUmakef.inc @@ -22,8 +22,8 @@ sourcelist: bld$(PLATFORM).inc bld$(PLATFORM).inc: $(TARGET).all @echo making sourcelist - @grep -w $(PLATFORM) $< \ - | sed 's;^\([[:alnum:]_]*\)[ ]*\([[:alnum:]_]*\).*;SOURCES+=\1.\2;' > $@; [ -s $@ ] || rm -f $@ + @$(GREP) -w $(PLATFORM) $< \ + | $(SED) 's;^\([[:alnum:]_]*\)[ ]*\([[:alnum:]_]*\).*;SOURCES+=\1.\2;' > $@; [ -s $@ ] || rm -f $@ $(FOBJPATH)/%$(OBJEXT): %.cpp @echo building $(basename $<)$(OBJEXT)