mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Makefile: add support to build ioq3 client on NetBSD
This commit is contained in:
parent
1fc83e4845
commit
d76082f1f5
1 changed files with 62 additions and 5 deletions
67
Makefile
67
Makefile
|
@ -940,20 +940,77 @@ else # ifeq openbsd
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
ifeq ($(PLATFORM),netbsd)
|
ifeq ($(PLATFORM),netbsd)
|
||||||
|
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
|
||||||
|
-pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
|
||||||
|
CLIENT_CFLAGS += $(SDL_CFLAGS)
|
||||||
|
|
||||||
|
ALTIVEC_CFLAGS =
|
||||||
|
OPTIMIZEVM = -O3
|
||||||
|
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
|
||||||
|
|
||||||
|
ifeq ($(ARCH),x86_64)
|
||||||
|
HAVE_VM_COMPILED = true
|
||||||
|
else
|
||||||
|
ifeq ($(ARCH),x86)
|
||||||
|
OPTIMIZE += -march=i586
|
||||||
|
HAVE_VM_COMPILED=true
|
||||||
|
else
|
||||||
|
ifeq ($(ARCH),ppc)
|
||||||
|
ALTIVEC_CFLAGS = -maltivec
|
||||||
|
HAVE_VM_COMPILED=true
|
||||||
|
endif
|
||||||
|
ifeq ($(ARCH),ppc64)
|
||||||
|
ALTIVEC_CFLAGS = -maltivec
|
||||||
|
HAVE_VM_COMPILED=true
|
||||||
|
endif
|
||||||
|
ifeq ($(ARCH),sparc64)
|
||||||
|
OPTIMIZE += -mtune=ultrasparc3 -mv8plus
|
||||||
|
OPTIMIZEVM += -mtune=ultrasparc3 -mv8plus
|
||||||
|
HAVE_VM_COMPILED=true
|
||||||
|
endif
|
||||||
|
ifeq ($(ARCH),alpha)
|
||||||
|
# According to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410555
|
||||||
|
# -ffast-math will cause the client to die with SIGFPE on Alpha
|
||||||
|
OPTIMIZE = $(OPTIMIZEVM)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
BASE_CFLAGS += $(OPTIMIZE) $(ALTIVEC_CFLAGS)
|
||||||
|
|
||||||
|
ifeq ($(USE_CURL),1)
|
||||||
|
CLIENT_CFLAGS += $(CURL_CFLAGS)
|
||||||
|
USE_CURL_DLOPEN=0
|
||||||
|
endif
|
||||||
|
|
||||||
|
# We can't pass it to the CLIENT_LIBS but after the all
|
||||||
|
# other arguments. Tested with GCC 10.5 on NetBSD 10.
|
||||||
|
USE_MUMBLE=0
|
||||||
|
|
||||||
LIBS=-lm
|
|
||||||
SHLIBEXT=so
|
SHLIBEXT=so
|
||||||
SHLIBCFLAGS=-fPIC
|
SHLIBCFLAGS=-fPIC
|
||||||
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
SHLIBLDFLAGS=-shared $(LDFLAGS)
|
||||||
|
|
||||||
THREAD_LIBS=-lpthread
|
THREAD_LIBS=-lpthread
|
||||||
|
# Needs to link after the all other arguments
|
||||||
|
LIBS=-lm -lrt
|
||||||
|
|
||||||
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
|
CLIENT_LIBS =
|
||||||
|
|
||||||
ifeq ($(ARCH),x86)
|
CLIENT_LIBS += $(SDL_LIBS)
|
||||||
HAVE_VM_COMPILED=true
|
RENDERER_LIBS = $(SDL_LIBS)
|
||||||
|
|
||||||
|
ifeq ($(USE_OPENAL),1)
|
||||||
|
ifneq ($(USE_OPENAL_DLOPEN),1)
|
||||||
|
CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
BUILD_CLIENT = 0
|
ifeq ($(USE_CURL),1)
|
||||||
|
ifneq ($(USE_CURL_DLOPEN),1)
|
||||||
|
CLIENT_LIBS += $(CURL_LIBS)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
else # ifeq netbsd
|
else # ifeq netbsd
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
Loading…
Reference in a new issue