Home | History | Annotate | Download | only in server
      1 all: hs20_spp_server
      2 
      3 ifndef CC
      4 CC=gcc
      5 endif
      6 
      7 ifndef LDO
      8 LDO=$(CC)
      9 endif
     10 
     11 ifndef CFLAGS
     12 CFLAGS = -MMD -O2 -Wall -g
     13 endif
     14 
     15 CFLAGS += -I../../src
     16 CFLAGS += -I../../src/utils
     17 CFLAGS += -I../../src/crypto
     18 
     19 LIBS += -lsqlite3
     20 
     21 # Using glibc < 2.17 requires -lrt for clock_gettime()
     22 LIBS += -lrt
     23 
     24 ifndef CONFIG_NO_GITVER
     25 # Add VERSION_STR postfix for builds from a git repository
     26 ifeq ($(wildcard ../../.git),../../.git)
     27 GITVER := $(shell git describe --dirty=+)
     28 ifneq ($(GITVER),)
     29 CFLAGS += -DGIT_VERSION_STR_POSTFIX=\"-$(GITVER)\"
     30 endif
     31 endif
     32 endif
     33 
     34 OBJS=spp_server.o
     35 OBJS += hs20_spp_server.o
     36 OBJS += ../../src/utils/xml-utils.o
     37 OBJS += ../../src/utils/base64.o
     38 OBJS += ../../src/utils/common.o
     39 OBJS += ../../src/utils/os_unix.o
     40 OBJS += ../../src/utils/wpa_debug.o
     41 OBJS += ../../src/crypto/md5-internal.o
     42 CFLAGS += $(shell xml2-config --cflags)
     43 LIBS += $(shell xml2-config --libs)
     44 OBJS += ../../src/utils/xml_libxml2.o
     45 
     46 hs20_spp_server: $(OBJS)
     47 	$(LDO) $(LDFLAGS) -o hs20_spp_server $(OBJS) $(LIBS)
     48 
     49 clean:
     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