labyrinth
annotate Makefile @ 1:d46f0947a96d
added helpful comment
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 06 Feb 2015 00:34:04 +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) |