xref: /freebsd/contrib/wpa/hs20/client/Makefile (revision 0b3105a37d7adcadcb720112fed4dc4e8040be99)
1all: hs20-osu-client
2
3ifndef CC
4CC=gcc
5endif
6
7ifndef LDO
8LDO=$(CC)
9endif
10
11Q=@
12E=echo
13ifeq ($(V), 1)
14Q=
15E=true
16endif
17
18ifndef CFLAGS
19CFLAGS = -MMD -O2 -Wall -g
20endif
21
22CFLAGS += -I../../src/utils
23CFLAGS += -I../../src/common
24CFLAGS += -I../../src
25
26ifndef CONFIG_NO_BROWSER
27ifndef CONFIG_BROWSER_SYSTEM
28GTKCFLAGS := $(shell pkg-config --cflags gtk+-3.0 webkitgtk-3.0)
29GTKLIBS := $(shell pkg-config --libs gtk+-3.0 webkitgtk-3.0)
30CFLAGS += $(GTKCFLAGS)
31LIBS += $(GTKLIBS)
32endif
33endif
34
35OBJS=spp_client.o
36OBJS += oma_dm_client.o
37OBJS += osu_client.o
38OBJS += est.o
39OBJS += ../../src/utils/xml-utils.o
40CFLAGS += -DCONFIG_CTRL_IFACE
41CFLAGS += -DCONFIG_CTRL_IFACE_UNIX
42OBJS += ../../src/common/wpa_ctrl.o ../../src/common/wpa_helpers.o
43ifdef CONFIG_NO_BROWSER
44CFLAGS += -DCONFIG_NO_BROWSER
45else
46ifdef CONFIG_BROWSER_SYSTEM
47OBJS += ../../src/utils/eloop.o
48OBJS += ../../src/utils/wpabuf.o
49OBJS += ../../src/wps/httpread.o
50OBJS += ../../src/wps/http_server.o
51OBJS += ../../src/utils/browser-system.o
52else
53OBJS += ../../src/utils/browser.o
54endif
55endif
56OBJS += ../../src/utils/xml_libxml2.o
57OBJS += ../../src/utils/http_curl.o
58OBJS += ../../src/utils/base64.o
59OBJS += ../../src/utils/os_unix.o
60CFLAGS += -DCONFIG_DEBUG_FILE
61OBJS += ../../src/utils/wpa_debug.o
62OBJS += ../../src/utils/common.o
63OBJS += ../../src/crypto/crypto_internal.o
64OBJS += ../../src/crypto/md5-internal.o
65OBJS += ../../src/crypto/sha1-internal.o
66OBJS += ../../src/crypto/sha256-internal.o
67
68CFLAGS += $(shell xml2-config --cflags)
69LIBS += $(shell xml2-config --libs)
70
71# Allow static/custom linking of libcurl.
72ifdef CUST_CURL_LINKAGE
73LIBS += ${CUST_CURL_LINKAGE}
74else
75LIBS += -lcurl
76endif
77
78CFLAGS += -DEAP_TLS_OPENSSL
79LIBS += -lssl -lcrypto
80
81hs20-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
89clean:
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)
101