-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·60 lines (45 loc) · 1.41 KB
/
Makefile
File metadata and controls
executable file
·60 lines (45 loc) · 1.41 KB
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
# 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}
# FreeBSD users, prefix all ifdef, else and endif statements with a . for this to work (e.g. .ifdef)
all: options dusk duskc
options:
@echo dusk build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
.c.o:
${CC} -c ${CFLAGS} $<
${OBJ}: config.h config.mk
config.h:
cp config.def.h $@
dusk: ${OBJ}
${CC} -O3 -march=native -o $@ ${OBJ} ${LDFLAGS}
duskc:
${CC} -o $@ lib/ipc/duskc.c ${LDFLAGS}
clean:
rm -f dusk ${OBJ} dusk-${VERSION}.tar.gz
rm -f duskc
dist: clean
mkdir -p dusk-${VERSION}
cp -R LICENSE Makefile README config.def.h config.mk\
dusk.1 drw.h util.h ${SRC} dusk.png transient.c dusk-${VERSION}
tar -cf dusk-${VERSION}.tar dusk-${VERSION}
gzip dusk-${VERSION}.tar
rm -rf dusk-${VERSION}
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
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
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/dusk\
${DESTDIR}${MANPREFIX}/man1/dusk.1\
/usr/share/xsessions/dusk.desktop
.PHONY: all options clean dist install uninstall