Lines 1-22
Link Here
|
1 |
--- Makefile.orig 2009-08-30 19:33:49.000000000 +0200 |
1 |
--- Makefile.orig 2009-04-22 20:54:48.000000000 +0200 |
2 |
+++ Makefile 2009-09-01 23:28:34.000000000 +0200 |
2 |
+++ Makefile 2009-12-08 11:38:10.000000000 +0100 |
3 |
@@ -17,6 +17,15 @@ |
3 |
@@ -521,15 +521,22 @@ |
4 |
COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/i386/) |
|
|
5 |
endif |
6 |
|
7 |
+ifeq ($(COMPILE_PLATFORM),freebsd) |
8 |
+ ifeq ($(COMPILE_ARCH),amd64) |
9 |
+ COMPILE_ARCH=x86_64 |
10 |
+ endif |
11 |
+ ifeq ($(COMPILE_ARCH),i386) |
12 |
+ COMPILE_ARCH=x86 |
13 |
+ endif |
14 |
+endif |
15 |
+ |
16 |
ifeq ($(COMPILE_PLATFORM),mingw32) |
17 |
ifeq ($(COMPILE_ARCH),i386) |
18 |
COMPILE_ARCH=x86 |
19 |
@@ -521,15 +530,35 @@ |
20 |
|
4 |
|
21 |
ifeq ($(PLATFORM),freebsd) |
5 |
ifeq ($(PLATFORM),freebsd) |
22 |
|
6 |
|
Lines 25-94
Link Here
|
25 |
- else #default to i386 |
9 |
- else #default to i386 |
26 |
- ARCH=i386 |
10 |
- ARCH=i386 |
27 |
- endif #alpha test |
11 |
- endif #alpha test |
28 |
+ FREEBSD_ARCH = $(ARCH) |
12 |
- |
29 |
+ ifeq ($(ARCH),amd64) |
13 |
- |
30 |
+ ARCH = x86_64 |
14 |
- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ |
31 |
+ endif |
|
|
32 |
+ ifeq ($(ARCH),i386) |
33 |
+ ARCH = x86 |
34 |
+ endif |
35 |
+ |
36 |
+ ifeq ($(FREEBSD_ARCH),x86_64) |
37 |
+ FREEBSD_ARCH = amd64 |
38 |
+ endif |
39 |
+ ifeq ($(FREEBSD_ARCH),x86) |
40 |
+ FREEBSD_ARCH = i386 |
41 |
+ endif |
42 |
|
43 |
+ ifndef HOMEPATH |
44 |
+ HOMEPATH = /.ioquake3 |
45 |
+ endif |
46 |
+ |
47 |
+ ifndef DEFAULT_LIBDIR |
48 |
+ DEFAULT_LIBDIR = /usr/local/lib/ioquake3 |
49 |
+ endif |
50 |
|
51 |
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ |
52 |
- -DUSE_ICON $(shell sdl-config --cflags) |
15 |
- -DUSE_ICON $(shell sdl-config --cflags) |
53 |
+ -DUSE_ICON $(shell sdl-config --cflags) -DMAP_ANONYMOUS=MAP_ANON \ |
16 |
+ ifndef HOMEPATH |
54 |
+ -DHOMEPATH=\\\"$(HOMEPATH)\\\" \ |
17 |
+ HOMEPATH = /.ioquake3 |
55 |
+ -DDEFAULT_LIBDIR=\\\"$(DEFAULT_LIBDIR)\\\" \ |
18 |
+ endif |
56 |
+ $(shell make -f /dev/null -VCFLAGS MACHINE_ARCH=$(FREEBSD_ARCH)) |
19 |
+ |
57 |
+ |
20 |
+ ifndef DEFAULT_LIBDIR |
|
|
21 |
+ DEFAULT_LIBDIR = /usr/local/lib/ioquake3 |
22 |
+ endif |
23 |
+ |
24 |
+ BASE_CFLAGS = $(shell env MACHINE_ARCH=$(ARCH) make -f /dev/null -VCFLAGS) \ |
25 |
+ -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ |
26 |
+ -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON \ |
27 |
+ -DHOMEPATH=\\\"$(HOMEPATH)\\\" \ |
28 |
+ -DDEFAULT_LIBDIR=\\\"$(DEFAULT_LIBDIR)\\\" |
29 |
+ CLIENT_CFLAGS = $(SDL_CFLAGS) |
30 |
+ SERVER_CFLAGS = |
31 |
+ HAVE_VM_COMPILED = true |
58 |
|
32 |
|
59 |
ifeq ($(USE_OPENAL),1) |
33 |
ifeq ($(USE_OPENAL),1) |
60 |
BASE_CFLAGS += -DUSE_OPENAL |
34 |
BASE_CFLAGS += -DUSE_OPENAL |
61 |
@@ -547,9 +576,22 @@ |
35 |
@@ -542,24 +549,6 @@ |
62 |
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \ |
36 |
BASE_CFLAGS += -DUSE_CODEC_VORBIS |
63 |
-fomit-frame-pointer -fexpensive-optimizations |
37 |
endif |
64 |
else |
38 |
|
|
|
39 |
- ifeq ($(ARCH),axp) |
40 |
- BASE_CFLAGS += -DNO_VM_COMPILED |
41 |
- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \ |
42 |
- -fomit-frame-pointer -fexpensive-optimizations |
43 |
- else |
65 |
- ifeq ($(ARCH),i386) |
44 |
- ifeq ($(ARCH),i386) |
66 |
- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \ |
45 |
- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \ |
67 |
- -march=pentium -fomit-frame-pointer -pipe -ffast-math \ |
46 |
- -march=pentium -fomit-frame-pointer -pipe -ffast-math \ |
68 |
+ ifeq ($(ARCH),x86) |
47 |
- -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ |
|
|
48 |
- -funroll-loops -fstrength-reduce |
49 |
- HAVE_VM_COMPILED=true |
50 |
- else |
51 |
- BASE_CFLAGS += -DNO_VM_COMPILED |
52 |
- endif |
53 |
- endif |
54 |
- |
55 |
- DEBUG_CFLAGS=$(BASE_CFLAGS) -g |
56 |
- |
57 |
SHLIBEXT=so |
58 |
SHLIBCFLAGS=-fPIC |
59 |
SHLIBLDFLAGS=-shared $(LDFLAGS) |
60 |
@@ -582,6 +571,27 @@ |
61 |
CLIENT_LIBS += -lvorbisfile -lvorbis -logg |
62 |
endif |
63 |
|
64 |
+ ifeq ($(ARCH),i386) |
69 |
+ ifeq ($(CROSS_COMPILING),1) |
65 |
+ ifeq ($(CROSS_COMPILING),1) |
70 |
+ BASE_CFLAGS += -m32 |
66 |
+ BASE_CFLAGS += -m32 |
71 |
+ endif |
67 |
+ endif |
72 |
+ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 \ |
68 |
+ endif |
73 |
+ -fomit-frame-pointer -pipe -ffast-math \ |
69 |
+ ifeq ($(ARCH),amd64) |
74 |
+ -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ |
|
|
75 |
+ -funroll-loops -fstrength-reduce |
76 |
+ HAVE_VM_COMPILED=true |
77 |
+ else |
78 |
+ ifeq ($(ARCH),x86_64) |
79 |
+ ifeq ($(CROSS_COMPILING),1) |
70 |
+ ifeq ($(CROSS_COMPILING),1) |
80 |
+ BASE_CFLAGS += -m64 |
71 |
+ BASE_CFLAGS += -m64 |
81 |
+ endif |
72 |
+ endif |
82 |
+ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 \ |
73 |
+ endif |
83 |
+ -fomit-frame-pointer -pipe -ffast-math \ |
74 |
+ |
84 |
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \ |
75 |
+ ifeq ($(BUILD_CLIENT),1) |
85 |
-funroll-loops -fstrength-reduce |
76 |
+ BASE_CFLAGS += $(CLIENT_CFLAGS) |
86 |
HAVE_VM_COMPILED=true |
77 |
+ endif |
87 |
@@ -557,6 +599,7 @@ |
78 |
+ |
88 |
BASE_CFLAGS += -DNO_VM_COMPILED |
79 |
+ RELEASE_CFLAGS = $(BASE_CFLAGS) -DNDEBUG -O3 -fomit-frame-pointer \ |
|
|
80 |
+ -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ |
81 |
+ -funroll-loops -fstrength-reduce |
82 |
+ |
83 |
+ DEBUG_CFLAGS = $(BASE_CFLAGS) -g |
84 |
+ |
85 |
else # ifeq freebsd |
86 |
|
87 |
############################################################################# |
88 |
@@ -1442,6 +1452,9 @@ |
89 |
ifeq ($(ARCH),x86_64) |
90 |
Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o |
91 |
endif |
92 |
+ ifeq ($(ARCH),amd64) |
93 |
+ Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o |
94 |
+ endif |
95 |
ifeq ($(ARCH),ppc) |
96 |
Q3OBJ += $(B)/client/vm_powerpc.o $(B)/client/vm_powerpc_asm.o |
89 |
endif |
97 |
endif |
|
|
98 |
@@ -1591,6 +1604,9 @@ |
99 |
ifeq ($(ARCH),x86_64) |
100 |
Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o |
90 |
endif |
101 |
endif |
|
|
102 |
+ ifeq ($(ARCH),amd64) |
103 |
+ Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o |
91 |
+ endif |
104 |
+ endif |
92 |
|
105 |
ifeq ($(ARCH),ppc) |
93 |
DEBUG_CFLAGS=$(BASE_CFLAGS) -g |
106 |
Q3DOBJ += $(B)/ded/vm_powerpc.o $(B)/ded/vm_powerpc_asm.o |
94 |
|
107 |
endif |