Makefile (588B)
1 CC?=gcc 2 DESTDIR?= 3 PREFIX?=/usr 4 VERSION=0.1 5 USER=root 6 GROUP=root 7 CFLAGS?=-O2 -Wall 8 9 all: config.h sup 10 11 config.h: 12 cp config.def.h config.h 13 14 sup.o: config.h sup.c 15 ${CC} ${CFLAGS} -c sup.c 16 17 sup: sup.o 18 ${CC} ${LDFLAGS} sup.o -o sup 19 20 clean: 21 rm -f sup.o sup 22 23 mrproper: clean 24 rm -f config.h 25 26 install: 27 mkdir -p ${DESTDIR}${PREFIX}/bin 28 cp -f sup ${DESTDIR}${PREFIX}/bin 29 -chown ${USER}:${GROUP} ${DESTDIR}/${PREFIX}/bin/sup 30 -chmod 4111 ${DESTDIR}${PREFIX}/bin/sup 31 mkdir -p ${DESTDIR}${PREFIX}/share/man/man1 32 sed s,VERSION,${VERSION}, sup.1 \ 33 > ${DESTDIR}${PREFIX}/share/man/man1/sup.1