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 24ifndef 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 34OBJS=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) 57