summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 15 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 32cc25b..acc3246 100644
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,11 @@
include config.mk
-SRC = tabbed.c
+SRC = tabbed.c xembed.c
OBJ = ${SRC:.c=.o}
+BIN = ${OBJ:.o=}
-all: options tabbed
+all: options ${BIN}
options:
@echo tabbed build options:
@@ -24,13 +25,13 @@ config.h:
@echo creating $@ from config.def.h
@cp config.def.h $@
-tabbed: tabbed.o
+.o:
@echo CC -o $@
- @${CC} -o $@ tabbed.o ${LDFLAGS}
+ @${CC} -o $@ $< ${LDFLAGS}
clean:
@echo cleaning
- @rm -f tabbed ${OBJ} tabbed-${VERSION}.tar.gz
+ @rm -f ${BIN} ${OBJ} tabbed-${VERSION}.tar.gz
dist: clean
@echo creating dist tarball
@@ -42,19 +43,23 @@ dist: clean
@rm -rf tabbed-${VERSION}
install: all
- @echo installing executable file to ${DESTDIR}${PREFIX}/bin
+ @echo installing executable files to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
- @cp -f tabbed ${DESTDIR}${PREFIX}/bin
+ @cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/tabbed
- @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
+ @echo installing manual pages to ${DESTDIR}${MANPREFIX}/man1
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@sed "s/VERSION/${VERSION}/g" < tabbed.1 > ${DESTDIR}${MANPREFIX}/man1/tabbed.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/tabbed.1
+ @sed "s/VERSION/${VERSION}/g" < xembed.1 > ${DESTDIR}${MANPREFIX}/man1/xembed.1
+ @chmod 644 ${DESTDIR}${MANPREFIX}/man1/xembed.1
uninstall:
- @echo removing executable file from ${DESTDIR}${PREFIX}/bin
+ @echo removing executable files from ${DESTDIR}${PREFIX}/bin
@rm -f ${DESTDIR}${PREFIX}/bin/tabbed
- @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
+ @rm -f ${DESTDIR}${PREFIX}/bin/xembed
+ @echo removing manual pages from ${DESTDIR}${MANPREFIX}/man1
@rm -f ${DESTDIR}${MANPREFIX}/man1/tabbed.1
+ @rm -f ${DESTDIR}${MANPREFIX}/man1/xembed.1
.PHONY: all options clean dist install uninstall