Add create.c.
[adu.git] / Makefile
1 objects := adu.o string.o cmdline.o fd.o select.o create.c
2 all: adu
3
4 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
5 DEBUG_CPPFLAGS += -Wredundant-decls
6 #CPPFLAGS += -Os
7 CPPFLAGS += -Wall
8 #CPPFLAGS += -Wuninitialized
9 CPPFLAGS += -Wchar-subscripts
10 CPPFLAGS += -Wformat-security
11 CPPFLAGS += -Werror-implicit-function-declaration
12 CPPFLAGS += -Wmissing-format-attribute
13 CPPFLAGS += -Wunused-macros
14 CPPFLAGS += -Wbad-function-cast
15
16 Makefile.deps: $(wildcard *.c *.h)
17 gcc -MM -MG *.c > $@
18
19 -include Makefile.deps
20
21 adu: $(objects)
22 $(CC) -o $@ $(objects) -lcrypto -losl
23
24 cmdline.o: cmdline.c cmdline.h
25 $(CC) -c $(CPPFLAGS) $<
26
27 cmdline.c cmdline.h: adu.ggo
28 gengetopt --conf-parser < $<
29
30
31 %.o: %.c Makefile
32 $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
33
34 clean:
35 rm -f *.o adu