openbsd-ports/games/f1spirit/patches/patch-build_linux_Makefile

42 lines
1.5 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-build_linux_Makefile,v 1.1.1.1 2009/03/19 18:30:30 landry Exp $
--- build/linux/Makefile.orig Sun Aug 24 16:41:24 2008
+++ build/linux/Makefile Sat Mar 7 12:48:50 2009
@@ -1,11 +1,11 @@
EXE = f1spirit
SRC = sources
-PREFIX = /usr
+PREFIX ?= /usr
EXTRADIR = ./build/linux
-GAMEDIR = $(PREFIX)/games
+GAMEDIR = $(PREFIX)/bin
STARTUP = $(GAMEDIR)/$(EXE)
-BINDIR = $(PREFIX)/share/games/$(EXE)
+BINDIR = $(PREFIX)/share/$(EXE)
ICNDIR = $(PREFIX)/share/pixmaps
APPDIR = $(PREFIX)/share/applications
@@ -38,10 +38,10 @@ OBJS = \
$(SRC)/Vector.o $(SRC)/weather.o \
$(SRC)/filehandling.o $(SRC)/CarEngineSound.o
-CC = gcc
+CC ?= gcc
#CFLAGS = -g3 -O3 -Wall `sdl-config --cflags` `curl-config --cflags` -I/usr/X11R6/include
-CFLAGS = -g3 -O3 `sdl-config --cflags` `curl-config --cflags` -I/usr/X11R6/include
-LDFLAGS = `sdl-config --libs` `curl-config --libs` -L/usr/X11R6/lib/ -lSDL_image -lSDL_mixer -lSDL_net -lGL -lGLU
+CFLAGS += -g -O2 `sdl-config --cflags` `curl-config --cflags` -I/usr/X11R6/include
+LDFLAGS += `sdl-config --libs` `curl-config --libs` -L/usr/X11R6/lib/ -lSDL_image -lSDL_mixer -lSDL_net -lGL -lGLU
RM = rm -f
CP = cp -r
MD = mkdir -p
@@ -70,7 +70,7 @@ install: all
@$(CP) "$(EXE)" $(DATA) "$(BINDIR)"
@$(ECHO) " o Creating startup script $(STARTUP)"
@$(MD) "$(GAMEDIR)"
- @$(ECHO) "cd \"$(BINDIR)\"; ./$(EXE); cd -" >"$(STARTUP)"
+ @$(ECHO) "cd \"${TRUEPREFIX}/share/${EXE}\"; ./$(EXE); cd -" >"$(STARTUP)"
@$(CHMOD) 755 "$(STARTUP)"
@$(ECHO) " o Creating application menu entry"
@$(MD) "$(ICNDIR)"