freebsd-ports/games/egoboo/files/patch-game-Makefile.unix
Tijl Coosemans 216b5a285f - Fix missing library problems when the linker enforces explicit linking
PR:		192062
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2014-08-26 14:06:08 +00:00

29 lines
1,005 B
Text

--- Makefile.unix.orig 2008-01-02 00:35:35.000000000 +0300
+++ Makefile.unix 2008-02-07 04:07:36.000000000 +0300
@@ -1,5 +1,4 @@
# note if you change the prefix also update egoboo.sh
-PREFIX := /usr
EGO_SRC := camera.c char.c Client.c Clock.c common-file.c configfile.c \
egoboostrutil.c enchant.c Font.c game.c gltexture.c graphicfan.c \
graphicmad.c graphic.c graphicprt.c id_normals.c input.c \
@@ -12,15 +11,15 @@
../enet/unix.c
ENET_OBJ := ${ENET_SRC:.c=.o}
-SDL_CONF := sdl-config
+SDL_CONF := ${SDL_CONFIG}
SDLCONF_I := $(shell ${SDL_CONF} --cflags)
SDLCONF_L := $(shell ${SDL_CONF} --libs)
-CC := gcc
+CC ?= gcc
OPT := -Os
-INC := -I. -I.. ${SDLCONF_I}
-CFLAGS := ${OPT} ${INC}
-LDFLAGS := ${SDLCONF_L} -lSDL_ttf -lSDL_mixer -lSDL_image -lGL -lGLU
+INC := -I. -I.. ${SDLCONF_I} -I${LOCALBASE}/include
+CFLAGS += ${INC}
+LDFLAGS := ${SDLCONF_L} -L${LOCALBASE}/lib -lSDL_ttf -lSDL_mixer -lSDL_image -lGL -lGLU -lm
EGO_BIN := egoboo