blob: 9b73727960284eb52eeb0b31e75c5e32377fcfe7 [file] [log] [blame]
Dmitry Shmidtdf5a7e42014-04-02 12:59:59 -07001all: 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
Dmitry Shmidtb1e52102015-05-29 12:36:29 -070015CFLAGS += -I../../src
Dmitry Shmidtdf5a7e42014-04-02 12:59:59 -070016CFLAGS += -I../../src/utils
17CFLAGS += -I../../src/crypto
18
19LIBS += -lsqlite3
20
21# Using glibc < 2.17 requires -lrt for clock_gettime()
22LIBS += -lrt
23
Hai Shalom74f70d42019-02-11 14:42:39 -080024ifndef CONFIG_NO_GITVER
25# Add VERSION_STR postfix for builds from a git repository
26ifeq ($(wildcard ../../.git),../../.git)
27GITVER := $(shell git describe --dirty=+)
28ifneq ($(GITVER),)
29CFLAGS += -DGIT_VERSION_STR_POSTFIX=\"-$(GITVER)\"
30endif
31endif
32endif
33
Dmitry Shmidtdf5a7e42014-04-02 12:59:59 -070034OBJS=spp_server.o
35OBJS += hs20_spp_server.o
36OBJS += ../../src/utils/xml-utils.o
37OBJS += ../../src/utils/base64.o
38OBJS += ../../src/utils/common.o
39OBJS += ../../src/utils/os_unix.o
40OBJS += ../../src/utils/wpa_debug.o
41OBJS += ../../src/crypto/md5-internal.o
42CFLAGS += $(shell xml2-config --cflags)
43LIBS += $(shell xml2-config --libs)
44OBJS += ../../src/utils/xml_libxml2.o
45
46hs20_spp_server: $(OBJS)
47 $(LDO) $(LDFLAGS) -o hs20_spp_server $(OBJS) $(LIBS)
48
49clean:
50 rm -f core *~ *.o *.d hs20_spp_server
51 rm -f ../../src/utils/*.o
52 rm -f ../../src/utils/*.d
53 rm -f ../../src/crypto/*.o
54 rm -f ../../src/crypto/*.d
55
56-include $(OBJS:%.o=%.d)