-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
64 lines (49 loc) · 1.62 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# demwm - dynamic explostion-mental's window manager
# See LICENSE file for copyright and license details.
# demwm version
VERSION = 1.8
# demwm git exact commit version
SRCVERSION = $$(git describe --tags --dirty=[modified] 2>/dev/null || echo ${VERSION}-nogit)
include config.mk
SRC = drw.c demwm.c util.c
OBJ = ${SRC:.c=.o}
all: options demwm
options:
@echo "VERSION = ${VERSION}"
@echo "FEATURES = ${ICONS} ${SYSTRAY} ${TAG_PREVIEWS} ${XINERAMAFLAGS} ${DEBUG}"
@echo demwm build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
@echo
.c.o:
@${CC} -c ${CFLAGS} $<
@echo "${CC} -c $ CFLAGS $<"
${OBJ}: config.h config.mk
config.h:
cp config.def.h $@
demwm: ${OBJ}
@${CC} -o $@ ${OBJ} ${LDFLAGS}
@echo "${CC} -o $@ ${OBJ} LDFLAGS"
clean:
rm -f demwm ${OBJ} demwm-${VERSION}.tar.gz
dist: clean
mkdir -p demwm-${VERSION}
cp -R LICENSE Makefile README config.def.h config.mk\
demwm.1 drw.h util.h ${SRC} demwm.png transient.c demwm-${VERSION}
tar -cf demwm-${VERSION}.tar demwm-${VERSION}
gzip demwm-${VERSION}.tar
rm -rf demwm-${VERSION}
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f demwm demwm_random_wall ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/demwm
chmod 755 ${DESTDIR}${PREFIX}/bin/demwm_random_wall
mkdir -p ${DESTDIR}${MANPREFIX}/man1
sed "s/VERSION/${VERSION}/g" < demwm.1 > ${DESTDIR}${MANPREFIX}/man1/demwm.1
chmod 644 ${DESTDIR}${MANPREFIX}/man1/demwm.1
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/demwm\
$(DESTDIR)$(PREFIX)/bin/demwm_random_wall\
${DESTDIR}${MANPREFIX}/man1/demwm.1
.PHONY: all options clean dist install uninstall