-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (50 loc) · 1.94 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
58
59
60
61
62
63
64
include config.mk
SRC = draw.c main.c util.c action.c
OBJ = ${SRC:.c=.o}
all: options nezd
options:
@echo nezd build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
# @echo "LD = ${LD}"
.c.o:
@echo CC $<
@${CC} -c ${CFLAGS} $<
${OBJ}: nezd.h action.h config.mk
nezd: ${OBJ}
@echo LD $@
@${LD} -o $@ ${OBJ} ${LDFLAGS}
@strip $@
@echo "Run ./help for documentation"
gadgets: $(MAKE) -C gadgets
clean:
@echo cleaning
@rm -f nezd ${OBJ} nezd-${VERSION}.tar.gz
dist: clean
@echo creating dist tarball
@mkdir -p nezd-${VERSION}
@mkdir -p nezd-${VERSION}/gadgets
@mkdir -p nezd-${VERSION}/bitmaps
@cp -R CREDITS LICENSE Makefile INSTALL README.nezd README help config.mk action.h nezd.h ${SRC} nezd-${VERSION}
@cp -R gadgets/Makefile gadgets/config.mk gadgets/README.dbar gadgets/textwidth.c gadgets/README.textwidth gadgets/dbar.c gadgets/gdbar.c gadgets/README.gdbar gadgets/gcpubar.c gadgets/README.gcpubar gadgets/kittscanner.sh gadgets/README.kittscanner gadgets/noisyalert.sh nezd-${VERSION}/gadgets
@cp -R bitmaps/alert.xbm bitmaps/ball.xbm bitmaps/battery.xbm bitmaps/envelope.xbm bitmaps/volume.xbm bitmaps/pause.xbm bitmaps/play.xbm bitmaps/music.xbm nezd-${VERSION}/bitmaps
@tar -cf nezd-${VERSION}.tar nezd-${VERSION}
@gzip nezd-${VERSION}.tar
@rm -rf nezd-${VERSION}
install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f nezd ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/nezd
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@cp -f nezd.1 ${DESTDIR}${MANPREFIX}/man1/nezd.1
install-gadgets: gadgets
$(MAKE) -c gadgets install
uninstall-gadgets: gadgets
$(MAKE) -c gadgets uninstall
uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
@rm -f ${DESTDIR}${PREFIX}/bin/nezd
@rm -f ${DESTDIR}${MANPREFIX}/man1/nezd.1
.PHONY: all options clean dist install uninstall gadgets install-gadgets uninstall-gadgets