File: Makefile

package info (click to toggle)
dunst 0.2.0-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 180 kB
  • sloc: ansic: 1,680; makefile: 86
file content (55 lines) | stat: -rw-r--r-- 1,344 bytes parent folder | download
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
# dunst - Notification-daemon
# See LICENSE file for copyright and license details.

include config.mk

SRC = draw.c dunst.c ini.c
OBJ = ${SRC:.c=.o}

all: doc options dunst

options:
	@echo dunst build options:
	@echo "CFLAGS   = ${CFLAGS}"
	@echo "LDFLAGS  = ${LDFLAGS}"
	@echo "CC       = ${CC}"

.c.o:
	@echo CC -c $<
	@${CC} -c $< ${CFLAGS}

${OBJ}: config.mk

dunst: draw.o dunst.o ini.o
	@echo CC -o $@
	@${CC} ${CFLAGS} -o $@ dunst.o draw.o ini.o ${LDFLAGS}

clean:
	@echo cleaning
	@rm -f ${OBJ}
	@rm -f dunst
	@rm -f dunst.1

doc: dunst.1
dunst.1: README.pod
	pod2man $< > $@

install: all
	@echo installing executables to ${DESTDIR}${PREFIX}/bin
	@mkdir -p ${DESTDIR}${PREFIX}/bin
	@cp -f dunst ${DESTDIR}${PREFIX}/bin
	@chmod 755 ${DESTDIR}${PREFIX}/bin/dunst
	@echo installing manual pages to ${DESTDIR}${MANPREFIX}/man1
	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
	@cp -f dunst.1 ${DESTDIR}${MANPREFIX}/man1/
	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/dunst.1
	@mkdir -p "${DESTDIR}${PREFIX}/share/doc/dunst"
	@ cp -f dunstrc ${DESTDIR}${PREFIX}/share/doc/dunst/dunstrc.example

uninstall:
	@echo removing executables from ${DESTDIR}${PREFIX}/bin
	@rm -f ${DESTDIR}${PREFIX}/bin/dunst
	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
	@rm -f ${DESTDIR}${MANPREFIX}/man1/dunst

.PHONY: all options clean dist install uninstall