2006-10-12 18:10:57 +04:00
|
|
|
# window manager improved 2 - window manager improved 2
|
2007-03-22 05:58:59 +03:00
|
|
|
# © 2006 Anselm R. Garbe
|
|
|
|
# © 2006-2007 Kris Maglione
|
2007-02-26 23:56:41 +03:00
|
|
|
.POSIX:
|
2005-11-18 18:54:58 +03:00
|
|
|
|
|
|
|
include config.mk
|
|
|
|
|
2007-02-13 06:44:42 +03:00
|
|
|
SRC = area.c bar.c client.c column.c draw.c event.c frame.c fs.c \
|
2007-02-15 07:20:47 +03:00
|
|
|
geom.c key.c main.c mouse.c rule.c printevent.c util.c view.c
|
2006-10-12 18:10:57 +04:00
|
|
|
OBJ = ${SRC:.c=.o}
|
2007-02-23 02:32:23 +03:00
|
|
|
MAN1 = wmii wmiir wmiiwm wmiiloop
|
2007-03-15 01:31:58 +03:00
|
|
|
SCRIPTS = wmiistartrc wmiir wmiiloop wmii9rc
|
2007-03-15 02:12:03 +03:00
|
|
|
BIN = wmii wmii9menu
|
2005-11-18 18:54:58 +03:00
|
|
|
|
2007-02-27 00:04:04 +03:00
|
|
|
all: options ${BIN}
|
2005-11-18 18:54:58 +03:00
|
|
|
|
2006-10-12 18:10:57 +04:00
|
|
|
options:
|
2005-11-18 18:54:58 +03:00
|
|
|
@echo wmii build options:
|
|
|
|
@echo "CFLAGS = ${CFLAGS}"
|
|
|
|
@echo "LDFLAGS = ${LDFLAGS}"
|
|
|
|
@echo "CC = ${CC}"
|
|
|
|
|
2006-10-12 18:10:57 +04:00
|
|
|
.c.o:
|
|
|
|
@echo CC $<
|
|
|
|
@${CC} -c ${CFLAGS} $<
|
|
|
|
|
2007-02-20 01:04:38 +03:00
|
|
|
# In case this isn't from hg
|
|
|
|
.hg/00changelog.i:
|
|
|
|
@mkdir .hg
|
|
|
|
@touch .hg/00changelog.i
|
|
|
|
# VERSION must be updated on every commit/pull
|
|
|
|
config.mk: .hg/00changelog.i
|
|
|
|
|
2006-10-20 12:07:55 +04:00
|
|
|
${OBJ}: wmii.h config.mk
|
2006-10-12 18:10:57 +04:00
|
|
|
|
2007-02-27 00:04:04 +03:00
|
|
|
9menu.o: config.mk
|
|
|
|
|
2007-03-15 02:12:03 +03:00
|
|
|
wmii: ${OBJ}
|
2006-10-12 18:10:57 +04:00
|
|
|
@echo LD $@
|
2007-02-27 00:04:04 +03:00
|
|
|
@${CC} -o $@ ${OBJ} ${LDFLAGS} ${LIBIXP}
|
2007-02-26 12:27:03 +03:00
|
|
|
|
2007-02-26 12:46:55 +03:00
|
|
|
wmii9menu: 9menu.o
|
2007-02-26 12:27:03 +03:00
|
|
|
@echo LD $@
|
2007-02-26 12:46:55 +03:00
|
|
|
@${CC} -o $@ 9menu.o ${LDFLAGS}
|
2005-11-18 18:54:58 +03:00
|
|
|
|
|
|
|
clean:
|
2006-10-12 18:10:57 +04:00
|
|
|
@echo cleaning
|
2007-03-03 01:11:09 +03:00
|
|
|
@rm -f ${BIN} ${OBJ} 9menu.o wmii-${VERSION}.tar.gz
|
2006-10-12 18:10:57 +04:00
|
|
|
|
|
|
|
dist: clean
|
|
|
|
@echo creating dist tarball
|
|
|
|
@mkdir -p wmii-${VERSION}
|
2007-03-05 09:11:12 +03:00
|
|
|
@ln LICENSE Makefile config.mk README rc/ \
|
|
|
|
wmii.eps wmii.mp \
|
|
|
|
${MAN1:=.1} ${SRC} ${SCRIPTS} wmii.h 9menu.c \
|
|
|
|
wmii-${VERSION}/
|
|
|
|
@tar -zcf wmii-${VERSION}.tgz wmii-${VERSION}
|
2006-10-12 18:10:57 +04:00
|
|
|
@rm -rf wmii-${VERSION}
|
2005-11-18 18:54:58 +03:00
|
|
|
|
|
|
|
install: all
|
2007-02-23 02:32:23 +03:00
|
|
|
@echo installing executable files to ${DESTDIR}${PREFIX}/bin
|
|
|
|
@mkdir -p -m 0755 ${DESTDIR}${PREFIX}/bin
|
|
|
|
@for i in ${SCRIPTS}; do \
|
2007-02-26 23:56:41 +03:00
|
|
|
sed "s|CONFPREFIX|${CONFPREFIX}|g; \
|
|
|
|
s|CONFVERSION|${CONFVERSION}|g; \
|
2007-03-22 07:52:14 +03:00
|
|
|
s|P9PATHS|${P9PATHS}|g; \
|
2007-03-03 01:11:09 +03:00
|
|
|
s|AWKPATH|${AWKPATH}|g" \
|
|
|
|
$$i \
|
|
|
|
>${DESTDIR}${PREFIX}/bin/$$i; \
|
2007-02-23 02:32:23 +03:00
|
|
|
chmod 755 ${DESTDIR}${PREFIX}/bin/$$i; \
|
|
|
|
done
|
2007-02-26 12:27:03 +03:00
|
|
|
@for i in ${BIN}; do\
|
|
|
|
cp -f $$i ${DESTDIR}${PREFIX}/bin; \
|
|
|
|
chmod 755 ${DESTDIR}${PREFIX}/bin/$$i; \
|
|
|
|
done
|
2007-01-04 00:20:05 +03:00
|
|
|
@echo installing scripts to ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
|
2007-02-23 02:32:23 +03:00
|
|
|
@mkdir -p -m 0755 ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
|
2006-10-12 18:20:38 +04:00
|
|
|
@cd rc; for i in *; do \
|
2007-03-03 17:42:06 +03:00
|
|
|
sed "s|CONFPREFIX|${CONFPREFIX}|g" $$i \
|
2007-03-03 01:11:09 +03:00
|
|
|
>${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}/$$i; \
|
2007-01-04 00:20:05 +03:00
|
|
|
chmod 755 ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}/$$i; \
|
2007-02-26 12:27:03 +03:00
|
|
|
done
|
2006-10-12 18:10:57 +04:00
|
|
|
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
|
2007-02-23 02:32:23 +03:00
|
|
|
@mkdir -p -m 0755 ${DESTDIR}${MANPREFIX}/man1
|
|
|
|
@for i in ${MAN1:=.1}; do \
|
2007-03-03 01:11:09 +03:00
|
|
|
sed "s/VERSION/${VERSION}/g; \
|
|
|
|
s|CONFPREFIX|${CONFPREFIX}|g" \
|
|
|
|
$$i \
|
|
|
|
>${DESTDIR}${MANPREFIX}/man1/$$i; \
|
2007-02-23 02:32:23 +03:00
|
|
|
chmod 644 ${DESTDIR}${MANPREFIX}/man1/$$i; \
|
|
|
|
done
|
2005-11-18 18:54:58 +03:00
|
|
|
|
|
|
|
uninstall:
|
2007-02-23 02:32:23 +03:00
|
|
|
@echo removing executable files from ${DESTDIR}${PREFIX}/bin
|
2007-02-26 12:46:55 +03:00
|
|
|
@cd ${DESTDIR}${PREFIX}/bin && rm -f ${SCRIPTS} ${BIN}
|
2007-01-04 00:20:05 +03:00
|
|
|
@echo removing scripts from ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
|
|
|
|
@rm -rf ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
|
2006-10-12 18:10:57 +04:00
|
|
|
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
|
2007-02-23 02:32:23 +03:00
|
|
|
@cd ${DESTDIR}${MANPREFIX}/man1 && rm -f ${MAN1:=.1}
|
2006-10-12 18:10:57 +04:00
|
|
|
|
|
|
|
.PHONY: all options clean dist install uninstall
|