1all: hs20_spp_server
2
3ifndef CC
4CC=gcc
5endif
6
7ifndef LDO
8LDO=$(CC)
9endif
10
11ifndef CFLAGS
12CFLAGS = -MMD -O2 -Wall -g
13endif
14
15CFLAGS += -I../../src
16CFLAGS += -I../../src/utils
17CFLAGS += -I../../src/crypto
18
19LIBS += -lsqlite3
20
21# Using glibc < 2.17 requires -lrt for clock_gettime()
22LIBS += -lrt
23
24OBJS=spp_server.o
25OBJS += hs20_spp_server.o
26OBJS += ../../src/utils/xml-utils.o
27OBJS += ../../src/utils/base64.o
28OBJS += ../../src/utils/common.o
29OBJS += ../../src/utils/os_unix.o
30OBJS += ../../src/utils/wpa_debug.o
31OBJS += ../../src/crypto/md5-internal.o
32CFLAGS += $(shell xml2-config --cflags)
33LIBS += $(shell xml2-config --libs)
34OBJS += ../../src/utils/xml_libxml2.o
35
36hs20_spp_server: $(OBJS)
37	$(LDO) $(LDFLAGS) -o hs20_spp_server $(OBJS) $(LIBS)
38
39clean:
40	rm -f core *~ *.o *.d hs20_spp_server
41	rm -f ../../src/utils/*.o
42	rm -f ../../src/utils/*.d
43	rm -f ../../src/crypto/*.o
44	rm -f ../../src/crypto/*.d
45
46-include $(OBJS:%.o=%.d)
47