1 all: hs20-osu-client 2 3 ifndef CC 4 CC=gcc 5 endif 6 7 ifndef LDO 8 LDO=$(CC) 9 endif 10 11 Q=@ 12 E=echo 13 ifeq ($(V), 1) 14 Q= 15 E=true 16 endif 17 18 ifndef CFLAGS 19 CFLAGS = -MMD -O2 -Wall -g 20 endif 21 22 CFLAGS += -I../../src/utils 23 CFLAGS += -I../../src/common 24 CFLAGS += -I../../src 25 26 ifndef CONFIG_NO_BROWSER 27 ifndef CONFIG_BROWSER_SYSTEM 28 GTKCFLAGS := $(shell pkg-config --cflags gtk+-3.0 webkitgtk-3.0) 29 GTKLIBS := $(shell pkg-config --libs gtk+-3.0 webkitgtk-3.0) 30 CFLAGS += $(GTKCFLAGS) 31 LIBS += $(GTKLIBS) 32 endif 33 endif 34 35 OBJS=spp_client.o 36 OBJS += oma_dm_client.o 37 OBJS += osu_client.o 38 OBJS += est.o 39 OBJS += ../../src/utils/xml-utils.o 40 CFLAGS += -DCONFIG_CTRL_IFACE 41 CFLAGS += -DCONFIG_CTRL_IFACE_UNIX 42 OBJS += ../../src/common/wpa_ctrl.o ../../src/common/wpa_helpers.o 43 ifdef CONFIG_NO_BROWSER 44 CFLAGS += -DCONFIG_NO_BROWSER 45 else 46 ifdef CONFIG_BROWSER_SYSTEM 47 OBJS += ../../src/utils/eloop.o 48 OBJS += ../../src/utils/wpabuf.o 49 OBJS += ../../src/wps/httpread.o 50 OBJS += ../../src/wps/http_server.o 51 OBJS += ../../src/utils/browser-system.o 52 else 53 OBJS += ../../src/utils/browser.o 54 endif 55 endif 56 OBJS += ../../src/utils/xml_libxml2.o 57 OBJS += ../../src/utils/http_curl.o 58 OBJS += ../../src/utils/base64.o 59 OBJS += ../../src/utils/os_unix.o 60 CFLAGS += -DCONFIG_DEBUG_FILE 61 OBJS += ../../src/utils/wpa_debug.o 62 OBJS += ../../src/utils/common.o 63 OBJS += ../../src/crypto/crypto_internal.o 64 OBJS += ../../src/crypto/md5-internal.o 65 OBJS += ../../src/crypto/sha1-internal.o 66 OBJS += ../../src/crypto/sha256-internal.o 67 68 CFLAGS += $(shell xml2-config --cflags) 69 LIBS += $(shell xml2-config --libs) 70 LIBS += -lcurl 71 72 CFLAGS += -DEAP_TLS_OPENSSL 73 LIBS += -lssl -lcrypto 74 75 hs20-osu-client: $(OBJS) 76 $(Q)$(LDO) $(LDFLAGS) -o hs20-osu-client $(OBJS) $(LIBS) 77 @$(E) " LD " $@ 78 79 %.o: %.c 80 $(Q)$(CC) -c -o $@ $(CFLAGS) $< 81 @$(E) " CC " $< 82 83 clean: 84 rm -f core *~ *.o *.d hs20-osu-client 85 rm -f ../../src/utils/*.o 86 rm -f ../../src/utils/*.d 87 rm -f ../../src/common/*.o 88 rm -f ../../src/common/*.d 89 rm -f ../../src/crypto/*.o 90 rm -f ../../src/crypto/*.d 91 rm -f ../../src/wps/*.o 92 rm -f ../../src/wps/*.d 93 94 -include $(OBJS:%.o=%.d) 95