Makefile (1454B)
1 # tabbed - tabbing interface 2 # See LICENSE file for copyright and license details. 3 4 include config.mk 5 6 SRC = tabbed.c xembed.c 7 OBJ = ${SRC:.c=.o} 8 BIN = ${OBJ:.o=} 9 10 all: options ${BIN} 11 12 options: 13 @echo tabbed build options: 14 @echo "CFLAGS = ${CFLAGS}" 15 @echo "LDFLAGS = ${LDFLAGS}" 16 @echo "CC = gcc" 17 18 .c.o: 19 gcc -c ${CFLAGS} $< 20 21 ${OBJ}: config.h config.mk 22 23 config.h: 24 cp config.def.h $@ 25 26 .o: 27 gcc -o $@ $< ${LDFLAGS} 28 29 clean: 30 rm -f ${BIN} ${OBJ} tabbed-${VERSION}.tar.gz 31 32 dist: clean 33 mkdir -p tabbed-${VERSION} 34 cp -R LICENSE Makefile README config.def.h config.mk \ 35 tabbed.1 arg.h ${SRC} tabbed-${VERSION} 36 tar -cf tabbed-${VERSION}.tar tabbed-${VERSION} 37 gzip tabbed-${VERSION}.tar 38 rm -rf tabbed-${VERSION} 39 40 install: all 41 mkdir -p "${DESTDIR}${PREFIX}/bin" 42 cp -f ${BIN} "${DESTDIR}${PREFIX}/bin" 43 chmod 755 "${DESTDIR}${PREFIX}/bin/tabbed" 44 echo installing manual pages to ${DESTDIR}${MANPREFIX}/man1 45 mkdir -p "${DESTDIR}${MANPREFIX}/man1" 46 sed "s/VERSION/${VERSION}/g" < tabbed.1 > "${DESTDIR}${MANPREFIX}/man1/tabbed.1" 47 chmod 644 "${DESTDIR}${MANPREFIX}/man1/tabbed.1" 48 sed "s/VERSION/${VERSION}/g" < xembed.1 > "${DESTDIR}${MANPREFIX}/man1/xembed.1" 49 chmod 644 "${DESTDIR}${MANPREFIX}/man1/xembed.1" 50 51 uninstall: 52 rm -f "${DESTDIR}${PREFIX}/bin/tabbed" 53 rm -f "${DESTDIR}${PREFIX}/bin/xembed" 54 rm -f "${DESTDIR}${MANPREFIX}/man1/tabbed.1" 55 rm -f "${DESTDIR}${MANPREFIX}/man1/xembed.1" 56 57 .PHONY: all options clean dist install uninstall