Makefile (1083B)
1 # swarp - simple pointer warp 2 # (C)opyright MMVI Anselm R. Garbe 3 4 include config.mk 5 6 SRC = swarp.c 7 OBJ = ${SRC:.c=.o} 8 9 all: options swarp 10 11 options: 12 @echo swarp build options: 13 @echo "CFLAGS = ${CFLAGS}" 14 @echo "LDFLAGS = ${LDFLAGS}" 15 @echo "CC = ${CC}" 16 @echo "LD = ${LD}" 17 18 .c.o: 19 @echo CC $< 20 @${CC} -c ${CFLAGS} $< 21 22 ${OBJ}: config.mk 23 24 swarp: ${OBJ} 25 @echo LD $@ 26 @${LD} -o $@ ${OBJ} ${LDFLAGS} 27 @strip $@ 28 29 clean: 30 @echo cleaning 31 @rm -f swarp ${OBJ} swarp-${VERSION}.tar.gz 32 33 dist: clean 34 @echo creating dist tarball 35 @mkdir -p swarp-${VERSION} 36 @cp -R LICENSE Makefile README config.mk ${SRC} swarp-${VERSION} 37 @tar -cf swarp-${VERSION}.tar swarp-${VERSION} 38 @gzip swarp-${VERSION}.tar 39 @rm -rf swarp-${VERSION} 40 41 install: all 42 @echo installing executable file to ${DESTDIR}${PREFIX}/bin 43 @mkdir -p ${DESTDIR}${PREFIX}/bin 44 @cp -f swarp ${DESTDIR}${PREFIX}/bin 45 @chmod 755 ${DESTDIR}${PREFIX}/bin/swarp 46 47 uninstall: 48 @echo removing executable file from ${DESTDIR}${PREFIX}/bin 49 @rm -f ${DESTDIR}${PREFIX}/bin/swarp 50 51 .PHONY: all options clean dist install uninstall