mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Make LDFLAGS overrideable.
This commit is contained in:
parent
09aad64202
commit
36f77aa318
1 changed files with 19 additions and 7 deletions
26
Makefile
26
Makefile
|
@ -252,17 +252,28 @@ GLAD_INCLUDE = -Isrc/client/refresh/gl3/glad/include
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
|
|
||||||
# Base LDFLAGS.
|
# Base LDFLAGS. This is just the include path.
|
||||||
ifeq ($(YQ2_OSTYPE),Linux)
|
ifeq ($(YQ2_OSTYPE),Linux)
|
||||||
LDFLAGS := -L/usr/lib -lm -ldl -rdynamic
|
LDFLAGS ?= -L/usr/lib
|
||||||
else ifeq ($(YQ2_OSTYPE),FreeBSD)
|
else ifeq ($(YQ2_OSTYPE),FreeBSD)
|
||||||
LDFLAGS := -L/usr/local/lib -lm
|
LDFLAGS ?= -L/usr/local/lib
|
||||||
else ifeq ($(YQ2_OSTYPE),OpenBSD)
|
else ifeq ($(YQ2_OSTYPE),OpenBSD)
|
||||||
LDFLAGS := -L/usr/local/lib -lm
|
LDFLAGS ?= -L/usr/local/lib
|
||||||
else ifeq ($(YQ2_OSTYPE),Windows)
|
else ifeq ($(YQ2_OSTYPE),Windows)
|
||||||
LDFLAGS := -L/usr/lib -lws2_32 -lwinmm -static-libgcc
|
LDFLAGS ?= -L/usr/lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Required libraries.
|
||||||
|
ifeq ($(YQ2_OSTYPE),Linux)
|
||||||
|
LDFLAGS += -lm -ldl -rdynamic
|
||||||
|
else ifeq ($(YQ2_OSTYPE),FreeBSD)
|
||||||
|
LDFLAGS += -lm
|
||||||
|
else ifeq ($(YQ2_OSTYPE),OpenBSD)
|
||||||
|
LDFLAGS += -lm
|
||||||
|
else ifeq ($(YQ2_OSTYPE),Windows)
|
||||||
|
LDFLAGS += -lws2_32 -lwinmm -static-libgcc
|
||||||
else ifeq ($(YQ2_OSTYPE), Darwin)
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
||||||
LDFLAGS := $(OSX_ARCH) -lm
|
LDFLAGS += $(OSX_ARCH)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Keep symbols hidden.
|
# Keep symbols hidden.
|
||||||
|
@ -271,7 +282,8 @@ LDFLAGS += -fvisibility=hidden
|
||||||
|
|
||||||
ifneq ($(YQ2_OSTYPE), Darwin)
|
ifneq ($(YQ2_OSTYPE), Darwin)
|
||||||
ifneq ($(YQ2_OSTYPE), OpenBSD)
|
ifneq ($(YQ2_OSTYPE), OpenBSD)
|
||||||
# for some reason the OSX & OpenBSD linker doesn't support this...
|
# For some reason the OSX & OpenBSD
|
||||||
|
# linker doesn't support this...
|
||||||
LDFLAGS += -Wl,--no-undefined
|
LDFLAGS += -Wl,--no-undefined
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue