File: Makefile

package info (click to toggle)
dzen2 0.8.5-4
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 292 kB
  • ctags: 270
  • sloc: ansic: 2,357; makefile: 106; sh: 62
file content (59 lines) | stat: -rw-r--r-- 1,817 bytes parent folder | download | duplicates (2)
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
# dzen2 
#   (C)opyright MMVII Robert Manea

include config.mk

SRC = draw.c main.c util.c action.c
OBJ = ${SRC:.c=.o}

all: options dzen2 gadgets-all

gadgets-%:
	$(MAKE) -C gadgets $(*)

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

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

${OBJ}: dzen.h action.h config.mk

dzen2: ${OBJ}
	@echo LD $@
	@${LD} -o $@ ${OBJ} ${LDFLAGS}
	@strip $@
	@echo "Run ./help for documentation"

clean: gadgets-clean
	@echo cleaning
	@rm -f dzen2 ${OBJ} dzen2-${VERSION}.tar.gz

dist: clean
	@echo creating dist tarball
	@mkdir -p dzen2-${VERSION}
	@mkdir -p dzen2-${VERSION}/gadgets
	@mkdir -p dzen2-${VERSION}/bitmaps
	@cp -R CREDITS LICENSE Makefile INSTALL README.dzen README help config.mk action.h dzen.h ${SRC} dzen2-${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 dzen2-${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  dzen2-${VERSION}/bitmaps
	@tar -cf dzen2-${VERSION}.tar dzen2-${VERSION}
	@gzip dzen2-${VERSION}.tar
	@rm -rf dzen2-${VERSION}

install: all gadgets-install
	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
	@mkdir -p ${DESTDIR}${PREFIX}/bin
	@cp -f dzen2 ${DESTDIR}${PREFIX}/bin
	@chmod 755 ${DESTDIR}${PREFIX}/bin/dzen2

uninstall:
	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
	@rm -f ${DESTDIR}${PREFIX}/bin/dzen2

.PHONY: all options clean dist install uninstall