1ALL=hs20-osu-client
2
3include ../../src/build.rules
4
5CFLAGS += -I../../src/utils
6CFLAGS += -I../../src/common
7CFLAGS += -I../../src
8
9ifndef CONFIG_NO_BROWSER
10ifndef CONFIG_BROWSER_SYSTEM
11TEST_WK := $(shell pkg-config --silence-errors --cflags webkitgtk-3.0)
12ifeq ($(TEST_WK),)
13# Try webkit2
14GTKCFLAGS := $(shell pkg-config --cflags gtk+-3.0 webkit2gtk-4.0)
15GTKLIBS := $(shell pkg-config --libs gtk+-3.0 webkit2gtk-4.0)
16CFLAGS += -DUSE_WEBKIT2
17else
18GTKCFLAGS := $(shell pkg-config --cflags gtk+-3.0 webkitgtk-3.0)
19GTKLIBS := $(shell pkg-config --libs gtk+-3.0 webkitgtk-3.0)
20endif
21
22CFLAGS += $(GTKCFLAGS)
23LIBS += $(GTKLIBS)
24endif
25endif
26
27OBJS=spp_client.o
28OBJS += oma_dm_client.o
29OBJS += osu_client.o
30OBJS += est.o
31OBJS += ../../src/utils/xml-utils.o
32CFLAGS += -DCONFIG_CTRL_IFACE
33CFLAGS += -DCONFIG_CTRL_IFACE_UNIX
34OBJS += ../../src/common/wpa_ctrl.o ../../src/common/wpa_helpers.o
35ifdef CONFIG_NO_BROWSER
36CFLAGS += -DCONFIG_NO_BROWSER
37else
38ifdef CONFIG_BROWSER_SYSTEM
39OBJS += ../../src/utils/eloop.o
40OBJS += ../../src/utils/wpabuf.o
41OBJS += ../../src/wps/httpread.o
42OBJS += ../../src/wps/http_server.o
43OBJS += ../../src/utils/browser-system.o
44else
45OBJS += ../../src/utils/browser.o
46endif
47endif
48OBJS += ../../src/utils/xml_libxml2.o
49OBJS += ../../src/utils/http_curl.o
50OBJS += ../../src/utils/base64.o
51OBJS += ../../src/utils/os_unix.o
52CFLAGS += -DCONFIG_DEBUG_FILE
53OBJS += ../../src/utils/wpa_debug.o
54OBJS += ../../src/utils/common.o
55OBJS += ../../src/crypto/crypto_internal.o
56OBJS += ../../src/crypto/md5-internal.o
57OBJS += ../../src/crypto/sha1-internal.o
58OBJS += ../../src/crypto/sha256-internal.o
59
60CFLAGS += $(shell xml2-config --cflags)
61LIBS += $(shell xml2-config --libs)
62
63# Allow static/custom linking of libcurl.
64ifdef CUST_CURL_LINKAGE
65LIBS += ${CUST_CURL_LINKAGE}
66else
67LIBS += -lcurl
68endif
69
70CFLAGS += -DEAP_TLS_OPENSSL
71OBJS += ../../src/crypto/tls_openssl_ocsp.o
72LIBS += -lssl -lcrypto
73
74_OBJS_VAR := OBJS
75include ../../src/objs.mk
76hs20-osu-client: $(OBJS)
77	$(Q)$(LDO) $(LDFLAGS) -o hs20-osu-client $(OBJS) $(LIBS)
78	@$(E) "  LD " $@
79
80clean: common-clean
81	rm -f core *~
82