tinygi
annotate Makefile @ 0:16fdca2a1ef5
initial tinygi commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 19 Jul 2015 18:30:29 +0300 |
parents | |
children | 72752a1b3dbe |
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 bin = tgi |
nuclear@0 | 6 |
nuclear@0 | 7 CFLAGS = -pedantic -Wall -g |
nuclear@0 | 8 |
nuclear@0 | 9 $(bin): $(obj) |
nuclear@0 | 10 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 11 |
nuclear@0 | 12 -include $(dep) |
nuclear@0 | 13 |
nuclear@0 | 14 %.d: %.c |
nuclear@0 | 15 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 16 |
nuclear@0 | 17 .PHONY: clean |
nuclear@0 | 18 clean: |
nuclear@0 | 19 rm -f $(obj) $(bin) |
nuclear@0 | 20 |
nuclear@0 | 21 .PHONY: cleandep |
nuclear@0 | 22 cleandep: |
nuclear@0 | 23 rm -f $(dep) |