--- src/game/Makefile.orig 2021-01-28 17:44:39 UTC +++ src/game/Makefile @@ -32,18 +32,18 @@ SDLCONF_L := $(shell ${SDL_CONF} --libs) #--------------------- # the compiler options -CC := gcc -INC := -I. -I.. -I../enet/include ${SDLCONF_I} -I./extensions -I./file_formats -I./platform -LDFLAGS := ${SDLCONF_L} -L../enet/lib -lSDL_ttf -lSDL_mixer -lGL -lGLU -lSDL_image -lphysfs -lenet +CC ?= gcc +INC := -I. -I.. -isystem${LOCALBASE}/include ${SDLCONF_I} -I./extensions -I./file_formats -I./platform +LDFLAGS := ${SDLCONF_L} -L${LOCALBASE}/lib -lSDL_ttf -lSDL_mixer -lGL -lGLU -lSDL_image -lphysfs -lenet -lm # use different options if the environmental variable PREFIX is defined ifdef ($(PREFIX),"") OPT := -Os -Wall else - OPT := -Os -Wall -DPREFIX=\"${PREFIX}\" -D_NIX_PREFIX + OPT := -Wall -DPREFIX=\"${PREFIX}\" -D_NIX_PREFIX endif -CFLAGS := ${OPT} ${INC} +CFLAGS += ${OPT} ${INC} #------------------------------------ # definitions of the target projects