Fix typo in Makefile.
[adu.git] / Makefile
1 objects := adu.o string.o cmdline.o fd.o select.o create.o
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 CPPFLAGS += -D_LARGEFILE64_SOURCE
16 CPPFLAGS += $(shell getconf LFS64_CFLAGS)
17
18 LDFLAGS += -D_LARGEFILE64_SOURCE
19 LDFLAGS += $(shell getconf LFS64_LDFLAGS)
20 LDFLAGS += $(shell getconf LFS64_LIBS)
21
22
23 Makefile.deps: $(wildcard *.c *.h)
24 gcc -MM -MG *.c > $@
25
26 -include Makefile.deps
27
28 adu: $(objects)
29 $(CC) -o $@ $(LDFLAGS) $(objects) -lcrypto -losl
30
31 cmdline.o: cmdline.c cmdline.h
32 $(CC) -c $(CPPFLAGS) $<
33
34 cmdline.c cmdline.h: adu.ggo
35 gengetopt --conf-parser < $<
36
37
38 %.o: %.c Makefile
39 $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
40
41 clean:
42 rm -f *.o adu