Makefile (586B)
1 cc = ${CC} 2 cflags = -Wall -Wno-write-strings ${CFLAGS} 3 ldflags = ${LDFLAGS} 4 prefix = /usr/local 5 manprefix = ${prefix}/man 6 7 names = bmv pmv 8 obj = bmv.o 9 10 all: ${names} 11 12 ${names}: lib ${obj} 13 14 lib: 15 make -C lib 16 17 .c.o: 18 ${cc} ${cflags} -c -o $@ $< 19 20 pmv: 21 ln -f $@.sh $@ 22 23 ${names}: ${obj} 24 ${cc} -o $@ ${@}.o lib/*.o ${ldflags} 25 26 clean: 27 rm -f ${names} ${obj} 28 29 install: ${names} 30 cp -f ${names} ${prefix}/bin 31 cp -f ${names:=.1} ${manprefix}/man1 32 33 uninstall: 34 cd ${prefix}/bin && rm -f ${names} 35 cd ${manprefix}/man1 && rm -f ${names:=.1} 36 37 .SUFFIXES: .c .o 38 .PHONY: clean install uninstall lib