summaryrefslogtreecommitdiffhomepage
path: root/src/Makefile
diff options
context:
space:
mode:
authorPeter0x44 <[email protected]>2023-11-28 19:43:45 +0000
committerGitHub <[email protected]>2023-11-28 20:43:45 +0100
commite7a486fa81adac1833253c849ca73c5b3f7ef361 (patch)
tree7c2dd970d41272133d35396d888bb388fb717d7e /src/Makefile
parentfe53ba80dd684c501eb1c6d297fbf842bb42e515 (diff)
downloadraylib-e7a486fa81adac1833253c849ca73c5b3f7ef361.tar.gz
raylib-e7a486fa81adac1833253c849ca73c5b3f7ef361.zip
Hide unneeded internal symbols when building raylib as an so or dylib (#3573)
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index 3ccea903..772e5809 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -389,7 +389,13 @@ ifeq ($(RAYLIB_LIBTYPE),SHARED)
# BE CAREFUL: It seems that for gcc -fpic is not the same as -fPIC
# MinGW32 just doesn't need -fPIC, it shows warnings
CFLAGS += -fPIC -DBUILD_LIBTYPE_SHARED
+
+ # hide all symbols by default, so RLAPI can expose them
+ ifeq ($(PLATFORM_OS),$(filter $(PLATFORM_OS), LINUX BSD OSX))
+ CFLAGS += -fvisibility=hidden
+ endif
endif
+
ifeq ($(PLATFORM),PLATFORM_DRM)
# without EGL_NO_X11 eglplatform.h tears Xlib.h in which tears X.h in
# which contains a conflicting type Font