testsuite: Remove bashisms and switch to sh(1)
[abduco.git] / Makefile
bloba85641c9bc66c6d973e18550a72b766d89e77fef
1 include config.mk
3 SRC = abduco.c
4 OBJ = ${SRC:.c=.o}
6 all: clean options abduco
8 options:
9 @echo abduco build options:
10 @echo "CFLAGS = ${CFLAGS}"
11 @echo "LDFLAGS = ${LDFLAGS}"
12 @echo "CC = ${CC}"
14 config.h:
15 cp config.def.h config.h
17 .c.o:
18 @echo CC $<
19 @${CC} -c ${CFLAGS} $<
21 ${OBJ}: config.h config.mk
23 abduco: ${OBJ}
24 @echo CC -o $@
25 @${CC} -o $@ ${OBJ} ${LDFLAGS}
27 debug: clean
28 @make CFLAGS='${DEBUG_CFLAGS}'
30 clean:
31 @echo cleaning
32 @rm -f abduco ${OBJ} abduco-${VERSION}.tar.gz
34 dist: clean
35 @echo creating dist tarball
36 @mkdir -p abduco-${VERSION}
37 @cp -R LICENSE Makefile README.md testsuite.sh config.def.h config.mk \
38 ${SRC} debug.c client.c server.c forkpty-aix.c forkpty-sunos.c \
39 abduco.1 abduco-${VERSION}
40 @tar -cf abduco-${VERSION}.tar abduco-${VERSION}
41 @gzip abduco-${VERSION}.tar
42 @rm -rf abduco-${VERSION}
44 install: abduco
45 @echo stripping executable
46 @${STRIP} abduco
47 @echo installing executable file to ${DESTDIR}${PREFIX}/bin
48 @mkdir -p ${DESTDIR}${PREFIX}/bin
49 @cp -f abduco ${DESTDIR}${PREFIX}/bin
50 @chmod 755 ${DESTDIR}${PREFIX}/bin/abduco
51 @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
52 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
53 @sed "s/VERSION/${VERSION}/g" < abduco.1 > ${DESTDIR}${MANPREFIX}/man1/abduco.1
54 @chmod 644 ${DESTDIR}${MANPREFIX}/man1/abduco.1
56 uninstall:
57 @echo removing executable file from ${DESTDIR}${PREFIX}/bin
58 @rm -f ${DESTDIR}${PREFIX}/bin/abduco
59 @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
60 @rm -f ${DESTDIR}${MANPREFIX}/man1/abduco.1
62 .PHONY: all options clean dist install uninstall debug