libdrawtext

diff examples/simple/Makefile @ 1:daa47eeca303

added simple example
author John Tsiombikas <nuclear@mutantstargoat.com>
date Thu, 15 Sep 2011 13:21:35 +0300
parents
children 9d44f6b0591f
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/examples/simple/Makefile	Thu Sep 15 13:21:35 2011 +0300
     1.3 @@ -0,0 +1,30 @@
     1.4 +obj = simple.o
     1.5 +bin = simple
     1.6 +
     1.7 +CC = gcc
     1.8 +CFLAGS = -pedantic -Wall -g -I../../src
     1.9 +LDFLAGS = -L. -ldrawtext $(libgl)
    1.10 +
    1.11 +lib_so = libdrawtext.so
    1.12 +font = serif.ttf
    1.13 +
    1.14 +ifeq ($(shell uname -s), Darwin)
    1.15 +	libgl = -framework OpenGL -framework GLUT
    1.16 +else
    1.17 +	libgl = -lGL -lGLU -lglut
    1.18 +endif
    1.19 +
    1.20 +$(bin): $(obj) $(lib_so) $(font)
    1.21 +	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.22 +
    1.23 +$(lib_so): ../../libdrawtext.so.0.0
    1.24 +	rm -f $@
    1.25 +	ln -s $< $@
    1.26 +
    1.27 +$(font): ../fonts/FreeSerif.ttf
    1.28 +	rm -f $@
    1.29 +	ln -s $< $@
    1.30 +
    1.31 +.PHONY: clean
    1.32 +clean:
    1.33 +	rm -f $(obj) $(bin) $(lib_so)