freebsd-ports/games/cube/files/patch-Makefile
Stanislav Sedov 9385619205 - Unbroke
- Use enet from ports collection rather than from cube distribution
  to benefit from local patches [1]
- Fix OPTIONS checking to allow BATCH building
- Fix PLIST_SUB to generate correct pkg-plist when SERVER or CLIENT
  not selected
- Add KNOB to build with optimized CFLAGS, also guarantee CFLAGS safety
- CXX safety
- Guarantee permissions safety by using INSTALL instead of CP [2]
- Bump up PORTREVISION because of [1] and [2]

Approved by:	sem (mentor)
2006-09-24 12:31:43 +00:00

38 lines
1.1 KiB
Text

--- Makefile.orig Sat Sep 23 23:51:57 2006
+++ Makefile Sat Sep 23 23:54:39 2006
@@ -1,8 +1,8 @@
-CXX=g++
-CXXOPTFLAGS=-Wall -O3 -fsigned-char -fomit-frame-pointer
-CXXFLAGS=$(CXXOPTFLAGS) -I../enet/include `sdl-config --cflags`
+CXX?=g++
+CXXOPTFLAGS=-Wall
+CXXFLAGS+=$(CXXOPTFLAGS) -I$(LOCALBASE)/include `$(SDL_CONFIG) --cflags` -I$(X11BASE)/include
-CLIENT_LIBS=-L../enet -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL -lGLU
+CLIENT_LIBS=-L$(LOCALBASE)/lib -lenet `$(SDL_CONFIG) --libs` -lSDL_image -lSDL_mixer -lz -L$(X11BASE)/lib -lGL -lGLU
CLIENT_OBJS= \
client.o \
clientextras.o \
@@ -37,7 +37,7 @@
worldocull.o \
worldrender.o
-SERVER_LIBS=-L../enet -lenet
+SERVER_LIBS=-L$(LOCALBASE)/lib -lenet
SERVER_OBJS= \
standalone.o \
serverms.o \
@@ -49,11 +49,11 @@
all: enet client server
enet:
- -make -C ../enet all
+ -$(MAKE) -C ../enet all
clean:
-rm -f $(SERVER_OBJS) $(CLIENT_OBJS) cube_server cube_client
- -make -C ../enet/ clean
+ -$(MAKE) -C ../enet/ clean
standalone.o:
$(CXX) $(CXXFLAGS) -DSTANDALONE -o standalone.o -c serverutil.cpp