Merge pull request #41 from Brawmario/feature/visibility-hidden
Only export lib functions in linux builds
This commit is contained in:
@@ -9,7 +9,7 @@ else
|
|||||||
CXX := c++
|
CXX := c++
|
||||||
LDFLAGS := -lm -shared
|
LDFLAGS := -lm -shared
|
||||||
endif
|
endif
|
||||||
CFLAGS := -g -Wall -Wno-unused-function -fPIC -DSM64_LIB_EXPORT -DGBI_FLOATS -DVERSION_US -DNO_SEGMENTED_MEMORY
|
CFLAGS := -g -Wall -Wno-unused-function -fPIC -fvisibility=hidden -DSM64_LIB_EXPORT -DGBI_FLOATS -DVERSION_US -DNO_SEGMENTED_MEMORY
|
||||||
|
|
||||||
SRC_DIRS := src src/decomp src/decomp/engine src/decomp/include/PR src/decomp/game src/decomp/pc src/decomp/pc/audio src/decomp/mario src/decomp/tools src/decomp/audio
|
SRC_DIRS := src src/decomp src/decomp/engine src/decomp/include/PR src/decomp/game src/decomp/pc src/decomp/pc/audio src/decomp/mario src/decomp/tools src/decomp/audio
|
||||||
BUILD_DIR := build
|
BUILD_DIR := build
|
||||||
|
|||||||
+3
-1
@@ -5,12 +5,14 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32)
|
||||||
#ifdef SM64_LIB_EXPORT
|
#ifdef SM64_LIB_EXPORT
|
||||||
#define SM64_LIB_FN __declspec(dllexport)
|
#define SM64_LIB_FN __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
#define SM64_LIB_FN __declspec(dllimport)
|
#define SM64_LIB_FN __declspec(dllimport)
|
||||||
#endif
|
#endif
|
||||||
|
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||||
|
#define SM64_LIB_FN __attribute__ ((visibility("default")))
|
||||||
#else
|
#else
|
||||||
#define SM64_LIB_FN
|
#define SM64_LIB_FN
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user