packio
annotate Makefile @ 1:a5728bc6a02f
moving along
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 09 Jan 2015 02:31:29 +0200 |
parents | |
children |
rev | line source |
---|---|
nuclear@0 | 1 PREFIX = /usr/local |
nuclear@0 | 2 |
nuclear@0 | 3 src = $(wildcard src/*.c) |
nuclear@0 | 4 obj = $(src:.c=.o) |
nuclear@0 | 5 dep = $(obj:.o=.d) |
nuclear@0 | 6 name = packio |
nuclear@0 | 7 |
nuclear@0 | 8 lib_a = lib$(name).a |
nuclear@0 | 9 |
nuclear@0 | 10 inc = -Iinclude |
nuclear@0 | 11 |
nuclear@0 | 12 CFLAGS = -pedantic -Wall -g $(pic) $(inc) |
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) $(dep) $(lib_a) |