This commit is contained in:
Ludwig Nussel 2005-08-28 17:21:46 +00:00
parent c366bdea07
commit b603a047f5

View file

@ -19,6 +19,16 @@
PLATFORM=$(shell uname|tr A-Z a-z) PLATFORM=$(shell uname|tr A-Z a-z)
PLATFORM_RELEASE=$(shell uname -r) PLATFORM_RELEASE=$(shell uname -r)
ARCH=$(shell uname -m)
ifeq ($(ARCH),i486)
ARCH=i386
endif
ifeq ($(ARCH),i586)
ARCH=i386
endif
ifeq ($(ARCH),i686)
ARCH=i386
endif
### ###
### These paths are where you probably want to change things ### These paths are where you probably want to change things
@ -83,40 +93,17 @@ DLL_ONLY=false
LIB=lib LIB=lib
ifeq ($(PLATFORM),linux) ifeq ($(PLATFORM),linux)
ifneq (,$(findstring libc6,$(shell if [ -e /lib/libc.so.6* ];then echo libc6;fi))) GLIBC=-glibc
GLIBC=-glibc CC=gcc
else CXX=g++
GLIBC=
endif #libc6 test
ifneq (,$(findstring alpha,$(shell uname -m))) RPMARCH=$(ARCH)
ifeq ($(ARCH),alpha)
ARCH=axp ARCH=axp
RPMARCH=alpha
VENDOR=dec
else else
ifneq (,$(findstring ppc,$(shell uname -m))) ifeq ($(ARCH),x86_64)
#used for linux builds LIB=lib64
MESADIR=/usr/src/DRI-CVS/xc/xc/ endif
ARCH=ppc
RPMARCH=ppc
VENDOR=unknown
DLL_ONLY=true
else
ifneq (,$(findstring x86_64,$(shell uname -m)))
MESADIR=../Mesa/
ARCH=x86_64
RPMARCH=x86_64
VENDOR=unknown
DLL_ONLY=false
LIB=lib64
else #default to i386
MESADIR=../Mesa/
ARCH=i386
RPMARCH=i386
VENDOR=unknown
DLL_ONLY=false
endif
endif
endif endif
# bk001205: no mo' -I/usr/include/glide, no FX # bk001205: no mo' -I/usr/include/glide, no FX
@ -127,8 +114,6 @@ ifeq ($(PLATFORM),linux)
BASE_CFLAGS += -DDLL_ONLY BASE_CFLAGS += -DDLL_ONLY
endif endif
#GL_CFLAGS = -I$(MESADIR)/include -I/usr/X11R6/include
GL_CFAGS = -I/usr/X11R6/include GL_CFAGS = -I/usr/X11R6/include
# bk001204 - need -O for -Wall for uninitialized # bk001204 - need -O for -Wall for uninitialized
@ -138,33 +123,16 @@ ifeq ($(PLATFORM),linux)
DEBUG_CFLAGS = $(BASE_CFLAGS) -g DEBUG_CFLAGS = $(BASE_CFLAGS) -g
DEBUG_CFLAGS += -DNO_MOUSEGRAB DEBUG_CFLAGS += -DNO_MOUSEGRAB
DEBUG_CFLAGS += -O0 DEBUG_CFLAGS += -O0
# DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -O OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
ifeq ($(ARCH),axp) ifeq ($(ARCH),x86_64)
CC=pgcc OPTIMIZE = -O3 -fomit-frame-pointer -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fstrength-reduce
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
else else
ifeq ($(ARCH),ppc) ifeq ($(ARCH),i386)
NEWPGCC=/loki/global/ppc/bin/gcc OPTIMIZE = -O3 -march=i686 -fomit-frame-pointer -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
CC=$(NEWPGCC)
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce
endif
ifeq ($(ARCH),x86_64)
CC=gcc
CXX=g++
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -fomit-frame-pointer -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
else
#NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc # bk001205
#NEWPGCC=/loki/global/x86/bin/gcc
CC=gcc
CXX=g++
# TTimo: legacy RELEASE_CFLAGS
# NOTE: the -fomit-frame-pointer option leads to an unstable binary on my test box if it was built on the main box
# but building on the Mdk 7.2 baseline seems to work
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -march=i686 -fomit-frame-pointer -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
# TTimo: use this for building on P3 gcc 2.95.3 libc2.2 for all targets (experimental! -fomit-fram-pointer removed)
# RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro -march=pentium -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce
endif
endif endif
endif
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
LIBEXT=a LIBEXT=a
@ -222,17 +190,15 @@ GLIBC= #libc is irrelevant
ifneq (,$(findstring alpha,$(shell uname -m))) ifneq (,$(findstring alpha,$(shell uname -m)))
ARCH=axp ARCH=axp
RPMARCH=alpha RPMARCH=alpha
VENDOR=dec
else #default to i386 else #default to i386
ARCH=i386 ARCH=i386
RPMARCH=i386 RPMARCH=i386
VENDOR=unknown
endif #alpha test endif #alpha test
BASE_CFLAGS = -pipe BASE_CFLAGS = -pipe
GL_CFLAGS = -I$(MESADIR)/include -I/usr/X11R6/include GL_CFLAGS = -I/usr/X11R6/include
DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -Werror DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -Werror
ifeq ($(ARCH),axp) ifeq ($(ARCH),axp)
@ -285,7 +251,6 @@ else # ifeq freebsd
ifeq ($(PLATFORM),irix) ifeq ($(PLATFORM),irix)
ARCH=mips #default to MIPS ARCH=mips #default to MIPS
VENDOR=sgi
GLIBC= #libc is irrelevant GLIBC= #libc is irrelevant
CC=cc CC=cc