(libretro-test-gl iOS) Compiles and links on iOS

This commit is contained in:
twinaphex 2013-05-12 16:02:49 +02:00
parent a981b149ee
commit 5ce51f7b0b
2 changed files with 20 additions and 3 deletions

View File

@ -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..

View File

@ -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>