-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
57 lines (44 loc) · 1.53 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
# repowm - window manager for linux
# See LICENSE file for copyright and license details.
include config.mk
SRC = drw.c repowm.c util.c
OBJ = ${SRC:.c=.o}
all: options repowm
options:
@echo repowm 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 $@
repowm: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
clean:
rm -f repowm ${OBJ} repowm-${VERSION}.tar.gz config.h
dist: clean
mkdir -p repowm-${VERSION}
cp -R LICENSE Makefile README config.def.h config.mk\
repowm.1 drw.h util.h ${SRC} repowm.png transient.c repowm-${VERSION}
tar -cf repowm-${VERSION}.tar repowm-${VERSION}
gzip repowm-${VERSION}.tar
rm -rf repowm-${VERSION}
install: all
install -d ${DESTDIR}{${PREFIX}/bin,${SHAREPREFIX}/xsessions,${MANPREFIX}/man1}
install -m 755 -s repowm ${DESTDIR}${PREFIX}/bin/
install -m 755 repobar ${DESTDIR}${PREFIX}/bin/
install -m 755 repoopen ${DESTDIR}${PREFIX}/bin/
install -m 755 layoutmenu ${DESTDIR}${PREFIX}/bin/
install -m 644 repowm.1 ${DESTDIR}${MANPREFIX}/man1/
sed -i 's/VERSION/${VERSION}/g' ${DESTDIR}${MANPREFIX}/man1/repowm.1
install -m 644 repowm.desktop ${DESTDIR}${SHAREPREFIX}/xsessions
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/repowm\
${DESTDIR}${PREFIX}/bin/repobar\
${DESTDIR}${PREFIX}/bin/repoopen\
${DESTDIR}${PREFIX}/bin/layoutmenu\
${DESTDIR}${MANPREFIX}/man1/repowm.1\
${DESTDIR}${SHAREPREFIX}/xsessions/repowm.desktop
.PHONY: all options clean dist install uninstall