labyrinth

annotate Makefile @ 0:8ba79034e8a6

labyrinth example initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 15 Jan 2015 14:59:38 +0200
parents
children 45b91185b298
rev   line source
nuclear@0 1 src = $(wildcard src/*.c)
nuclear@0 2 obj = $(src:.c=.o)
nuclear@0 3 bin = lab
nuclear@0 4
nuclear@0 5 sys = $(shell uname -s)
nuclear@0 6
nuclear@0 7 libgl_Linux = -lGL -lGLU -lglut
nuclear@0 8 libgl_Darwin = -framework OpenGL -framework GLUT
nuclear@0 9
nuclear@0 10 CFLAGS = -pedantic -Wall -g
nuclear@0 11 LDFLAGS = $(libgl_$(sys)) -lm
nuclear@0 12
nuclear@0 13 $(bin): $(obj)
nuclear@0 14 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@0 15
nuclear@0 16 .PHONY: clean
nuclear@0 17 clean:
nuclear@0 18 rm -f $(obj) $(bin)