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) $<
43 select.cmdline.c select.cmdline.h: select.ggo
44 gengetopt --set-package=select \
48 --arg-struct-name=select_args_info \
49 --file-name=$(subst .ggo,,$<).cmdline \
50 --func-name $(subst .ggo,,$<)_cmdline_parser < $<
52 select.cmdline.o: select.cmdline.c select.cmdline.h
53 $(CC) -c $(CPPFLAGS) $<
56 rm -f *.o adu *cmdline.c *cmdline.h