Fix build on OSX

This commit is contained in:
Daniel Gibson 2016-12-21 20:21:36 +01:00
parent aaa73236ec
commit c901ad9bb6

View file

@ -253,7 +253,12 @@ LDFLAGS := $(OSX_ARCH) -lm
endif
CFLAGS += -fvisibility=hidden
LDFLAGS += -fvisibility=hidden -Wl,--no-undefined
LDFLAGS += -fvisibility=hidden
ifneq ($(OSTYPE), Darwin)
# for some reason the OSX linker doesn't support this
LDFLAGS += -Wl,--no-undefined
endif
# ----------
@ -549,6 +554,8 @@ ifeq ($(WITH_SDL2),yes)
release/ref_gl.dylib : CFLAGS += -DSDL2
endif
release/ref_gl.dylib : LDFLAGS += -shared
else # not Windows or Darwin
ref_gl: