imtk

view Makefile @ 17:ac2a8d8fca9a

naturally I forgot to add listbox.c
author John Tsiombikas <nuclear@siggraph.org>
date Tue, 19 Apr 2011 08:36:23 +0300
parents 1b27a69603ac
children 737e9047d9c9
line source
1 src = $(wildcard *.c src/*.c)
2 obj = $(src:.c=.o)
3 depfiles = $(obj:.o=.d)
4 bin = test
6 CC = gcc
7 CFLAGS = -pedantic -Wall -g -Isrc
8 LDFLAGS = $(libgl)
10 ifeq ($(shell uname -s), Darwin)
11 libgl = -framework OpenGL -framework GLUT
12 else
13 libgl = -lGL -lGLU -lglut
14 endif
16 $(bin): $(obj)
17 $(CC) -o $@ $(obj) $(LDFLAGS)
19 -include $(depfiles)
21 %.d: %.c
22 @$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@
24 .PHONY: clean
25 clean:
26 rm -f $(obj) $(bin)
28 .PHONY: cleandep
29 cleandep:
30 rm -f $(depfiles)