[iortcw] 63/152: All: Consolidate and add client support to *BSD platforms in Makefile
Simon McVittie
smcv at debian.org
Fri Sep 8 10:40:02 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.5a
in repository iortcw.
commit b40425bb9d9330fd49b42b96cec8c1224db26441
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Fri Jun 3 14:44:42 2016 -0400
All: Consolidate and add client support to *BSD platforms in Makefile
---
MP/Makefile | 75 ++++------------------------------------------
MP/code/zlib-1.2.8/ioapi.h | 2 +-
SP/Makefile | 75 ++++------------------------------------------
SP/code/zlib-1.2.8/ioapi.h | 2 +-
4 files changed, 12 insertions(+), 142 deletions(-)
diff --git a/MP/Makefile b/MP/Makefile
index 7488730..f7d8aaf 100644
--- a/MP/Makefile
+++ b/MP/Makefile
@@ -742,54 +742,10 @@ ifdef MINGW
else # ifdef MINGW
#############################################################################
-# SETUP AND BUILD -- FREEBSD
+# SETUP AND BUILD -- *BSD (is dying)
#############################################################################
-ifeq ($(PLATFORM),freebsd)
-
- # flags
- BASE_CFLAGS = $(shell env MACHINE_ARCH=$(ARCH) make -f /dev/null -VCFLAGS) \
- -Wall -fno-strict-aliasing \
- -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
- CLIENT_CFLAGS += $(SDL_CFLAGS)
-
- OPTIMIZEVM = -O3
- OPTIMIZE = $(OPTIMIZEVM) -ffast-math
-
- SHLIBEXT=so
- SHLIBCFLAGS=-fPIC
- SHLIBLDFLAGS=-shared $(LDFLAGS)
-
- THREAD_LIBS=-lpthread
- # don't need -ldl (FreeBSD)
- LIBS=-lm
-
- CLIENT_LIBS =
-
- CLIENT_LIBS += $(SDL_LIBS)
- RENDERER_LIBS = $(SDL_LIBS) -lGL
-
- # optional features/libraries
- ifeq ($(USE_OPENAL),1)
- ifeq ($(USE_OPENAL_DLOPEN),1)
- CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS)
- endif
- endif
-
- ifeq ($(USE_CURL),1)
- CLIENT_CFLAGS += $(CURL_CFLAGS)
- ifeq ($(USE_CURL_DLOPEN),1)
- CLIENT_LIBS += $(CURL_LIBS)
- endif
- endif
-
-else # ifeq freebsd
-
-#############################################################################
-# SETUP AND BUILD -- OPENBSD
-#############################################################################
-
-ifeq ($(PLATFORM),openbsd)
+ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd" "netbsd"))
BASE_CFLAGS = -Wall -fno-strict-aliasing \
-pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
@@ -801,6 +757,7 @@ ifeq ($(PLATFORM),openbsd)
ifeq ($(ARCH),x86_64)
OPTIMIZEVM = -O3
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+ FILE_ARCH = amd64
endif
ifeq ($(ARCH),x86)
OPTIMIZEVM = -O3 -march=i586
@@ -831,9 +788,6 @@ ifeq ($(PLATFORM),openbsd)
USE_CURL_DLOPEN=0
endif
- # no shm_open on OpenBSD
- USE_MUMBLE=0
-
SHLIBEXT=so
SHLIBCFLAGS=-fPIC
SHLIBLDFLAGS=-shared $(LDFLAGS)
@@ -857,24 +811,7 @@ ifeq ($(PLATFORM),openbsd)
CLIENT_LIBS += $(CURL_LIBS)
endif
endif
-else # ifeq openbsd
-
-#############################################################################
-# SETUP AND BUILD -- NETBSD
-#############################################################################
-
-ifeq ($(PLATFORM),netbsd)
-
- LIBS=-lm
- SHLIBEXT=so
- SHLIBCFLAGS=-fPIC
- SHLIBLDFLAGS=-shared $(LDFLAGS)
- THREAD_LIBS=-lpthread
-
- BASE_CFLAGS = -Wall -fno-strict-aliasing
-
- BUILD_CLIENT = 0
-else # ifeq netbsd
+else # ifeq *BSD
#############################################################################
# SETUP AND BUILD -- IRIX
@@ -966,9 +903,7 @@ else # ifeq sunos
endif #Linux
endif #darwin
endif #MINGW
-endif #FreeBSD
-endif #OpenBSD
-endif #NetBSD
+endif #*BSD
endif #IRIX
endif #SunOS
diff --git a/MP/code/zlib-1.2.8/ioapi.h b/MP/code/zlib-1.2.8/ioapi.h
index f951d26..b50c425 100644
--- a/MP/code/zlib-1.2.8/ioapi.h
+++ b/MP/code/zlib-1.2.8/ioapi.h
@@ -55,7 +55,7 @@
#define ftello64 ftell
#define fseeko64 fseek
#else
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#define fopen64 fopen
#define ftello64 ftello
#define fseeko64 fseeko
diff --git a/SP/Makefile b/SP/Makefile
index 9442b62..154d81b 100644
--- a/SP/Makefile
+++ b/SP/Makefile
@@ -731,54 +731,10 @@ ifdef MINGW
else # ifdef MINGW
#############################################################################
-# SETUP AND BUILD -- FREEBSD
+# SETUP AND BUILD -- *BSD (is dying)
#############################################################################
-ifeq ($(PLATFORM),freebsd)
-
- # flags
- BASE_CFLAGS = $(shell env MACHINE_ARCH=$(ARCH) make -f /dev/null -VCFLAGS) \
- -Wall -fno-strict-aliasing \
- -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
- CLIENT_CFLAGS += $(SDL_CFLAGS)
-
- OPTIMIZEVM = -O3
- OPTIMIZE = $(OPTIMIZEVM) -ffast-math
-
- SHLIBEXT=so
- SHLIBCFLAGS=-fPIC
- SHLIBLDFLAGS=-shared $(LDFLAGS)
-
- THREAD_LIBS=-lpthread
- # don't need -ldl (FreeBSD)
- LIBS=-lm
-
- CLIENT_LIBS =
-
- CLIENT_LIBS += $(SDL_LIBS)
- RENDERER_LIBS = $(SDL_LIBS) -lGL
-
- # optional features/libraries
- ifeq ($(USE_OPENAL),1)
- ifeq ($(USE_OPENAL_DLOPEN),1)
- CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS)
- endif
- endif
-
- ifeq ($(USE_CURL),1)
- CLIENT_CFLAGS += $(CURL_CFLAGS)
- ifeq ($(USE_CURL_DLOPEN),1)
- CLIENT_LIBS += $(CURL_LIBS)
- endif
- endif
-
-else # ifeq freebsd
-
-#############################################################################
-# SETUP AND BUILD -- OPENBSD
-#############################################################################
-
-ifeq ($(PLATFORM),openbsd)
+ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd" "netbsd"))
BASE_CFLAGS = -Wall -fno-strict-aliasing \
-pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
@@ -790,6 +746,7 @@ ifeq ($(PLATFORM),openbsd)
ifeq ($(ARCH),x86_64)
OPTIMIZEVM = -O3
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+ FILE_ARCH = amd64
endif
ifeq ($(ARCH),x86)
OPTIMIZEVM = -O3 -march=i586
@@ -820,9 +777,6 @@ ifeq ($(PLATFORM),openbsd)
USE_CURL_DLOPEN=0
endif
- # no shm_open on OpenBSD
- USE_MUMBLE=0
-
SHLIBEXT=so
SHLIBCFLAGS=-fPIC
SHLIBLDFLAGS=-shared $(LDFLAGS)
@@ -846,24 +800,7 @@ ifeq ($(PLATFORM),openbsd)
CLIENT_LIBS += $(CURL_LIBS)
endif
endif
-else # ifeq openbsd
-
-#############################################################################
-# SETUP AND BUILD -- NETBSD
-#############################################################################
-
-ifeq ($(PLATFORM),netbsd)
-
- LIBS=-lm
- SHLIBEXT=so
- SHLIBCFLAGS=-fPIC
- SHLIBLDFLAGS=-shared $(LDFLAGS)
- THREAD_LIBS=-lpthread
-
- BASE_CFLAGS = -Wall -fno-strict-aliasing
-
- BUILD_CLIENT = 0
-else # ifeq netbsd
+else # ifeq *BSD
#############################################################################
# SETUP AND BUILD -- IRIX
@@ -955,9 +892,7 @@ else # ifeq sunos
endif #Linux
endif #darwin
endif #MINGW
-endif #FreeBSD
-endif #OpenBSD
-endif #NetBSD
+endif #*BSD
endif #IRIX
endif #SunOS
diff --git a/SP/code/zlib-1.2.8/ioapi.h b/SP/code/zlib-1.2.8/ioapi.h
index f951d26..b50c425 100644
--- a/SP/code/zlib-1.2.8/ioapi.h
+++ b/SP/code/zlib-1.2.8/ioapi.h
@@ -55,7 +55,7 @@
#define ftello64 ftell
#define fseeko64 fseek
#else
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#define fopen64 fopen
#define ftello64 ftello
#define fseeko64 fseeko
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list