-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
48 lines (36 loc) · 1.07 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
# dusk - a dwm fork
# See LICENSE file for copyright and license details.
include config.mk
SRC = drw.c dusk.c util.c
OBJ = ${SRC:.c=.o}
all: dusk duskc
.c.o:
${CC} -c ${CFLAGS} $<
${OBJ}: config.h config.mk
config.h:
cp config.def.h $@
dusk: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
duskc:
${CC} -o $@ lib/ipc/duskc.c ${LDFLAGS}
clean:
rm -f dusk ${OBJ}
rm -f duskc
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
rm -f ${DESTDIR}${PREFIX}/bin/dusk
cp -f dusk ${DESTDIR}${PREFIX}/bin
cp -f duskc ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/dusk
chmod 755 ${DESTDIR}${PREFIX}/bin/duskc
mkdir -p ${DESTDIR}${MANPREFIX}/man1
sed "s/VERSION/${VERSION}/g" < dusk.1 > ${DESTDIR}${MANPREFIX}/man1/dusk.1
chmod 644 ${DESTDIR}${MANPREFIX}/man1/dusk.1
mkdir -p /usr/share/xsessions
test -f /usr/share/xsessions/dusk.desktop || cp -n dusk.desktop /usr/share/xsessions/
chmod 644 /usr/share/xsessions/dusk.desktop
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/dusk\
${DESTDIR}${MANPREFIX}/man1/dusk.1\
/usr/share/xsessions/dusk.desktop
.PHONY: all clean install uninstall