1 |
hasufell 13/01/31 22:47:17 |
2 |
|
3 |
Added: tomenet-4.5.3-makefile.patch |
4 |
Log: |
5 |
version bump |
6 |
|
7 |
(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key E73C35B3) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 games-roguelike/tomenet/files/tomenet-4.5.3-makefile.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-roguelike/tomenet/files/tomenet-4.5.3-makefile.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-roguelike/tomenet/files/tomenet-4.5.3-makefile.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: tomenet-4.5.3-makefile.patch |
16 |
=================================================================== |
17 |
--- src/makefile |
18 |
+++ src/makefile |
19 |
@@ -203,7 +203,7 @@ |
20 |
# |
21 |
# This is my compiler of choice, it seems to work most everywhere |
22 |
# |
23 |
-CC = gcc |
24 |
+CC ?= gcc |
25 |
|
26 |
# For allowing #if..#else..#endif constructs in LUA files - C. Blue |
27 |
# Note: The flags must contain |
28 |
@@ -215,16 +215,26 @@ |
29 |
# need to use the gcc invocation below instead. |
30 |
# |
31 |
# cpp variant: |
32 |
-CPP = cpp |
33 |
-CPPFLAGS = -C -P |
34 |
+#CPP = cpp |
35 |
+#CPPFLAGS = -C -P |
36 |
# gcc variant: |
37 |
-#CPP = gcc |
38 |
-#CPPFLAGS = -x c -E -Wp,-C,-P |
39 |
+CPP ?= gcc |
40 |
+CPPFLAGS = -x c -E -Wp,-C,-P |
41 |
|
42 |
|
43 |
# For variations with X11 |
44 |
X11BASE = /usr/X11R6 |
45 |
|
46 |
+# defines |
47 |
+ifdef USE_SDL |
48 |
+CFLAGS += -DSOUND_SDL $(shell sdl-config --cflags) |
49 |
+SDL_LIBS = $(shell sdl-config --libs) -lSDL_mixer |
50 |
+endif |
51 |
+ |
52 |
+ifdef USE_X |
53 |
+CFLAGS += -I${X11BASE}/include -DUSE_X11 |
54 |
+LIBS += -L${X11BASE}/lib -lX11 |
55 |
+endif |
56 |
|
57 |
## |
58 |
## Standard version -- supports X11 (main-x11.c) |
59 |
@@ -256,8 +266,9 @@ |
60 |
# attempt to "guess" at many of these flags based on your system. |
61 |
# |
62 |
## With SDL |
63 |
-CFLAGS = -g -pipe -Wall -DUSE_X11 -DUSE_GCU -I${X11BASE}/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 -DSOUND_SDL `sdl-config --cflags` |
64 |
-LIBS = -L${X11BASE}/lib -L/usr/pkg/lib -lX11 -lncurses -lcrypt -lm `sdl-config --libs` -lSDL_mixer |
65 |
+CFLAGS += -Wall |
66 |
+CFLAGS += -DUSE_GCU -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 |
67 |
+LIBS += -L/usr/pkg/lib -lncurses -lcrypt -lm ${SDL_LIBS} |
68 |
## |
69 |
## Without SDL |
70 |
#CFLAGS = -g -pipe -Wall -DUSE_X11 -DUSE_GCU -I${X11BASE}/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 |
71 |
@@ -357,9 +368,6 @@ |
72 |
# Compile a client with 'test client' version/tag |
73 |
tomenet.test: CFLAGS += -DTEST_CLIENT -O0 |
74 |
|
75 |
-# Normal release build |
76 |
-tomenet: CFLAGS += -O2 |
77 |
- |
78 |
|
79 |
# Lua |
80 |
SRCS += $(LUASRCS) |