polytreewm/Makefile

58 lines
1.6 KiB
Makefile
Raw Normal View History

2021-11-14 18:17:50 +00:00
# PolytreeWM - tiling window manager
2008-04-20 18:09:30 +00:00
# See LICENSE file for copyright and license details.
2006-07-10 14:38:18 +00:00
include config.mk
2021-11-16 17:19:03 +00:00
SRC = atoms.c drw.c dwm.c helpers.c layouts.c menu.c settings.c spawn.c tags.c util.c
2006-07-12 23:30:55 +00:00
OBJ = ${SRC:.c=.o}
2021-11-16 15:03:26 +00:00
DWM_SRC = dwm/handlers.c dwm/layouts.c dwm/swallow.c dwm/systray.c
DWM_HDR = ${DWM_SRC:.c=.h}
2021-11-14 18:17:50 +00:00
all: options polytreewm
2006-07-10 14:38:18 +00:00
2006-07-17 16:49:13 +00:00
options:
2021-11-14 18:17:50 +00:00
@echo PolytreeWM build options:
2006-07-10 14:49:43 +00:00
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
2021-11-12 21:48:06 +00:00
%.o: %.c
${CC} -c $< -o $@ ${CFLAGS}
2006-07-10 14:38:18 +00:00
2021-11-16 15:03:26 +00:00
dwm.o: ${DWM_SRC} ${DWM_HDR}
2021-11-16 17:19:03 +00:00
${OBJ}: atoms.h drw.h config.def.h config.mk helpers.h layouts.h menu.h settings.h spawn.h tags.h util.h
2021-11-14 18:17:50 +00:00
polytreewm: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
2006-07-10 14:38:18 +00:00
clean:
2021-11-14 18:17:50 +00:00
rm -f polytreewm ${OBJ} polytreewm-${VERSION}.tar.gz
2006-07-10 14:49:43 +00:00
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
2021-11-14 18:17:50 +00:00
cp -f polytreewm ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/polytreewm
2021-11-12 08:42:58 +00:00
mkdir -p ${DESTDIR}${MANPREFIX}/man1
2021-11-14 18:17:50 +00:00
sed "s/VERSION/${VERSION}/g" < polytreewm.1 > ${DESTDIR}${MANPREFIX}/man1/polytreewm.1
chmod 644 ${DESTDIR}${MANPREFIX}/man1/polytreewm.1
2006-07-10 14:49:43 +00:00
2021-11-12 08:42:58 +00:00
xinstall: install
mkdir -p ${DESTDIR}${ICONSPREFIX}
2021-11-14 18:17:50 +00:00
cp -f polytreewm.png ${DESTDIR}${ICONSPREFIX}
chmod 644 ${DESTDIR}${ICONSPREFIX}/polytreewm.png
2021-11-12 08:42:58 +00:00
mkdir -p ${DESTDIR}${XSESSIONSPREFIX}
2021-11-14 18:17:50 +00:00
cp -f polytreewm.desktop ${DESTDIR}${XSESSIONSPREFIX}
chmod 644 ${DESTDIR}${XSESSIONSPREFIX}/polytreewm.desktop
2021-11-12 08:42:58 +00:00
2006-07-10 14:49:43 +00:00
uninstall:
2021-11-12 08:42:58 +00:00
rm -f \
2021-11-14 18:17:50 +00:00
${DESTDIR}${PREFIX}/bin/polytreewm \
${DESTDIR}${MANPREFIX}/man1/polytreewm.1 \
${DESTDIR}${ICONSPREFIX}/polytreewm.png \
${DESTDIR}${XSESSIONSPREFIX}/polytreewm.desktop
2021-11-16 17:25:39 +00:00
.PHONY: all options clean install uninstall xinstall