Makefile (1061B)
1 # ssid - simple setsid 2 # (C)opyright MMVI Anselm R. Garbe 3 4 include config.mk 5 6 SRC = ssid.c 7 OBJ = ${SRC:.c=.o} 8 9 all: options ssid 10 11 options: 12 @echo ssid 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 ssid: ${OBJ} 25 @echo LD $@ 26 @${LD} -o $@ ${OBJ} ${LDFLAGS} 27 @strip $@ 28 29 clean: 30 @echo cleaning 31 @rm -f ssid ${OBJ} ssid-${VERSION}.tar.gz 32 33 dist: clean 34 @echo creating dist tarball 35 @mkdir -p ssid-${VERSION} 36 @cp -R LICENSE Makefile README config.mk ${SRC} ssid-${VERSION} 37 @tar -cf ssid-${VERSION}.tar ssid-${VERSION} 38 @gzip ssid-${VERSION}.tar 39 @rm -rf ssid-${VERSION} 40 41 install: all 42 @echo installing executable file to ${DESTDIR}${PREFIX}/bin 43 @mkdir -p ${DESTDIR}${PREFIX}/bin 44 @cp -f ssid ${DESTDIR}${PREFIX}/bin 45 @chmod 755 ${DESTDIR}${PREFIX}/bin/ssid 46 47 uninstall: 48 @echo removing executable file from ${DESTDIR}${PREFIX}/bin 49 @rm -f ${DESTDIR}${PREFIX}/bin/ssid 50 51 .PHONY: all options clean dist install uninstall