glamtk

diff Makefile @ 0:b04d49e4599c

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 30 Dec 2010 05:22:14 +0200
parents
children 5b86b98ee988
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Thu Dec 30 05:22:14 2010 +0200
     1.3 @@ -0,0 +1,20 @@
     1.4 +src = $(wildcard *.c src/*.c)
     1.5 +obj = $(src:.c=.o)
     1.6 +bin = test
     1.7 +
     1.8 +CC = gcc
     1.9 +CFLAGS = -pedantic -Wall -g -Isrc
    1.10 +LDFLAGS = $(libgl)
    1.11 +
    1.12 +ifeq ($(shell uname -s), Darwin)
    1.13 +	libgl = -framework OpenGL -framework GLUT
    1.14 +else
    1.15 +	libgl = -lGL -lglut
    1.16 +endif
    1.17 +
    1.18 +$(bin): $(obj)
    1.19 +	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.20 +
    1.21 +.PHONY: clean
    1.22 +clean:
    1.23 +	rm -f $(obj) $(bin)