freebsd-ports/games/el/files/patch-Makefile.bsd
Jose Alonso Cardenas Marquez fe7a2e6e1a - Update to 1.9.2
- Add ELSOUND and ELMUSIC options. It installs additional sound and music files
- Remove Makefile.linux patch file
- Re-add Makefile.bsd patch file
- Respect CC/CXX/LINK [1]
- Few others modifications

PR:	161561
Submitted by:	Nali Toja <nalitoja __ at __ gmail.com> [1]
2011-10-20 17:47:59 +00:00

49 lines
2.4 KiB
Text

--- Makefile.bsd.orig 2011-10-20 11:30:54.000000000 -0500
+++ Makefile.bsd 2011-10-20 11:40:50.000000000 -0500
@@ -2,17 +2,19 @@
-include make.conf
+XDIR=-L$(LOCALBASE)/lib
+
# basic compiling and linking - rarely changed
OPTIONS = -DBSD -DUSE_FILE32API -DELC $(foreach FEATURE, $(FEATURES), -D$(FEATURE)) -D_7ZIP_ST
-CFLAGS=$(PLATFORM) $(CWARN) -O0 -ggdb -pipe $(OPTIONS) $(shell sdl-config --cflags) $(shell xml2-config --cflags) -fno-strict-aliasing $(EXTRA_INCLUDES)
-_CFLAGS=$(PLATFORM) -O2 -fomit-frame-pointer -ffast-math -pipe $(OPTIONS) $(shell sdl-config --cflags) $(shell xml2-config --cflags) -fno-strict-aliasing $(EXTRA_INCLUDES)
-CXXFLAGS=$(PLATFORM) $(CXXWARN) -O0 -ggdb -pipe $(OPTIONS) $(shell sdl-config --cflags) $(shell xml2-config --cflags) -fno-strict-aliasing $(EXTRA_INCLUDES)
-_CXXFLAGS=$(PLATFORM) -O3 -fomit-frame-pointer -ffast-math -pipe $(OPTIONS) $(shell sdl-config --cflags) $(shell xml2-config --cflags) -fno-strict-aliasing $(EXTRA_INCLUDES)
+CFLAGS+=$(CWARN) $(OPTIONS) `$(SDL_CONFIG) --cflags` $(shell xml2-config --cflags) -fno-strict-aliasing $(EXTRA_INCLUDES)
+_CFLAGS=-fomit-frame-pointer -ffast-math -pipe $(OPTIONS) `$(SDL_CONFIG) --cflags` $(shell xml2-config --cflags) -fno-strict-aliasing $(EXTRA_INCLUDES)
+CXXFLAGS+=$(CXXWARN) $(OPTIONS) `$(SDL_CONFIG) --cflags` $(shell xml2-config --cflags) -fno-strict-aliasing $(EXTRA_INCLUDES)
+_CXXFLAGS=-fomit-frame-pointer -ffast-math $(OPTIONS) `$(SDL_CONFIG) --cflags` $(shell xml2-config --cflags) -fno-strict-aliasing $(EXTRA_INCLUDES)
PNG_SCREENSHOT_LIBS = -lpng
-LDFLAGS=$(shell sdl-config --libs) $(shell xml2-config --libs) -lSDL_net -lSDL_image -lopenal $(XDIR) -lGL -lGLU -lcal3d -lm $(EXTRA_LIBS) -lz -lpng -lvorbis -lvorbisfile \
+LDFLAGS+=`$(SDL_CONFIG) --libs` $(shell xml2-config --libs) -lSDL_net -lSDL_image -lopenal $(XDIR) -lGL -lGLU -lcal3d -lm $(EXTRA_LIBS) -lz -lpng -lvorbis -lvorbisfile \
$(foreach FEATURE, $(FEATURES), $($(FEATURE)_LIBS))
-_LDFLAGS=$(XDIR) -lGL -lpthread -lstdc++
+_LDFLAGS=$(XDIR) -lGL -pthread -lstdc++
# This works on Ubuntu 8.04 (LTS) at least
# Install these packages in addition to those required for a standard build
@@ -87,16 +89,16 @@
DEP_FILES=$(foreach OBJ, $(COBJS), .deps/$(OBJ).P) $(foreach OBJ, $(CXXOBJS), .deps/$(OBJ).P)
#(shell echo $OBJ |sed s/\.o/\.P/))
-EXE=el.x86.bsd.bin
+EXE=el.bin
ifndef CC
-CC=gcc
+CC?=gcc
endif
ifndef CXX
-CXX=g++
+CXX?=g++
endif
ifndef LINK
-LINK=gcc
+LINK?=$(CC)
endif
all: $(EXE)