aboutsummaryrefslogtreecommitdiffstats
path: root/hs20/server/Makefile
blob: 9b73727960284eb52eeb0b31e75c5e32377fcfe7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
all: hs20_spp_server

ifndef CC
CC=gcc
endif

ifndef LDO
LDO=$(CC)
endif

ifndef CFLAGS
CFLAGS = -MMD -O2 -Wall -g
endif

CFLAGS += -I../../src
CFLAGS += -I../../src/utils
CFLAGS += -I../../src/crypto

LIBS += -lsqlite3

# Using glibc < 2.17 requires -lrt for clock_gettime()
LIBS += -lrt

ifndef CONFIG_NO_GITVER
# Add VERSION_STR postfix for builds from a git repository
ifeq ($(wildcard ../../.git),../../.git)
GITVER := $(shell git describe --dirty=+)
ifneq ($(GITVER),)
CFLAGS += -DGIT_VERSION_STR_POSTFIX=\"-$(GITVER)\"
endif
endif
endif

OBJS=spp_server.o
OBJS += hs20_spp_server.o
OBJS += ../../src/utils/xml-utils.o
OBJS += ../../src/utils/base64.o
OBJS += ../../src/utils/common.o
OBJS += ../../src/utils/os_unix.o
OBJS += ../../src/utils/wpa_debug.o
OBJS += ../../src/crypto/md5-internal.o
CFLAGS += $(shell xml2-config --cflags)
LIBS += $(shell xml2-config --libs)
OBJS += ../../src/utils/xml_libxml2.o

hs20_spp_server: $(OBJS)
	$(LDO) $(LDFLAGS) -o hs20_spp_server $(OBJS) $(LIBS)

clean:
	rm -f core *~ *.o *.d hs20_spp_server
	rm -f ../../src/utils/*.o
	rm -f ../../src/utils/*.d
	rm -f ../../src/crypto/*.o
	rm -f ../../src/crypto/*.d

-include $(OBJS:%.o=%.d)