Changeset View
Changeset View
Standalone View
Standalone View
head/games/openarena/files/patch-Makefile
--- Makefile.orig 2011-12-13 02:48:49.000000000 +0400 | --- Makefile.orig 2011-12-12 22:48:49 UTC | ||||
+++ Makefile 2015-09-30 17:16:31.951089000 +0300 | +++ Makefile | ||||
@@ -205,6 +205,8 @@ | @@ -205,6 +205,8 @@ ifneq ($(BUILD_CLIENT),0) | ||||
OPENAL_LIBS=$(shell pkg-config --silence-errors --libs openal) | OPENAL_LIBS=$(shell pkg-config --silence-errors --libs openal) | ||||
SDL_CFLAGS=$(shell pkg-config --silence-errors --cflags sdl|sed 's/-Dmain=SDL_main//') | SDL_CFLAGS=$(shell pkg-config --silence-errors --cflags sdl|sed 's/-Dmain=SDL_main//') | ||||
SDL_LIBS=$(shell pkg-config --silence-errors --libs sdl) | SDL_LIBS=$(shell pkg-config --silence-errors --libs sdl) | ||||
+ VORBIS_CFLAGS=$(shell pkg-config --silence-errors --cflags vorbis vorbisfile) | + VORBIS_CFLAGS=$(shell pkg-config --silence-errors --cflags vorbis vorbisfile) | ||||
+ VORBIS_LIBS=$(shell pkg-config --silence-errors --libs vorbis vorbisfile) | + VORBIS_LIBS=$(shell pkg-config --silence-errors --libs vorbis vorbisfile) | ||||
endif | endif | ||||
# Use sdl-config if all else fails | # Use sdl-config if all else fails | ||||
ifeq ($(SDL_CFLAGS),) | ifeq ($(SDL_CFLAGS),) | ||||
@@ -570,9 +572,15 @@ | @@ -570,9 +572,15 @@ else # ifeq mingw32 | ||||
ifeq ($(PLATFORM),freebsd) | ifeq ($(PLATFORM),freebsd) | ||||
+ # system integration | + # system integration | ||||
+ ifndef DEFAULT_LIBDIR | + ifndef DEFAULT_LIBDIR | ||||
+ DEFAULT_LIBDIR = /usr/local/lib/openarena | + DEFAULT_LIBDIR = /usr/local/lib/openarena | ||||
+ endif | + endif | ||||
+ | + | ||||
# flags | # flags | ||||
BASE_CFLAGS = $(shell env MACHINE_ARCH=$(ARCH) make -f /dev/null -VCFLAGS) \ | BASE_CFLAGS = $(shell env MACHINE_ARCH=$(ARCH) make -f /dev/null -VCFLAGS) \ | ||||
-Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ | -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ | ||||
+ -DDEFAULT_LIBDIR=\\\"$(DEFAULT_LIBDIR)\\\" \ | + -DDEFAULT_LIBDIR=\\\"$(DEFAULT_LIBDIR)\\\" \ | ||||
-DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON | -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON | ||||
CLIENT_CFLAGS = $(SDL_CFLAGS) | CLIENT_CFLAGS = $(SDL_CFLAGS) | ||||
SERVER_CFLAGS = | SERVER_CFLAGS = | ||||
@@ -595,27 +603,24 @@ | @@ -595,27 +603,24 @@ ifeq ($(PLATFORM),freebsd) | ||||
# optional features/libraries | # optional features/libraries | ||||
ifeq ($(USE_OPENAL),1) | ifeq ($(USE_OPENAL),1) | ||||
- CLIENT_CFLAGS += -DUSE_OPENAL | - CLIENT_CFLAGS += -DUSE_OPENAL | ||||
+ CLIENT_CFLAGS += -DUSE_OPENAL $(OPENAL_CFLAGS) | + CLIENT_CFLAGS += -DUSE_OPENAL $(OPENAL_CFLAGS) | ||||
+ CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS) | + CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS) | ||||
ifeq ($(USE_OPENAL_DLOPEN),1) | ifeq ($(USE_OPENAL_DLOPEN),1) | ||||
CLIENT_CFLAGS += -DUSE_OPENAL_DLOPEN | CLIENT_CFLAGS += -DUSE_OPENAL_DLOPEN | ||||
Show All 17 Lines | |||||
- | - | ||||
- ifeq ($(USE_CODEC_VORBIS),1) | - ifeq ($(USE_CODEC_VORBIS),1) | ||||
- CLIENT_LIBS += -lvorbisfile -lvorbis -logg | - CLIENT_LIBS += -lvorbisfile -lvorbis -logg | ||||
+ CLIENT_CFLAGS += -DUSE_CODEC_VORBIS $(VORBIS_CFLAGS) | + CLIENT_CFLAGS += -DUSE_CODEC_VORBIS $(VORBIS_CFLAGS) | ||||
+ CLIENT_LIBS += $(VORBIS_LIBS) | + CLIENT_LIBS += $(VORBIS_LIBS) | ||||
endif | endif | ||||
# cross-compiling tweaks | # cross-compiling tweaks | ||||
@@ -897,7 +902,7 @@ | @@ -897,7 +902,7 @@ ifeq ($(USE_VOIP),1) | ||||
CLIENT_CFLAGS += -DUSE_VOIP | CLIENT_CFLAGS += -DUSE_VOIP | ||||
SERVER_CFLAGS += -DUSE_VOIP | SERVER_CFLAGS += -DUSE_VOIP | ||||
ifeq ($(USE_INTERNAL_SPEEX),1) | ifeq ($(USE_INTERNAL_SPEEX),1) | ||||
- CLIENT_CFLAGS += -DFLOATING_POINT -DUSE_ALLOCA -I$(SPEEXDIR)/include | - CLIENT_CFLAGS += -DFLOATING_POINT -DUSE_ALLOCA -I$(SPEEXDIR)/include | ||||
+ CLIENT_CFLAGS := -I$(SPEEXDIR)/include -DFLOATING_POINT -DUSE_ALLOCA $(CLIENT_CFLAGS) | + CLIENT_CFLAGS := -I$(SPEEXDIR)/include -DFLOATING_POINT -DUSE_ALLOCA $(CLIENT_CFLAGS) | ||||
else | else | ||||
CLIENT_LIBS += -lspeex -lspeexdsp | CLIENT_LIBS += -lspeex -lspeexdsp | ||||
endif | endif |