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