Makefile (313B)
1 cc = ${CC} 2 cflags = -Wall -Wno-write-strings ${CFLAGS} 3 ldflags = ${LDFLAGS} 4 5 src = buf.c slurp.c list.c split.c bprintf.c mkdirs.c copy.c exists.c 6 obj = ${src:.c=.o} 7 hdr = ${obj:.o=.h} 8 9 all: ${obj} 10 11 .c.o: 12 ${cc} ${cflags} -c -o $@ $< 13 14 ${obj}: Makefile ${hdr} 15 16 clean: 17 rm -f ${obj} 18 19 .SUFFIXES: .c .o 20 .PHONY: clean