Add definitions for the 'sun' platform (SUN Solaris)

This commit is contained in:
Stas Degteff 2006-01-18 20:49:36 +00:00
parent 916932b31d
commit 7d80791ad3
2 changed files with 30 additions and 2 deletions

View File

@ -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

View File

@ -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)