# HG changeset patch # User John Tsiombikas # Date 1443412411 -10800 # Node ID 57188f7d930459e9266e318b3d1b224100c2e2bb # Parent 03cc3b1884d1773d2cb69f341b36c1e8332e2425# Parent 2a0ef5efb8e2ad66263a91920fd590e1fb26c436 merged changes from macosx diff -r 03cc3b1884d1 -r 57188f7d9304 .hgignore --- a/.hgignore Mon Sep 28 06:53:06 2015 +0300 +++ b/.hgignore Mon Sep 28 06:53:31 2015 +0300 @@ -9,3 +9,4 @@ \.png$ ^data/ \.DS_Store +^test$ diff -r 03cc3b1884d1 -r 57188f7d9304 Makefile --- a/Makefile Mon Sep 28 06:53:06 2015 +0300 +++ b/Makefile Mon Sep 28 06:53:31 2015 +0300 @@ -10,10 +10,17 @@ CFLAGS = -pedantic -Wall -g $(def) $(incdir) CXXFLAGS = $(CFLAGS) -LDFLAGS = -lGL -lGLU -lglut -lGLEW -lm -ldl +LDFLAGS = $(libgl) -lm -ldl include libs/Makefile +sys := $(shell uname -s) +ifeq ($(sys), Darwin) + libgl = -framework OpenGL -framework GLUT -lGLEW +else + libgl = -lGL -lGLU -lglut -lGLEW +endif + $(bin): $(obj) $(CXX) -o $@ $(obj) $(LDFLAGS) diff -r 03cc3b1884d1 -r 57188f7d9304 src/config.h --- a/src/config.h Mon Sep 28 06:53:06 2015 +0300 +++ b/src/config.h Mon Sep 28 06:53:31 2015 +0300 @@ -4,7 +4,7 @@ #ifdef __APPLE__ #include -#if defined(TARGET_IPHONE_SIMULATOR) || defined(TARGET_OS_IPHONE) +#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE #define IPHONE #define TARGET_IPHONE #endif diff -r 03cc3b1884d1 -r 57188f7d9304 src/glut/main.c --- a/src/glut/main.c Mon Sep 28 06:53:06 2015 +0300 +++ b/src/glut/main.c Mon Sep 28 06:53:31 2015 +0300 @@ -20,7 +20,13 @@ #include #include #include + +#ifdef __APPLE__ +#include +#else #include +#endif + #include "sanegl.h" #include "istereo.h" #include "sdr.h" @@ -33,7 +39,7 @@ int main(int argc, char **argv) { glutInit(&argc, argv); - glutInitWindowSize(640, 920); + glutInitWindowSize(920, 640); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); glutCreateWindow("test"); diff -r 03cc3b1884d1 -r 57188f7d9304 src/uitheme.cc --- a/src/uitheme.cc Mon Sep 28 06:53:06 2015 +0300 +++ b/src/uitheme.cc Mon Sep 28 06:53:31 2015 +0300 @@ -28,7 +28,7 @@ static std::map funcmap; -extern "C"// __attribute__ ((used)) +extern "C" __attribute__ ((used)) WidgetDrawFunc get_widget_func(const char *name) { static bool initialized;