summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-05-20 15:04:05 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-05-20 15:04:05 +0100
commitac3fe41b9b77964a56da652c3930f5e52dc40668 (patch)
treee064fd55b31ed9fc65117ae9cf1898efc8e46f1b /Makefile
downloadwmname-ac3fe41b9b77964a56da652c3930f5e52dc40668.tar.gz
wmname-ac3fe41b9b77964a56da652c3930f5e52dc40668.zip
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile50
1 files changed, 50 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..21786ef
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,50 @@
+# set wm name - sets the WM name
+
+include config.mk
+
+SRC = setwmname.c
+OBJ = ${SRC:.c=.o}
+
+all: options setwmname
+
+options:
+ @echo setwmname build options:
+ @echo "CFLAGS = ${CFLAGS}"
+ @echo "LDFLAGS = ${LDFLAGS}"
+ @echo "CC = ${CC}"
+ @echo "LD = ${LD}"
+
+.c.o:
+ @echo CC $<
+ @${CC} -c ${CFLAGS} $<
+
+${OBJ}: config.mk
+
+setwmname: ${OBJ}
+ @echo LD $@
+ @${LD} -o $@ ${OBJ} ${LDFLAGS}
+ @strip $@
+
+clean:
+ @echo cleaning
+ @rm -f setwmname ${OBJ} setwmname-${VERSION}.tar.gz
+
+dist: clean
+ @echo creating dist tarball
+ @mkdir -p setwmname-${VERSION}
+ @cp -R LICENSE Makefile README config.mk ${SRC} setwmname-${VERSION}
+ @tar -cf setwmname-${VERSION}.tar setwmname-${VERSION}
+ @gzip setwmname-${VERSION}.tar
+ @rm -rf setwmname-${VERSION}
+
+install: all
+ @echo installing executable file to ${DESTDIR}${PREFIX}/bin
+ @mkdir -p ${DESTDIR}${PREFIX}/bin
+ @cp -f setwmname ${DESTDIR}${PREFIX}/bin
+ @chmod 755 ${DESTDIR}${PREFIX}/bin/setwmname
+
+uninstall:
+ @echo removing executable file from ${DESTDIR}${PREFIX}/bin
+ @rm -f ${DESTDIR}${PREFIX}/bin/setwmname
+
+.PHONY: all options clean dist install uninstall