libdrawtext

changeset 61:b03c0dcd0405

fixed for macosx
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 20 Sep 2011 15:16:35 +0300
parents b599434670cb
children 6bbf23363c6c
files examples/simple/Makefile examples/unicode/Makefile src/drawgl.c
diffstat 3 files changed, 8 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/examples/simple/Makefile	Sun Sep 18 14:18:25 2011 +0300
     1.2 +++ b/examples/simple/Makefile	Tue Sep 20 15:16:35 2011 +0300
     1.3 @@ -5,23 +5,24 @@
     1.4  CFLAGS = -pedantic -Wall -g -I../../src
     1.5  LDFLAGS = -L. -ldrawtext $(libgl)
     1.6  
     1.7 -lib_so = libdrawtext.so
     1.8  font = serif.ttf
     1.9  
    1.10  ifeq ($(shell uname -s), Darwin)
    1.11  	libgl = -framework OpenGL -framework GLUT
    1.12 +	lib_so = libdrawtext.dylib
    1.13  else
    1.14  	libgl = -lGL -lGLU -lglut
    1.15 +	lib_so = libdrawtext.so.0.0
    1.16  endif
    1.17  
    1.18  $(bin): $(obj) $(lib_so) $(font)
    1.19  	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.20  
    1.21 -$(lib_so): ../../libdrawtext.so.0.0
    1.22 +$(lib_so): ../../$(lib_so)
    1.23  	rm -f $@
    1.24  	ln -s $< $@
    1.25  
    1.26 -$(font): ../fonts/FreeSerif.ttf
    1.27 +$(font): ../fonts/linux-libertine.ttf
    1.28  	rm -f $@
    1.29  	ln -s $< $@
    1.30  
     2.1 --- a/examples/unicode/Makefile	Sun Sep 18 14:18:25 2011 +0300
     2.2 +++ b/examples/unicode/Makefile	Tue Sep 20 15:16:35 2011 +0300
     2.3 @@ -5,19 +5,20 @@
     2.4  CFLAGS = -pedantic -Wall -g -I../../src
     2.5  LDFLAGS = -L. -ldrawtext $(libgl)
     2.6  
     2.7 -lib_so = libdrawtext.so
     2.8  fonts = serif.ttf cjk.ttf klingon.ttf
     2.9  
    2.10  ifeq ($(shell uname -s), Darwin)
    2.11  	libgl = -framework OpenGL -framework GLUT
    2.12 +	lib_so = libdrawtext.dylib
    2.13  else
    2.14  	libgl = -lGL -lGLU -lglut
    2.15 +	lib_so = libdrawtext.so.0.0
    2.16  endif
    2.17  
    2.18  $(bin): $(obj) $(lib_so) $(fonts)
    2.19  	$(CC) -o $@ $(obj) $(LDFLAGS)
    2.20  
    2.21 -$(lib_so): ../../libdrawtext.so.0.0
    2.22 +$(lib_so): ../../$(lib_so)
    2.23  	rm -f $@
    2.24  	ln -s $< $@
    2.25  
     3.1 --- a/src/drawgl.c	Sun Sep 18 14:18:25 2011 +0300
     3.2 +++ b/src/drawgl.c	Tue Sep 20 15:16:35 2011 +0300
     3.3 @@ -21,7 +21,7 @@
     3.4  
     3.5  #include <stdlib.h>
     3.6  
     3.7 -#if defined(__IPHONE_3_0) || defined(__IPHONE_3_2) || defined(__IPHONE_4_0)
     3.8 +#ifdef TARGET_IPHONE
     3.9  #include <OpenGLES/ES2/gl.h>
    3.10  #else
    3.11  #include <GL/glew.h>