3 INSTALL_PROGRAM ?= $(INSTALL)
4 INSTALL_DATA ?= $(INSTALL) -m 644
9 dss_objects := dss.o str.o file.o exec.o sig.o daemon.o df.o tv.o snap.o ipc.o dss.lsg.o
13 DSS_CPPFLAGS := -DVERSION_STRING='"$(VERSION_STRING)"'
14 DSS_CPPFLAGS += -Wunused-macros
16 DSS_CFLAGS := -Wno-sign-compare -g -Wunused -Wundef
17 DSS_CFLAGS += -Wredundant-decls
20 DSS_CFLAGS += -Wuninitialized
21 DSS_CFLAGS += -Wchar-subscripts
22 DSS_CFLAGS += -Wformat-security
23 DSS_CFLAGS += -Werror-implicit-function-declaration
24 DSS_CFLAGS += -Wmissing-format-attribute
25 DSS_CFLAGS += -Wunused-parameter
26 DSS_CFLAGS += -Wbad-function-cast
27 DSS_CFLAGS += -Wshadow
29 Makefile.deps: $(wildcard *.c *.h)
30 $(CC) -MM -MG $(DSS_CPPFLAGS) $(CPPFLAGS) $(DSS_CFLAGS) $(CFLAGS) *.c > $@
32 -include Makefile.deps
35 $(CC) -o $@ $(dss_objects) $(LDFLAGS) -llopsub
38 $(CC) -c $(DSS_CPPFLAGS) $(CPPFLAGS) $(DSS_CFLAGS) $(CFLAGS) $<
44 lopsubgen --gen-h=$@ < $<
46 lopsubgen --gen-c=$@ < $<
48 lopsubgen --gen-man=$@ --version-string=$(VERSION_STRING) < $<
51 groff -m man -Thtml -P -l -P -r $< | sed -e '1,/^<body>/d; /^<\/body>/,$$d' > $@
54 rm -f *.o dss dss.1 dss.1.html Makefile.deps *.png *~ index.html dss.lsg.h dss.lsg.c
56 ifneq ($(findstring strip, $(MAKECMDGOALS)),)
59 bindir := $(DESTDIR)$(PREFIX)/bin
60 mandir := $(DESTDIR)$(PREFIX)/share/man/man1
61 install install-strip: all
62 $(MKDIR_P) $(bindir) $(mandir)
63 $(INSTALL_PROGRAM) $(strip_option) dss $(bindir)
64 $(INSTALL_DATA) dss.1 $(mandir)
66 index.html: dss.1.html index.html.in INSTALL README NEWS
67 sed -e '/@README@/,$$d' index.html.in > $@
69 sed -e '1,/@README@/d' -e '/@NEWS@/,$$d' index.html.in >> $@
71 sed -e '1,/@NEWS@/d' -e '/@INSTALL@/,$$d' index.html.in >> $@
72 markdown INSTALL >> $@
73 sed -e '1,/@INSTALL@/d' -e '/@MAN_PAGE@/,$$d' index.html.in >> $@
75 sed -e '1,/@MAN_PAGE@/d' index.html.in >> $@