1 objects := adu.o string.o cmdline.o fd.o select.o create.o interactive.o select.cmdline.o format.o
5 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
6 DEBUG_CPPFLAGS += -Wredundant-decls
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 CPPFLAGS += -D_LARGEFILE64_SOURCE
17 CPPFLAGS += $(shell getconf LFS64_CFLAGS)
18 CPPFLAGS += -DVERSION='"$(version)"'
20 LDFLAGS += -D_LARGEFILE64_SOURCE
21 LDFLAGS += $(shell getconf LFS64_LDFLAGS)
22 LDFLAGS += $(shell getconf LFS64_LIBS)
25 Makefile.deps: $(wildcard *.c *.h)
28 -include Makefile.deps
31 $(CC) -o $@ $(LDFLAGS) $(objects) -lcrypto -losl
33 cmdline.o: cmdline.c cmdline.h
34 $(CC) -c $(CPPFLAGS) $<
36 cmdline.c cmdline.h: adu.ggo
37 gengetopt --no-handle-error --no-handle-help --conf-parser < $<
41 $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
48 select.cmdline.c select.cmdline.h: select.ggo
49 gengetopt --set-package=select \
53 --arg-struct-name=select_args_info \
54 --file-name=$(subst .ggo,,$<).cmdline \
55 --func-name $(subst .ggo,,$<)_cmdline_parser < $<
57 select.cmdline.o: select.cmdline.c select.cmdline.h
58 $(CC) -c $(CPPFLAGS) $<
61 help2man -h --detailed-help --include adu.1.inc -N ./$< > $@
64 man2html $< | sed -e 's|^<DT><DD>$$|<DT><DD><br>|g' > $@
67 rm -f *.o adu *cmdline.c *cmdline.h adu.1 adu.1.html adu.png index.html adu.sk~
69 index.html: adu.1.html index.html.in INSTALL README
70 sed -e '/@README@/,$$d' index.html.in > $@
71 grutatxt -nb < README >> $@
72 sed -e '1,/@README@/d' -e '/@INSTALL@/,$$d' index.html.in >> $@
73 grutatxt -nb < INSTALL >> $@
74 sed -e '1,/@INSTALL@/d' -e '/@MAN_PAGE@/,$$d' index.html.in >> $@
75 sed -e '1,/Return to Main Contents/d' -e '/Index/,$$d' adu.1.html >> $@
76 sed -e '1,/@MAN_PAGE@/d' index.html.in >> $@