diff --git a/Assets/libgambatte.dll.so b/Assets/libgambatte.dll.so new file mode 100644 index 0000000000..28309fe6bf Binary files /dev/null and b/Assets/libgambatte.dll.so differ diff --git a/libgambatte/Makefile b/libgambatte/Makefile index 56452b0f38..326af5d2cf 100644 --- a/libgambatte/Makefile +++ b/libgambatte/Makefile @@ -11,7 +11,7 @@ else $(error Unknown arch) endif -CXXFLAGS = -Wall -Iinclude -Isrc -O3 -std=c++11 -fno-exceptions -flto +CXXFLAGS = -Wall -Iinclude -Isrc -O3 -std=c++11 -fno-exceptions -flto -fPIC TARGET = libgambatte.dll LDFLAGS_32 = -static -static-libgcc -static-libstdc++ LDFLAGS_64 = diff --git a/libgambatte/src/cinterface.h b/libgambatte/src/cinterface.h index 031392a097..e92f942ece 100644 --- a/libgambatte/src/cinterface.h +++ b/libgambatte/src/cinterface.h @@ -21,6 +21,10 @@ // these are all documented on the C# side +#ifdef _WIN32 #define GBEXPORT extern "C" __declspec(dllexport) +#elif __linux__ +#define GBEXPORT extern "C" +#endif #endif