packio

diff Makefile @ 0:a71bd70c1014

simple pack-file I/O library
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 03 Jan 2015 15:29:05 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Sat Jan 03 15:29:05 2015 +0200
     1.3 @@ -0,0 +1,24 @@
     1.4 +PREFIX = /usr/local
     1.5 +
     1.6 +src = $(wildcard src/*.c)
     1.7 +obj = $(src:.c=.o)
     1.8 +dep = $(obj:.o=.d)
     1.9 +name = packio
    1.10 +
    1.11 +lib_a = lib$(name).a
    1.12 +
    1.13 +inc = -Iinclude
    1.14 +
    1.15 +CFLAGS = -pedantic -Wall -g $(pic) $(inc)
    1.16 +
    1.17 +$(lib_a): $(obj)
    1.18 +	$(AR) rcs $@ $(obj)
    1.19 +
    1.20 +-include $(dep)
    1.21 +
    1.22 +%.d: %.c
    1.23 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.24 +
    1.25 +.PHONY: clean
    1.26 +clean:
    1.27 +	rm -f $(obj) $(dep) $(lib_a)