1 # SPDX-License-Identifier: GPL-2.0
4 INSTALL_PROGRAM ?
= $(INSTALL
)
5 INSTALL_DATA ?
= $(INSTALL
) -m
644
10 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
14 DSS_CPPFLAGS
:= -DVERSION_STRING
='"$(VERSION_STRING)"'
15 DSS_CPPFLAGS
+= -Wunused-macros
17 DSS_CFLAGS
:= -Wno-sign-compare
-g
-Wunused
-Wundef
18 DSS_CFLAGS
+= -Wredundant-decls
21 DSS_CFLAGS
+= -Wuninitialized
22 DSS_CFLAGS
+= -Wchar-subscripts
23 DSS_CFLAGS
+= -Wformat-security
24 DSS_CFLAGS
+= -Werror-implicit-function-declaration
25 DSS_CFLAGS
+= -Wmissing-format-attribute
26 DSS_CFLAGS
+= -Wunused-parameter
27 DSS_CFLAGS
+= -Wbad-function-cast
28 DSS_CFLAGS
+= -Wshadow
30 Makefile.deps
: $(wildcard *.c
*.h
)
31 $(CC
) -MM
-MG
$(DSS_CPPFLAGS
) $(CPPFLAGS
) $(DSS_CFLAGS
) $(CFLAGS
) *.c
> $@
33 -include Makefile.deps
36 $(CC
) -o
$@
$(dss_objects
) $(LDFLAGS
) -llopsub
39 $(CC
) -c
$(DSS_CPPFLAGS
) $(CPPFLAGS
) $(DSS_CFLAGS
) $(CFLAGS
) $<
45 lopsubgen
--gen-h
=$@
< $<
47 lopsubgen
--gen-c
=$@
< $<
49 lopsubgen
--gen-man
=$@
--version-string
=$(VERSION_STRING
) < $<
52 groff
-m man
-Thtml
-P
-l
-P
-r
$< | sed
-e
'1,/^<body>/d; /^<\/body>/,$$d' > $@
55 rm -f
*.o dss dss
.1 dss
.1.html Makefile.deps
*.png
*~ index.html dss.lsg.h dss.lsg.c
57 ifneq ($(findstring strip, $(MAKECMDGOALS
)),)
60 bindir := $(DESTDIR
)$(PREFIX
)/bin
61 mandir := $(DESTDIR
)$(PREFIX
)/share
/man
/man1
62 install install-strip
: all
63 $(MKDIR_P
) $(bindir) $(mandir)
64 $(INSTALL_PROGRAM
) $(strip_option
) dss
$(bindir)
65 $(INSTALL_DATA
) dss
.1 $(mandir)
67 index.html
: dss
.1.html index.html.in INSTALL README NEWS
68 sed
-e
'/@README@/,$$d' index.html.in
> $@
70 sed
-e
'1,/@README@/d' -e
'/@NEWS@/,$$d' index.html.in
>> $@
72 sed
-e
'1,/@NEWS@/d' -e
'/@INSTALL@/,$$d' index.html.in
>> $@
73 markdown INSTALL
>> $@
74 sed
-e
'1,/@INSTALL@/d' -e
'/@MAN_PAGE@/,$$d' index.html.in
>> $@
76 sed
-e
'1,/@MAN_PAGE@/d' index.html.in
>> $@