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