Updated through tag hostap_2_5 from git://w1.fi/hostap.git
[mech_eap.git] / libeap / hs20 / client / Makefile
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
71 # Allow static/custom linking of libcurl.
72 ifdef CUST_CURL_LINKAGE
73 LIBS += ${CUST_CURL_LINKAGE}
74 else
75 LIBS += -lcurl
76 endif
77
78 CFLAGS += -DEAP_TLS_OPENSSL
79 LIBS += -lssl -lcrypto
80
81 hs20-osu-client: $(OBJS)
82         $(Q)$(LDO) $(LDFLAGS) -o hs20-osu-client $(OBJS) $(LIBS)
83         @$(E) "  LD " $@
84
85 %.o: %.c
86         $(Q)$(CC) -c -o $@ $(CFLAGS) $<
87         @$(E) "  CC " $<
88
89 clean:
90         rm -f core *~ *.o *.d hs20-osu-client
91         rm -f ../../src/utils/*.o
92         rm -f ../../src/utils/*.d
93         rm -f ../../src/common/*.o
94         rm -f ../../src/common/*.d
95         rm -f ../../src/crypto/*.o
96         rm -f ../../src/crypto/*.d
97         rm -f ../../src/wps/*.o
98         rm -f ../../src/wps/*.d
99
100 -include $(OBJS:%.o=%.d)