polytreewm/Makefile

66 lines
1.9 KiB
Makefile
Raw Normal View History

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