rev |
line source |
garbeam@0
|
1 # gridwm - grid window manager
|
garbeam@0
|
2 # (C)opyright MMVI Anselm R. Garbe
|
garbeam@0
|
3
|
garbeam@0
|
4 include config.mk
|
garbeam@0
|
5
|
garbeam@18
|
6 WMSRC = bar.c client.c cmd.c draw.c event.c kb.c mouse.c util.c wm.c
|
garbeam@2
|
7 WMOBJ = ${WMSRC:.c=.o}
|
garbeam@4
|
8 MENSRC = menu.c draw.c util.c
|
garbeam@3
|
9 MENOBJ = ${MENSRC:.c=.o}
|
garbeam@5
|
10 MAN1 = gridwm.1 gridmenu.1
|
garbeam@15
|
11 BIN = gridwm gridmenu
|
garbeam@0
|
12
|
garbeam@15
|
13 all: config gridwm gridmenu
|
garbeam@0
|
14 @echo finished
|
garbeam@0
|
15
|
garbeam@1
|
16 config:
|
garbeam@1
|
17 @echo gridwm build options:
|
garbeam@1
|
18 @echo "LIBS = ${LIBS}"
|
garbeam@1
|
19 @echo "CFLAGS = ${CFLAGS}"
|
garbeam@1
|
20 @echo "LDFLAGS = ${LDFLAGS}"
|
garbeam@1
|
21 @echo "CC = ${CC}"
|
garbeam@1
|
22
|
garbeam@0
|
23 .c.o:
|
garbeam@0
|
24 @echo CC $<
|
garbeam@0
|
25 @${CC} -c ${CFLAGS} $<
|
garbeam@0
|
26
|
garbeam@3
|
27 ${WMOBJ}: wm.h draw.h config.h util.h
|
garbeam@3
|
28
|
garbeam@3
|
29 gridmenu: ${MENOBJ}
|
garbeam@3
|
30 @echo LD $@
|
garbeam@3
|
31 @${CC} -o $@ ${MENOBJ} ${LDFLAGS}
|
garbeam@0
|
32
|
garbeam@2
|
33 gridwm: ${WMOBJ}
|
garbeam@0
|
34 @echo LD $@
|
garbeam@2
|
35 @${CC} -o $@ ${WMOBJ} ${LDFLAGS}
|
garbeam@0
|
36
|
garbeam@0
|
37 clean:
|
garbeam@3
|
38 rm -f gridwm gridmenu *.o core
|
garbeam@1
|
39
|
garbeam@1
|
40 dist: clean
|
garbeam@1
|
41 mkdir -p gridwm-${VERSION}
|
garbeam@3
|
42 cp -R Makefile README LICENSE config.mk *.h *.c ${MAN} gridwm-${VERSION}
|
garbeam@1
|
43 tar -cf gridwm-${VERSION}.tar gridwm-${VERSION}
|
garbeam@1
|
44 gzip gridwm-${VERSION}.tar
|
garbeam@1
|
45 rm -rf gridwm-${VERSION}
|
garbeam@1
|
46
|
garbeam@1
|
47 install: all
|
garbeam@1
|
48 @mkdir -p ${DESTDIR}${PREFIX}/bin
|
garbeam@1
|
49 @cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
|
garbeam@1
|
50 @echo installed executable files to ${DESTDIR}${PREFIX}/bin
|
garbeam@1
|
51 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
garbeam@1
|
52 @cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
|
garbeam@1
|
53 @echo installed manual pages to ${DESTDIR}${MANPREFIX}/man1
|
garbeam@1
|
54
|
garbeam@1
|
55 uninstall:
|
garbeam@1
|
56 for i in ${BIN}; do \
|
garbeam@1
|
57 rm -f ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
|
garbeam@1
|
58 done
|
garbeam@1
|
59 for i in ${MAN1}; do \
|
garbeam@1
|
60 rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
|
garbeam@1
|
61 done
|