rsync: Remove hardcoded --quiet option.
[dss.git] / Makefile
1 dss_objects := cmdline.o dss.o str.o file.o exec.o sig.o daemon.o df.o tv.o snap.o ipc.o
2 all: dss
3 man: dss.1
4
5 DEBUG_CFLAGS ?=
6 DEBUG_CFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
7 DEBUG_CFLAGS += -Wredundant-decls
8 CFLAGS ?=
9 CFLAGS += -Os
10 CFLAGS += -Wall
11 CFLAGS += -Wuninitialized
12 CFLAGS += -Wchar-subscripts
13 CFLAGS += -Wformat-security
14 CFLAGS += -Werror-implicit-function-declaration
15 CFLAGS += -Wmissing-format-attribute
16 CFLAGS += -Wunused-macros
17 CFLAGS += -Wbad-function-cast
18
19 Makefile.deps: $(wildcard *.c *.h)
20         gcc -MM -MG *.c > $@
21
22 -include Makefile.deps
23
24 dss: $(dss_objects)
25         $(CC) -o $@ $(dss_objects)
26
27 cmdline.o: cmdline.c cmdline.h
28         $(CC) -c $(CFLAGS) $<
29
30 %.o: %.c Makefile
31         $(CC) -c $(CFLAGS) $(DEBUG_CFLAGS) $<
32
33 %.ppm: %.sk
34         sk2ppm $< > $@
35 %.png: %.ppm
36         convert $< $@
37
38 cmdline.c cmdline.h: dss.ggo
39         gengetopt --conf-parser < $<
40
41 dss.1: dss dss.1.inc
42         help2man -h --detailed-help --include dss.1.inc -N ./$< > $@
43
44 %.1.html: %.1
45         man2html $< > $@
46
47 clean:
48         rm -f *.o dss dss.1 dss.1.html Makefile.deps *.ppm *.png *~ cmdline.c cmdline.h index.html
49
50 index.html: dss.1.html index.html.in INSTALL README NEWS
51         sed -e '/@README@/,$$d' index.html.in > $@
52         grutatxt -nb < README >> $@
53         sed -e '1,/@README@/d' -e '/@NEWS@/,$$d' index.html.in >> $@
54         grutatxt -nb < NEWS >> $@
55         sed -e '1,/@NEWS@/d' -e '/@INSTALL@/,$$d' index.html.in >> $@
56         grutatxt -nb < INSTALL >> $@
57         sed -e '1,/@INSTALL@/d' -e '/@MAN_PAGE@/,$$d' index.html.in >> $@
58         sed -e '1,/Return to Main Contents/d' -e '/Index/,$$d' dss.1.html >> $@
59         sed -e '1,/@MAN_PAGE@/d' index.html.in >> $@