dss.ggo: Add more documentation, and reformat help text.
[dss.git] / Makefile
1 dss_objects := cmdline.o dss.o string.o fd.o exec.o signal.o daemon.o df.o time.o
2 all: dss
3 man: dss.1
4
5 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
6 DEBUG_CPPFLAGS += -Wredundant-decls
7 CPPFLAGS += -Os
8 CPPFLAGS += -Wall
9 CPPFLAGS += -Wuninitialized
10 CPPFLAGS += -Wchar-subscripts
11 CPPFLAGS += -Wformat-security
12 CPPFLAGS += -Werror-implicit-function-declaration
13 CPPFLAGS += -Wmissing-format-attribute
14 CPPFLAGS += -Wunused-macros
15 CPPFLAGS += -Wbad-function-cast
16
17 Makefile.deps: $(wildcard *.c *.h)
18         gcc -MM -MG *.c > $@
19
20 include Makefile.deps
21
22 dss: $(dss_objects)
23         $(CC) $(CPPFLAGS) $(DEBUG_CPPFLAGS) -o $@ $(dss_objects)
24
25 %.o: %.c cmdline.h
26         $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
27
28 %.ppm: %.sk
29         sk2ppm $< > $@
30 %.png: %.ppm
31         convert $< $@
32
33 cmdline.c cmdline.h: dss.ggo
34         gengetopt --unamed-opts=command --conf-parser < $<
35
36 dss.1: dss
37         help2man -N ./$< > $@
38
39 %.1.html: %.1
40         man2html $< > $@
41
42 clean:
43         rm -f *.o dss dss.1 dss.1.html Makefile.deps *.ppm *.png *~ cmdline.c cmdline.h
44
45