Native: fix support for Linux/GNU

This commit is contained in:
Alam Ed Arias 2023-11-12 13:16:03 -05:00
parent 37f55485f8
commit df95bdc398
3 changed files with 5 additions and 4 deletions

View file

@ -21,7 +21,7 @@ INC_FLAGS := $(addprefix -I,$(INC_DIRS))
CPPFLAGS_ := $(INC_FLAGS) -MMD -MP CPPFLAGS_ := $(INC_FLAGS) -MMD -MP
CFLAGS_ = -O2 -g3 -fPIC CFLAGS_ = -O2 --shared -g3 -fPIC
ifdef MINGW ifdef MINGW
CFLAGS_ += -msse2 CFLAGS_ += -msse2
@ -30,9 +30,9 @@ endif
CXXFLAGS_ = -std=c++14 $(CFLAGS_) CXXFLAGS_ = -std=c++14 $(CFLAGS_)
ifdef MINGW ifdef MINGW
LDFLAGS_ = --shared -lopengl32 -lgdi32 -Wl,--subsystem,windows LDFLAGS_ = -lopengl32 -lgdi32 --shared -Wl,--subsystem,windows
else else
LDFLAGS_ = --shared -ldl LDFLAGS_ = -lX11 -ldl --shared
endif endif
all: builder Build/$(TARGET_EXEC) all: builder Build/$(TARGET_EXEC)

View file

@ -87,7 +87,6 @@ static void *WinGetProcAddress(const char *name)
#define IntGetProcAddress(name) AppleGLGetProcAddress(name) #define IntGetProcAddress(name) AppleGLGetProcAddress(name)
#else #else
#if defined(__sgi) || defined(__sun) || defined(__unix__) #if defined(__sgi) || defined(__sun) || defined(__unix__)
void* GL_GetProcAddress(const char* proc);
#define IntGetProcAddress(name) GL_GetProcAddress((const char*)name) #define IntGetProcAddress(name) GL_GetProcAddress((const char*)name)
//#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name) //#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name)
/* END OF MANUAL CHANGES, DO NOT REMOVE! */ /* END OF MANUAL CHANGES, DO NOT REMOVE! */

View file

@ -4216,6 +4216,8 @@ int ogl_GetMinorVersion(void);
int ogl_GetMajorVersion(void); int ogl_GetMajorVersion(void);
int ogl_IsVersionGEQ(int majorVersion, int minorVersion); int ogl_IsVersionGEQ(int majorVersion, int minorVersion);
void* GL_GetProcAddress(const char* proc);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /*__cplusplus*/ #endif /*__cplusplus*/