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