79 lines
2.4 KiB
Diff
79 lines
2.4 KiB
Diff
commit dc89402ef3305202a2ec51e6c2c073bb1f65fb54
|
|
Author: hasufell <hasufell@gentoo.org>
|
|
Date: Wed Jul 10 01:25:27 2013 +0200
|
|
|
|
respect CFLAGS/LDFLAGS
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
index 3c134d5..54989f3 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -213,7 +213,7 @@ ifeq ($(PLATFORM),linux)
|
|
endif
|
|
endif
|
|
|
|
- BASE_CFLAGS = -Wall -Wimplicit -Wstrict-prototypes -pipe
|
|
+ BASE_CFLAGS = -Wall -Wimplicit -Wstrict-prototypes
|
|
|
|
ifeq ($(USE_OPENAL),1)
|
|
BASE_CFLAGS += -DUSE_OPENAL=1
|
|
@@ -238,18 +238,17 @@ ifeq ($(PLATFORM),linux)
|
|
else
|
|
BASE_CFLAGS += -I/usr/X11R6/include
|
|
endif
|
|
- #Anything more then -O2 and *mmx *msse/2/ causes hitching with urbanterror\
|
|
-#also -march is illrelavent unless you know your target cpu
|
|
- OPTIMIZE = -O2 -mmmx -msse -msse2 -msse3
|
|
+ # what an idiotic comment
|
|
+ OPTIMIZE =
|
|
#having x86_x64 implys having full SSE support up to SSE3 so we will use it,\
|
|
#for old cpus we don't care because anything pre Pentium 4/Althlon 1600+ won't run UrbanTerror
|
|
ifeq ($(ARCH),x86_64)
|
|
- OPTIMIZE = -O2 -msse -msse2 -msse3
|
|
+ OPTIMIZE =
|
|
# experimental x86_64 jit compiler! you need GNU as
|
|
HAVE_VM_COMPILED = true
|
|
else
|
|
ifeq ($(ARCH),i386)
|
|
- OPTIMIZE = -O2 -mmmx
|
|
+ OPTIMIZE =
|
|
|
|
HAVE_VM_COMPILED=true
|
|
else
|
|
@@ -264,7 +263,7 @@ ifeq ($(PLATFORM),linux)
|
|
BASE_CFLAGS += -DNO_VM_COMPILED
|
|
endif
|
|
|
|
- DEBUG_CFLAGS = $(BASE_CFLAGS) -g -O0 -wall
|
|
+ DEBUG_CFLAGS = $(BASE_CFLAGS) $(OPTIMIZE)
|
|
|
|
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
|
|
|
|
@@ -273,7 +272,7 @@ ifeq ($(PLATFORM),linux)
|
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
|
|
|
THREAD_LDFLAGS=-lpthread
|
|
- LDFLAGS=-ldl -lm
|
|
+ LDFLAGS+=-ldl -lm
|
|
|
|
ifeq ($(USE_SDL),1)
|
|
CLIENT_LDFLAGS=$(shell sdl-config --libs)
|
|
@@ -1157,13 +1156,13 @@ endif
|
|
|
|
$(B)/Quake3-UrT.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN)
|
|
$(echo_cmd) "LD $@"
|
|
- $(Q)$(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(CLIENT_LDFLAGS) \
|
|
- $(LDFLAGS) $(LIBSDLMAIN)
|
|
+ $(Q)$(CC) $(CFLAGS) -o $@ $(Q3OBJ) $(Q3POBJ) \
|
|
+ $(LDFLAGS) $(CLIENT_LDFLAGS) $(LIBSDLMAIN)
|
|
|
|
$(B)/Quake3-UrT-smp.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN)
|
|
$(echo_cmd) "LD $@"
|
|
- $(Q)$(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(CLIENT_LDFLAGS) \
|
|
- $(THREAD_LDFLAGS) $(LDFLAGS) $(LIBSDLMAIN)
|
|
+ $(Q)$(CC) $(CFLAGS) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) \
|
|
+ $(LDFLAGS) $(THREAD_LDFLAGS) $(CLIENT_LDFLAGS) $(LIBSDLMAIN)
|
|
|
|
ifneq ($(strip $(LIBSDLMAIN)),)
|
|
ifneq ($(strip $(LIBSDLMAINSRC)),)
|