mirror of
https://github.com/libretro/RetroArch
synced 2025-02-19 12:41:00 +00:00
(libretro-test-gl iOS) Compiles and links on iOS
This commit is contained in:
parent
a981b149ee
commit
5ce51f7b0b
@ -12,19 +12,29 @@ else ifneq ($(findstring win,$(shell uname -a)),)
|
||||
endif
|
||||
endif
|
||||
|
||||
TARGET_NAME = testgl
|
||||
|
||||
ifeq ($(platform), unix)
|
||||
TARGET := libretro.so
|
||||
TARGET := $(TARGET_NAME)_libretro.so
|
||||
fpic := -fPIC
|
||||
SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
|
||||
GL_LIB := -lGL
|
||||
else ifeq ($(platform), osx)
|
||||
TARGET := libretro.dylib
|
||||
TARGET := $(TARGET_NAME)_libretro.dylib
|
||||
fpic := -fPIC
|
||||
SHARED := -dynamiclib
|
||||
GL_LIB := -framework OpenGL
|
||||
else ifeq ($(platform), ios)
|
||||
TARGET := $(TARGET_NAME)_libretro_ios.dylib
|
||||
fpic := -fPIC
|
||||
SHARED := -dynamiclib
|
||||
GL_LIB := -framework OpenGLES
|
||||
DEFINES := -DIOS
|
||||
CFLAGS += -DGLES $(DEFINES)
|
||||
CC = clang -arch armv7 -isysroot $(IOSSDK)
|
||||
else
|
||||
CC = gcc
|
||||
TARGET := retro.dll
|
||||
TARGET := $(TARGET_NAME)_retro.dll
|
||||
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=link.T -Wl,--no-undefined
|
||||
GL_LIB := -lopengl32
|
||||
CFLAGS += -I..
|
||||
|
@ -10,7 +10,14 @@ static struct retro_hw_render_callback hw_render;
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#if defined(GLES)
|
||||
#ifdef IOS
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#endif
|
||||
#elif defined(__APPLE__)
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glext.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user