diff options
Diffstat (limited to 'games/vavoom/files/patch-Makefile')
-rw-r--r-- | games/vavoom/files/patch-Makefile | 214 |
1 files changed, 99 insertions, 115 deletions
diff --git a/games/vavoom/files/patch-Makefile b/games/vavoom/files/patch-Makefile index 9906f395f472..a4035167a959 100644 --- a/games/vavoom/files/patch-Makefile +++ b/games/vavoom/files/patch-Makefile @@ -1,118 +1,102 @@ --- Makefile.orig +++ Makefile -@@ -8,7 +8,7 @@ - #DEBUG = 1
-
- # Uncomment to compile using SDL
--#USE_SDL = 1
-+USE_SDL = 1
-
- # Uncomment to compile without OpenGL driver
- #NOGL = 1
+@@ -63,7 +63,7 @@ + ifdef USE_SDL + #-- Linux with SDL -- + SYS_OBJS = \ +- obj/cd_linux.o \ ++ obj/cd_bsd.o \ + obj/d_sdl.o \ + obj/in_sdl.o \ + obj/net_bsd.o \ @@ -73,7 +73,7 @@ - obj/sys_i386.o \
- obj/sys_sdl.o
- GL_SYS_OBJ = obj/gl_sdl.o
--LIBS := `sdl-config --libs` -lSDL_mixer -lm -lstdc++
-+LIBS := `${SDL_CONFIG} --libs` -lSDL_mixer -lm -lstdc++
- else
- #-- Linux with Allegro --
- SYS_OBJS = \
-@@ -213,7 +213,7 @@ - ifdef MESAGL
- LIBS := -lMesaGL $(LIBS)
- else
--LIBS := -lGL $(LIBS)
-+LIBS := -lGL -L${X11BASE}/lib $(LIBS)
- endif
- endif
-
-@@ -317,11 +317,11 @@ -
- # ---------------------------------------
-
--ARCH ?= -march=pentiumpro
--export ARCH
--C_ARGS = -c -W -Wall $(ARCH) -ffast-math
--CPP_ARGS = -c -W -Wall $(ARCH) -ffast-math
--ASM_ARGS = -c -W -Wall $(ARCH) -x assembler-with-cpp
-+#ARCH ?= -march=pentiumpro
-+#export ARCH
-+C_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math
-+CPP_ARGS = -c ${CXXFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math
-+ASM_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -x assembler-with-cpp
- LINK_ARGS = -Wall
-
- ifdef DEBUG
-@@ -348,7 +348,7 @@ - exe: Vavoom$(EXE)
-
- Vavoom$(EXE): $(OBJ_FILES) $(LIB_FILES)
-- gcc $(LINK_ARGS) -o $@ $^ $(LIBS)
-+ ${CC} $(LINK_ARGS) -o $@ $^ $(LIBS)
-
- suid:
- chown root.root Vavoom
-@@ -358,13 +358,13 @@ - addr2line -e Vavoom -f < crash.txt >> basev/debug.txt
-
- obj/%.o : source/%.c
-- gcc $(C_ARGS) -o $@ $<
-+ ${CC} $(C_ARGS) -o $@ $<
-
- obj/%.o : source/%.cpp source/*.h
-- gcc $(CPP_ARGS) -o $@ $<
-+ ${CC} $(CPP_ARGS) -o $@ $<
-
- obj/%.o : source/%.s source/asm_i386.h
-- gcc $(ASM_ARGS) -o $@ $<
-+ ${CC} $(ASM_ARGS) -o $@ $<
-
- # ---------------------------------------
-
-@@ -381,16 +381,16 @@ - svexe: VavoomSV$(EXE)
-
- VavoomSV$(EXE): $(SV_OBJ_FILES)
-- gcc $(LINK_ARGS) -o $@ $(SV_OBJ_FILES) $(SV_LIBS)
-+ ${CC} $(LINK_ARGS) -o $@ $(SV_OBJ_FILES) $(SV_LIBS)
-
- obj/sv/%.o : source/%.c
-- gcc $(C_ARGS) -DSERVER -o $@ $<
-+ ${CC} $(C_ARGS) -DSERVER -o $@ $<
-
- obj/sv/%.o : source/%.cpp source/*.h
-- gcc $(CPP_ARGS) -DSERVER -o $@ $<
-+ ${CC} $(CPP_ARGS) -DSERVER -o $@ $<
-
- obj/sv/%.o : source/%.s
-- gcc $(ASM_ARGS) -DSERVER -o $@ $<
-+ ${CC} $(ASM_ARGS) -DSERVER -o $@ $<
-
- # ---------------------------------------
-
-@@ -433,11 +433,11 @@ - # ---------------------------------------
-
- ifndef INSTALL
--INSTALL = ginstall
-+INSTALL = install -c
- endif
-
- ifndef INSTALL_DIR
--INSTALL_DIR = /usr/local/games/Vavoom
-+INSTALL_DIR = ${DATADIR}
- endif
-
- ifndef INSTALL_GROUP
-@@ -529,8 +529,8 @@ - asm: $(ASM_FILES)
-
- source/%.asm : source/%.s source/asm_i386.h source/gas2tasm.exe
-- gcc -x assembler-with-cpp -E -P -DGAS2TASM $< -o - | source/gas2tasm.exe > $@
-+ ${CC} -x assembler-with-cpp -E -P -DGAS2TASM $< -o - | source/gas2tasm.exe > $@
-
- source/gas2tasm.exe : source/gas2tasm.c
-- gcc -O3 -ffast-math -fomit-frame-pointer -s -o $@ $<
-+ ${CC} -O3 -ffast-math -fomit-frame-pointer -s -o $@ $<
-
+ obj/sys_i386.o \ + obj/sys_sdl.o + GL_SYS_OBJ = obj/gl_sdl.o +-LIBS := `sdl-config --libs` -lSDL_mixer -lpng -lz -lm -lstdc++ ++LIBS := `${SDL_CONFIG} --libs` -lSDL_mixer -lpng -lz -lm -lstdc++ + else + #-- Linux with Allegro -- + SYS_OBJS = \ +@@ -215,7 +215,7 @@ + ifdef MESAGL + LIBS := -lMesaGL $(LIBS) + else +-LIBS := -lGL $(LIBS) ++LIBS := -lGL -L${X11BASE}/lib $(LIBS) + endif + endif + +@@ -319,11 +319,11 @@ + + # --------------------------------------- + +-ARCH ?= -march=pentiumpro +-export ARCH +-C_ARGS = -c -W -Wall $(ARCH) -ffast-math +-CPP_ARGS = -c -W -Wall $(ARCH) -ffast-math +-ASM_ARGS = -c -W -Wall $(ARCH) -x assembler-with-cpp ++#ARCH ?= -march=pentiumpro ++#export ARCH ++C_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math ++CPP_ARGS = -c ${CXXFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math ++ASM_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -x assembler-with-cpp + LINK_ARGS = -Wall + + ifdef DEBUG +@@ -350,7 +350,7 @@ + exe: Vavoom$(EXE) + + Vavoom$(EXE): $(OBJ_FILES) $(LIB_FILES) +- gcc $(LINK_ARGS) -o $@ $^ $(LIBS) ++ ${CC} $(LINK_ARGS) -o $@ $^ $(LIBS) + + suid: + chown root.root Vavoom +@@ -360,13 +360,13 @@ + addr2line -e Vavoom -f < crash.txt >> basev/debug.txt + + obj/%.o : source/%.c +- gcc $(C_ARGS) -o $@ $< ++ ${CC} $(C_ARGS) -o $@ $< + + obj/%.o : source/%.cpp source/*.h +- gcc $(CPP_ARGS) -o $@ $< ++ ${CC} $(CPP_ARGS) -o $@ $< + + obj/%.o : source/%.s source/asm_i386.h +- gcc $(ASM_ARGS) -o $@ $< ++ ${CC} $(ASM_ARGS) -o $@ $< + + # --------------------------------------- + +@@ -383,16 +383,16 @@ + svexe: VavoomSV$(EXE) + + VavoomSV$(EXE): $(SV_OBJ_FILES) +- gcc $(LINK_ARGS) -o $@ $(SV_OBJ_FILES) $(SV_LIBS) ++ ${CC} $(LINK_ARGS) -o $@ $(SV_OBJ_FILES) $(SV_LIBS) + + obj/sv/%.o : source/%.c +- gcc $(C_ARGS) -DSERVER -o $@ $< ++ ${CC} $(C_ARGS) -DSERVER -o $@ $< + + obj/sv/%.o : source/%.cpp source/*.h +- gcc $(CPP_ARGS) -DSERVER -o $@ $< ++ ${CC} $(CPP_ARGS) -DSERVER -o $@ $< + + obj/sv/%.o : source/%.s +- gcc $(ASM_ARGS) -DSERVER -o $@ $< ++ ${CC} $(ASM_ARGS) -DSERVER -o $@ $< + + # --------------------------------------- + +@@ -439,7 +439,7 @@ + endif + + ifndef INSTALL_DIR +-INSTALL_DIR = /usr/local/games/Vavoom ++INSTALL_DIR = ${DATADIR} + endif + + ifndef INSTALL_GROUP |