1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00
freebsd-ports/games/vavoom/files/patch-Makefile

119 lines
3.0 KiB
Plaintext
Raw Normal View History

--- 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
@@ -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 $@ $<