dsys2

annotate Makefile @ 2:1705e550bd91

foo
author John Tsiombikas <nuclear@siggraph.org>
date Wed, 31 Aug 2011 05:08:54 +0300
parents 34d90cd9ef9b
children 94ce16dd20c0
rev   line source
nuclear@0 1 src = $(wildcard src/*.c)
nuclear@0 2 obj = $(src:.c=.o)
nuclear@0 3 dep = $(obj:.o=.d)
nuclear@0 4
nuclear@0 5 lib_a = libdsys2.a
nuclear@0 6
nuclear@0 7 CC = gcc
nuclear@0 8 AR = ar
nuclear@2 9 CFLAGS = -pedantic -Wall -g -Isrc
nuclear@2 10
nuclear@2 11 test: test.o $(lib_a)
nuclear@2 12 $(CC) $(CFLAGS) -o $@ test.o $(lib_a) -lGL -lGLU -lglut -lm
nuclear@0 13
nuclear@0 14 $(lib_a): $(obj)
nuclear@0 15 $(AR) rcs $@ $(obj)
nuclear@0 16
nuclear@0 17 -include $(dep)
nuclear@0 18
nuclear@0 19 %.d: %.c
nuclear@0 20 @$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@
nuclear@0 21
nuclear@0 22 .PHONY: clean
nuclear@0 23 clean:
nuclear@0 24 rm -f $(obj) $(bin)
nuclear@0 25
nuclear@0 26 .PHONY: cleandep
nuclear@0 27 cleandep:
nuclear@0 28 rm -f $(dep)