summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorConnor Lane Smith <cls@lubutu.com>2015-05-06 17:46:10 +0100
committerChristoph Lohmann <20h@r-36.net>2015-05-09 20:03:08 +0200
commitd60069a3e7a9e382f3221f8e405ad8c05abeea20 (patch)
tree457490ce70458e79e7adeb3ec019a2bf74cd93dc /Makefile
parent0728caee306423cd1dc139e000828329c9285ab7 (diff)
add xembed wrapper utility
xembed will cause a command to attempt to XEmbed into the window given by the environment variable XEMBED, so long as it is in the foreground of its controlling terminal. This causes a process to effectively take the place of the terminal window, unless it is backgrounded. Signed-off-by: Christoph Lohmann <20h@r-36.net>
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