From patchwork Fri Sep 18 09:24:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366706 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=ej3UL3Dm; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt7jk6Pw3z9sPB for ; Fri, 18 Sep 2020 19:25:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1YHuZxE1GDt3K1xDW+0SCIxPYswp5rUipDHgDhT1y7Y=; b=ej3UL3DmDVv73WSqDOQS41lrr MIvHeQoB5oS7oKj1hmscdIkqE9RVXXdIR7FWx8wgJd0cSi4MkX/ZqM0UbntN5T5aoB4BFPR6JrIEb +XaFnHy/BSnZ/PWnKqOjkOQQdAXi0kZkOIsbdzO+vQcXj0+2H5uLiWuMvRNgF56EEqAVwXHyIcoPL N81uIJawbu9jwTpR646W5Ix4wWf8EiyhvbgzVGuUj2OzuKz37nD12iwX4DX7SASWFu6oIm1yrTA2n +YxTS9MuZlsc0BohDmubb6bIpK+kgy2FXkhQYvz4yxfXC4IzrdBS4jDCorerHqnvr0QlKuFit0s0i hVQNcRnfA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdo-0001VX-06; Fri, 18 Sep 2020 09:25:16 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdh-0001Qq-Nh for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:25:10 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdg-0069hJ-8C; Fri, 18 Sep 2020 11:25:08 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 01/15] hs20: server: add a .gitignore file Date: Fri, 18 Sep 2020 11:24:47 +0200 Message-Id: <1600421070-I81366372464f4b460a73bad9da126e78d1d692a5@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_052509_811218_3C037FE9 X-CRM114-Status: GOOD ( 12.44 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Signed-off-by: Johannes Berg --- hs20/server/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 hs20/server/.gitignore diff --git a/hs20/server/.gitignore b/hs20/server/.gitignore new file mode 100644 index 000000000000..fecb096c128a --- /dev/null +++ b/hs20/server/.gitignore @@ -0,0 +1 @@ +hs20_spp_server From patchwork Fri Sep 18 09:24:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366710 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=ZcsAd9eJ; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt7k40VJgz9sSf for ; Fri, 18 Sep 2020 19:26:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ehDe2vdRYbXPm6e7jflM11Z3uISEZPxq1zjWb5BE4No=; b=ZcsAd9eJ/DEkdMZk8mpT2K51l nPy7lZ7w27654GlrxU8aKAKiezeYvIe/lLdilNIWFIwQJt2s2RSyJZaRhPUdLL8Awncan0F5jUtb0 GlhBy6NJd96cXhgHAGEooYapKCS+5dqldd2ntq0kYZjbB1u6SyYKwNyPCIbL8yZYNmwCpE2W9NkX2 khPUvyojdyQCqb4WpOU896IVj4unzxFPXC4iCEe1ds1WZAOkdH3yGEm9ZpF6TSR1+XKUqmt1T87wa czdbMiRHb54OttvSPMvOopJpm0fp+4lCCkKQKYnbWHS0lsPf5jhI5p1mkNqkWR77COUjG9icE+soZ te47YzHLg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdv-0001YG-Hk; Fri, 18 Sep 2020 09:25:23 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdh-0001R5-WA for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:25:11 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdg-0069hJ-G5; Fri, 18 Sep 2020 11:25:08 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 02/15] build: pull common fragments into a common.rules file Date: Fri, 18 Sep 2020 11:24:48 +0200 Message-Id: <1600421070-I5adf174c14de58d5c5133d7424e164654fd1c160@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_052510_169548_9A6F8A39 X-CRM114-Status: GOOD ( 15.00 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Some things are used by most of the binaries, pull them into a common rule fragment that we can use properly. Signed-off-by: Johannes Berg --- eap_example/Makefile | 31 +------------------- hostapd/Makefile | 34 ++------------------- hs20/client/Makefile | 30 ++----------------- hs20/server/Makefile | 14 ++------- radius_example/Makefile | 14 +-------- src/build.rules | 43 +++++++++++++++++++++++++++ tests/Makefile | 20 +++---------- wlantest/Makefile | 35 +--------------------- wpa_supplicant/Makefile | 65 +++++++++++------------------------------ 9 files changed, 74 insertions(+), 212 deletions(-) create mode 100644 src/build.rules diff --git a/eap_example/Makefile b/eap_example/Makefile index 0cc19bd5359f..e5f3b3471035 100644 --- a/eap_example/Makefile +++ b/eap_example/Makefile @@ -1,19 +1,6 @@ ALL=eap_example -all: $(ALL) - -ifndef CC -CC=gcc -endif - -ifndef RANLIB -RANLIB=ranlib -endif - -ifndef CFLAGS -CFLAGS = -MMD -O2 -Wall -g -endif - +include ../src/build.rules CFLAGS += -I. CFLAGS += -I../src @@ -95,22 +82,6 @@ OBJS_server += ../src/eap_server/eap_server_tls_common.o CFLAGS += -DEAP_SERVER -ifndef LDO -LDO=$(CC) -endif - -Q=@ -E=echo -ifeq ($(V), 1) -Q= -E=true -endif - -%.o: %.c - $(Q)$(CC) -c -o $@ $(CFLAGS) $< - @$(E) " CC " $< - - OBJS_lib=$(OBJS_both) $(OBJS_peer) $(OBJS_server) OBJS_ex = eap_example.o eap_example_peer.o eap_example_server.o diff --git a/hostapd/Makefile b/hostapd/Makefile index 1400002a99a5..5c830fb448b1 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -1,10 +1,7 @@ -ifndef CC -CC=gcc -endif +ALL=hostapd hostapd_cli +VERIFY=verify_config -ifndef CFLAGS -CFLAGS = -MMD -O2 -Wall -g -endif +include ../src/build.rules ifdef LIBS # If LIBS is set with some global build system defaults, clone those for @@ -1264,31 +1261,6 @@ ifdef CONFIG_NO_TKIP CFLAGS += -DCONFIG_NO_TKIP endif -ALL=hostapd hostapd_cli - -all: verify_config $(ALL) - -Q=@ -E=echo -ifeq ($(V), 1) -Q= -E=true -endif -ifeq ($(QUIET), 1) -Q=@ -E=true -endif - -ifdef CONFIG_CODE_COVERAGE -%.o: %.c - @$(E) " CC " $< - $(Q)cd $(dir $@); $(CC) -c -o $(notdir $@) $(CFLAGS) $(notdir $<) -else -%.o: %.c - $(Q)$(CC) -c -o $@ $(CFLAGS) $< - @$(E) " CC " $< -endif - verify_config: @if [ ! -r .config ]; then \ echo 'Building hostapd requires a configuration file'; \ diff --git a/hs20/client/Makefile b/hs20/client/Makefile index cc2af03f43f6..70fb73598dfe 100644 --- a/hs20/client/Makefile +++ b/hs20/client/Makefile @@ -1,28 +1,6 @@ -all: hs20-osu-client +ALL=hs20-osu-client -ifndef CC -CC=gcc -endif - -ifndef LDO -LDO=$(CC) -endif - -ifeq ($(QUIET), 1) -Q=@ -E=true -else -Q=@ -E=echo -ifeq ($(V), 1) -Q= -E=true -endif -endif - -ifndef CFLAGS -CFLAGS = -MMD -O2 -Wall -g -endif +include ../../src/build.rules CFLAGS += -I../../src/utils CFLAGS += -I../../src/common @@ -97,10 +75,6 @@ hs20-osu-client: $(OBJS) $(Q)$(LDO) $(LDFLAGS) -o hs20-osu-client $(OBJS) $(LIBS) @$(E) " LD " $@ -%.o: %.c - $(Q)$(CC) -c -o $@ $(CFLAGS) $< - @$(E) " CC " $< - clean: rm -f core *~ *.o *.d hs20-osu-client rm -f ../../src/utils/*.o diff --git a/hs20/server/Makefile b/hs20/server/Makefile index 9b7372796028..9ec7e4491ad4 100644 --- a/hs20/server/Makefile +++ b/hs20/server/Makefile @@ -1,16 +1,6 @@ -all: hs20_spp_server +ALL=hs20_spp_server -ifndef CC -CC=gcc -endif - -ifndef LDO -LDO=$(CC) -endif - -ifndef CFLAGS -CFLAGS = -MMD -O2 -Wall -g -endif +include ../../src/build.rules CFLAGS += -I../../src CFLAGS += -I../../src/utils diff --git a/radius_example/Makefile b/radius_example/Makefile index 883e2f2da577..75cb3caeb3dd 100644 --- a/radius_example/Makefile +++ b/radius_example/Makefile @@ -1,18 +1,6 @@ ALL=radius_example -all: $(ALL) - -ifndef CC -CC=gcc -endif - -ifndef LDO -LDO=$(CC) -endif - -ifndef CFLAGS -CFLAGS = -MMD -O2 -Wall -g -endif +include ../src/build.rules CFLAGS += -I. CFLAGS += -I../src diff --git a/src/build.rules b/src/build.rules new file mode 100644 index 000000000000..f1ce7748e333 --- /dev/null +++ b/src/build.rules @@ -0,0 +1,43 @@ +.PHONY: all +all: $(VERIFY) $(ALL) $(EXTRA_TARGETS) + +ifndef CC +CC=gcc +endif + +ifndef RANLIB +RANLIB=ranlib +endif + +ifndef LDO +LDO=$(CC) +endif + +ifndef CFLAGS +CFLAGS = -MMD -O2 -Wall -g +endif + +Q=@ +E=echo +ifeq ($(V), 1) +Q= +E=true +endif +ifeq ($(QUIET), 1) +Q=@ +E=true +endif + +ifeq ($(Q),@) +MAKEFLAGS += --no-print-directory +endif + +ifdef CONFIG_CODE_COVERAGE +%.o: %.c + @$(E) " CC " $< + $(Q)cd $(dir $@); $(CC) -c -o $(notdir $@) $(CFLAGS) $(notdir $<) +else +%.o: %.c + $(Q)$(CC) -c -o $@ $(CFLAGS) $< + @$(E) " CC " $< +endif diff --git a/tests/Makefile b/tests/Makefile index 0817c9a27995..119ed7a2ae90 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,9 +1,9 @@ -TESTS=test-base64 test-md4 test-milenage \ +ALL=test-base64 test-md4 test-milenage \ test-rsa-sig-ver \ test-sha1 \ test-sha256 test-aes test-asn1 test-x509v3 test-list test-rc4 -all: $(TESTS) +include ../src/build.rules ifdef LIBFUZZER CC=clang @@ -14,18 +14,6 @@ LDFLAGS += -fsanitize=fuzzer,address,signed-integer-overflow,unsigned-integer-ov TEST_FUZZ=y endif -ifndef CC -CC=gcc -endif - -ifndef LDO -LDO=$(CC) -endif - -ifndef CFLAGS -CFLAGS = -MMD -O2 -Wall -g -endif - ifdef TEST_FUZZ CFLAGS += -DCONFIG_NO_RANDOM_POOL CFLAGS += -DTEST_FUZZ @@ -152,7 +140,7 @@ test-x509v3: test-x509v3.o $(LIBS) $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS) -run-tests: $(TESTS) +run-tests: $(ALL) ./test-aes ./test-list ./test-md4 @@ -165,7 +153,7 @@ run-tests: $(TESTS) clean: $(MAKE) -C ../src clean - rm -f $(TESTS) *~ *.o *.d + rm -f $(ALL) *~ *.o *.d rm -f test-eapol rm -f test-https rm -f test-json diff --git a/wlantest/Makefile b/wlantest/Makefile index 22ea646c0926..0324fa54855e 100644 --- a/wlantest/Makefile +++ b/wlantest/Makefile @@ -1,22 +1,9 @@ ALL=wlantest wlantest_cli test_vectors -all: $(ALL) +include ../src/build.rules UNAME := $(shell uname -s) -ifndef CC -CC=gcc -endif - -ifndef RANLIB -RANLIB=ranlib -endif - -ifndef CFLAGS -CFLAGS = -MMD -O2 -Wall -g -endif - - CFLAGS += -I. CFLAGS += -I../src CFLAGS += -I../src/utils @@ -26,26 +13,6 @@ ifneq ($(UNAME),Darwin) LIBS += -lrt endif -ifndef LDO -LDO=$(CC) -endif - -Q=@ -E=echo -ifeq ($(V), 1) -Q= -E=true -endif -ifeq ($(QUIET), 1) -Q=@ -E=true -endif - -%.o: %.c - $(Q)$(CC) -c -o $@ $(CFLAGS) $< - @$(E) " CC " $< - - OWN_LIBS += ../src/utils/libutils.a OWN_LIBS += ../src/crypto/libcrypto.a diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index a01a32982dfe..13d938168758 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -1,11 +1,24 @@ -ifndef CC -CC=gcc +BINALL=wpa_supplicant wpa_cli + +ifndef CONFIG_NO_WPA_PASSPHRASE +BINALL += wpa_passphrase endif -ifndef CFLAGS -CFLAGS = -MMD -O2 -Wall -g +ALL = $(BINALL) +ALL += systemd/wpa_supplicant.service +ALL += systemd/wpa_supplicant@.service +ALL += systemd/wpa_supplicant-nl80211@.service +ALL += systemd/wpa_supplicant-wired@.service +ALL += dbus/fi.w1.wpa_supplicant1.service +ifdef CONFIG_BUILD_WPA_CLIENT_SO +ALL += libwpa_client.so endif +VERIFY=verify_config +EXTRA_TARGETS=dynamic_eap_methods + +include ../src/build.rules + ifdef LIBS # If LIBS is set with some global build system defaults, clone those for # LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well. @@ -44,25 +57,6 @@ CONFIG_WPS_TESTING=y CONFIG_TDLS_TESTING=y endif -BINALL=wpa_supplicant wpa_cli - -ifndef CONFIG_NO_WPA_PASSPHRASE -BINALL += wpa_passphrase -endif - -ALL = $(BINALL) -ALL += systemd/wpa_supplicant.service -ALL += systemd/wpa_supplicant@.service -ALL += systemd/wpa_supplicant-nl80211@.service -ALL += systemd/wpa_supplicant-wired@.service -ALL += dbus/fi.w1.wpa_supplicant1.service -ifdef CONFIG_BUILD_WPA_CLIENT_SO -ALL += libwpa_client.so -endif - - -all: verify_config $(ALL) dynamic_eap_methods - verify_config: @if [ ! -r .config ]; then \ echo 'Building wpa_supplicant requires a configuration file'; \ @@ -1867,21 +1861,6 @@ ifdef CONFIG_NO_TKIP CFLAGS += -DCONFIG_NO_TKIP endif -ifndef LDO -LDO=$(CC) -endif - -Q=@ -E=echo -ifeq ($(V), 1) -Q= -E=true -endif -ifeq ($(QUIET), 1) -Q=@ -E=true -endif - dynamic_eap_methods: $(EAPDYN) ../src/drivers/build.wpa_supplicant: @@ -1980,16 +1959,6 @@ eap_eke.so: ../src/eap_peer/eap_eke.c ../src/eap_common/eap_eke_common.c $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $< \ -D$(*F:eap_%=eap_peer_%)_register=eap_peer_method_dynamic_init -ifdef CONFIG_CODE_COVERAGE -%.o: %.c - @$(E) " CC " $< - $(Q)cd $(dir $@); $(CC) -c -o $(notdir $@) $(CFLAGS) $(notdir $<) -else -%.o: %.c - $(Q)$(CC) -c -o $@ $(CFLAGS) $< - @$(E) " CC " $< -endif - %.service: %.service.in $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ @$(E) " sed" $< From patchwork Fri Sep 18 09:24:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366708 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=r1GkkUaf; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt7k23Vltz9sSf for ; Fri, 18 Sep 2020 19:26:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MCzbvwSbK9p4IN5c5gtzJTyxMdu/EH2xEptfQV3rRHU=; b=r1GkkUaf93vLHo6fKWJGclmwL cM/JKUIyj9EB5oVgN0NnfZl2Sw8c3iCp755B/+QYfSNPtpCLRE9DgikcKdfKKU7CwZpqOR3jfCZLZ QLSwO7HnHZme043AICnDVTqe9MheENHLWoUj/dyIucuHK7sR7UT1G9ssXS5xF5L9mkyK2THAvctK+ jfsQ7okV85dg9zgxpMXo8hWTDN+c4SRU2noRKjMRaE4e3+Dy4p6IqxuOSMpHeORq61s4hPLa9cy4i AozC+OkGcmRSwouvcNRoFNqzSTRbBE5/aZ1rh9LLHAJYEpP3zNlFKaKXqs1CreGm7fJgPN7yis3yE vZ2yKqo2Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdt-0001X7-K9; Fri, 18 Sep 2020 09:25:21 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdi-0001RC-Ap for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:25:11 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdg-0069hJ-Pc; Fri, 18 Sep 2020 11:25:08 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 03/15] build: disable built-in rules Date: Fri, 18 Sep 2020 11:24:49 +0200 Message-Id: <1600421070-Ide74bfaa4f5d4a7c630198a163d950264e139e85@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_052510_405236_310110C3 X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg This makes things faster and easier to debug. Signed-off-by: Johannes Berg --- src/build.rules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/build.rules b/src/build.rules index f1ce7748e333..5edfea1dfa4d 100644 --- a/src/build.rules +++ b/src/build.rules @@ -1,6 +1,9 @@ .PHONY: all all: $(VERIFY) $(ALL) $(EXTRA_TARGETS) +# disable built-in rules +.SUFFIXES: + ifndef CC CC=gcc endif From patchwork Fri Sep 18 09:24:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366712 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=RoQrUWmZ; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt7k76zXqz9sPB for ; Fri, 18 Sep 2020 19:26:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sFPXcbwIVSebWA+YYVqX/1caE2A0zg83xPyn4VZRhMc=; b=RoQrUWmZQmaQm3SePi7zHa/vi Zydtgb8SCul8ncWMSpPiB5Hhr3QezsRU08VvFGUy/0sNmytW00cCgvHn/nbNQZ1Y3gYVrlzbivzT+ 4uLe3ylLCQTP7sZaqX2VkEFoESEFAEKbRz6Muvob7k6mlp15ZFAYflknzat+6YZwSQr5p2lptSCD5 qwfj7pw4zij9scGnq8QUO0CWNDqX5PJF/Ogwzw+yjueDaU2HEj2cEDZUM84SbbwgCgOYdkn0uHk4V mqIgW8z7CCjRebtA34NH6pb+nsMrGRnFhQlLqR77VskTaHGVi6BYNM6Pd4qHS8Dipn+V42E+e6BHK HD2sm5XTw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdx-0001ZF-N5; Fri, 18 Sep 2020 09:25:25 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdi-0001Rd-M3 for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:25:13 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdh-0069hJ-FZ; Fri, 18 Sep 2020 11:25:09 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 04/15] build: use common.rules in lib.rules Date: Fri, 18 Sep 2020 11:24:50 +0200 Message-Id: <1600421070-I847cd5e04defedd5c34720fe4688c0173f883e9a@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_052510_870193_992040CF X-CRM114-Status: GOOD ( 10.51 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Use the new common.rules in lib.rules and also unify the clean targets to lib.rules. Signed-off-by: Johannes Berg --- src/ap/Makefile | 6 ++---- src/common/Makefile | 6 ++---- src/crypto/Makefile | 7 ++----- src/eap_common/Makefile | 6 ++---- src/eap_peer/Makefile | 6 ++---- src/eap_server/Makefile | 6 ++---- src/eapol_auth/Makefile | 6 ++---- src/eapol_supp/Makefile | 6 ++---- src/l2_packet/Makefile | 6 ++---- src/lib.rules | 26 ++++---------------------- src/p2p/Makefile | 6 ++---- src/radius/Makefile | 7 ++----- src/rsn_supp/Makefile | 6 ++---- src/tls/Makefile | 7 ++----- src/utils/Makefile | 7 ++----- src/wps/Makefile | 6 ++---- 16 files changed, 34 insertions(+), 86 deletions(-) diff --git a/src/ap/Makefile b/src/ap/Makefile index 54e48a0dd032..805181d00c12 100644 --- a/src/ap/Makefile +++ b/src/ap/Makefile @@ -1,12 +1,10 @@ -all: libap.a +ALL=libap.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libap.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules CFLAGS += -DHOSTAPD CFLAGS += -DNEED_AP_MLME diff --git a/src/common/Makefile b/src/common/Makefile index ccb280e9019c..eeb69f0d4ff3 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -1,12 +1,10 @@ -all: libcommon.a +ALL=libcommon.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libcommon.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules CFLAGS += -DCONFIG_IEEE80211R CFLAGS += -DCONFIG_HS20 diff --git a/src/crypto/Makefile b/src/crypto/Makefile index c40e95566104..94eac66fa955 100644 --- a/src/crypto/Makefile +++ b/src/crypto/Makefile @@ -1,14 +1,11 @@ -all: libcrypto.a +ALL=libcrypto.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libcrypto.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules - CFLAGS += -DCONFIG_CRYPTO_INTERNAL CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER diff --git a/src/eap_common/Makefile b/src/eap_common/Makefile index f00b438c6188..7d6777babf4f 100644 --- a/src/eap_common/Makefile +++ b/src/eap_common/Makefile @@ -1,12 +1,10 @@ -all: libeap_common.a +ALL=libeap_common.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libeap_common.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules LIB_OBJS= \ chap.o \ diff --git a/src/eap_peer/Makefile b/src/eap_peer/Makefile index 6531ccd5dac0..282b89696e5c 100644 --- a/src/eap_peer/Makefile +++ b/src/eap_peer/Makefile @@ -1,7 +1,6 @@ -all: libeap_peer.a +ALL=libeap_peer.a -clean: - rm -f *~ *.o *.so *.d *.gcno *.gcda *.gcov libeap_peer.a +include ../lib.rules install: if ls *.so >/dev/null 2>&1; then \ @@ -9,7 +8,6 @@ install: cp *.so $(DESTDIR)$(LIBDIR)/wpa_supplicant \ ; fi -include ../lib.rules CFLAGS += -DIEEE8021X_EAPOL diff --git a/src/eap_server/Makefile b/src/eap_server/Makefile index 1172b72466d2..4ece9aa67b35 100644 --- a/src/eap_server/Makefile +++ b/src/eap_server/Makefile @@ -1,12 +1,10 @@ -all: libeap_server.a +ALL=libeap_server.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libeap_server.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules CFLAGS += -DCONFIG_HS20 diff --git a/src/eapol_auth/Makefile b/src/eapol_auth/Makefile index 7b927a127731..0175a19d940e 100644 --- a/src/eapol_auth/Makefile +++ b/src/eapol_auth/Makefile @@ -1,12 +1,10 @@ -all: libeapol_auth.a +ALL=libeapol_auth.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libeapol_auth.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules LIB_OBJS = eapol_auth_sm.o eapol_auth_dump.o diff --git a/src/eapol_supp/Makefile b/src/eapol_supp/Makefile index 80db9d48689e..c98280b469b7 100644 --- a/src/eapol_supp/Makefile +++ b/src/eapol_supp/Makefile @@ -1,12 +1,10 @@ -all: libeapol_supp.a +ALL=libeapol_supp.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libeapol_supp.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules CFLAGS += -DIEEE8021X_EAPOL diff --git a/src/l2_packet/Makefile b/src/l2_packet/Makefile index 47925b790c74..20f229511e9c 100644 --- a/src/l2_packet/Makefile +++ b/src/l2_packet/Makefile @@ -1,12 +1,10 @@ -all: libl2_packet.a +ALL=libl2_packet.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libl2_packet.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules LIB_OBJS = l2_packet_linux.o diff --git a/src/lib.rules b/src/lib.rules index a46315442d2a..81b895967e01 100644 --- a/src/lib.rules +++ b/src/lib.rules @@ -1,10 +1,5 @@ -ifndef CC -CC=gcc -endif - -ifndef CFLAGS -CFLAGS = -MMD -O2 -Wall -g -endif +LIB_RULES := $(lastword $(MAKEFILE_LIST)) +include $(dir $(LIB_RULES))build.rules ifdef TEST_FUZZ CFLAGS += -DCONFIG_NO_RANDOM_POOL @@ -14,18 +9,5 @@ endif CFLAGS += $(FUZZ_CFLAGS) CFLAGS += -I.. -I../utils - -Q=@ -E=echo -ifeq ($(V), 1) -Q= -E=true -endif -ifeq ($(QUIET), 1) -Q=@ -E=true -endif - -%.o: %.c - $(Q)$(CC) -c -o $@ $(CFLAGS) $< - @$(E) " CC " $< +clean: + $(Q)rm -f *~ *.o *.d *.gcno *.gcda *.gcov $(ALL) diff --git a/src/p2p/Makefile b/src/p2p/Makefile index 5587fcf281d3..174cf6f6f7f4 100644 --- a/src/p2p/Makefile +++ b/src/p2p/Makefile @@ -1,12 +1,10 @@ -all: libp2p.a +ALL=libp2p.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libp2p.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules CFLAGS += -DCONFIG_WIFI_DISPLAY CFLAGS += -DCONFIG_WPS_NFC diff --git a/src/radius/Makefile b/src/radius/Makefile index 3ad4751dfbfe..dbe9a9a9fa71 100644 --- a/src/radius/Makefile +++ b/src/radius/Makefile @@ -1,14 +1,11 @@ -all: libradius.a +ALL=libradius.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libradius.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules - CFLAGS += -DCONFIG_IPV6 LIB_OBJS= \ diff --git a/src/rsn_supp/Makefile b/src/rsn_supp/Makefile index eea0efba96e6..255cb73a7505 100644 --- a/src/rsn_supp/Makefile +++ b/src/rsn_supp/Makefile @@ -1,12 +1,10 @@ -all: librsn_supp.a +ALL=librsn_supp.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov librsn_supp.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules CFLAGS += -DCONFIG_IEEE80211R CFLAGS += -DCONFIG_TDLS diff --git a/src/tls/Makefile b/src/tls/Makefile index 52a890a157d2..0a36cf9e4530 100644 --- a/src/tls/Makefile +++ b/src/tls/Makefile @@ -1,14 +1,11 @@ -all: libtls.a +ALL=libtls.a -clean: - rm -f *~ *.o *.d libtls.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules - CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH CFLAGS += -DCONFIG_CRYPTO_INTERNAL CFLAGS += -DCONFIG_TLSV11 diff --git a/src/utils/Makefile b/src/utils/Makefile index 1ee2bee67f6b..29fb1295d726 100644 --- a/src/utils/Makefile +++ b/src/utils/Makefile @@ -1,14 +1,11 @@ -all: libutils.a +ALL=libutils.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libutils.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules - #CFLAGS += -DWPA_TRACE CFLAGS += -DCONFIG_IPV6 CFLAGS += -DCONFIG_DEBUG_FILE diff --git a/src/wps/Makefile b/src/wps/Makefile index 4806fe8dadf7..811b62977be8 100644 --- a/src/wps/Makefile +++ b/src/wps/Makefile @@ -1,12 +1,10 @@ -all: libwps.a +ALL=libwps.a -clean: - rm -f *~ *.o *.d *.gcno *.gcda *.gcov libwps.a +include ../lib.rules install: @echo Nothing to be made. -include ../lib.rules CFLAGS += -DCONFIG_P2P CFLAGS += -DCONFIG_WPS_OOB From patchwork Fri Sep 18 09:24:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366709 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=DtvY0ExN; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt7k35n9xz9sPB for ; Fri, 18 Sep 2020 19:26:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=D8pXXu4rJOQCc1c6sAJX8rgdu9RRhgIpbWHIIlLExbc=; b=DtvY0ExNyIK0xIRatbdLF8g1R fIBsKxOjUqGXBz7M7UBAF90LEHmEcbqmYvTp2wdfTt8KVZ4SIwaF+g1EJlMafS1SMV2G9NXxtmKHt skbLHJ5bddCu2yUpkKYEhF0sp/pgq6U/afBnhogzVuG1q6z1Pn2b1mpNYJp9DltdCZUL5NrEaKiEv TcWI4NnCr/iqDp4Cabnnv7/JuTJVSfZBVUI+mAFWiXxCxlsqM+jmh5jYRi/8AVEj5QK/qBxh2ksjg up3aKtxmqsOIU/2QiI9xBQb47CPiEW9yKo/P889zF3eZYUWuOc+dxBXm64fRRrsgHOffZP05FAtdO UcQBD4jWg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCe4-0001dD-QX; Fri, 18 Sep 2020 09:25:32 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdj-0001S4-3b for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:25:16 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdh-0069hJ-QV; Fri, 18 Sep 2020 11:25:09 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 05/15] build: add a common-clean target Date: Fri, 18 Sep 2020 11:24:51 +0200 Message-Id: <1600421070-If0b4368e847a16595115731f5341cfd34714b387@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_052511_211316_18501005 X-CRM114-Status: GOOD ( 11.50 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Clean up in a more common fashion as well, initially for ../src/. Also add $(Q) to the clean target in src/ Signed-off-by: Johannes Berg --- eap_example/Makefile | 5 ++--- hostapd/Makefile | 5 ++--- hs20/client/Makefile | 4 ++-- hs20/server/Makefile | 4 ++-- radius_example/Makefile | 5 ++--- src/Makefile | 4 ++-- src/build.rules | 8 ++++++++ tests/Makefile | 5 ++--- wlantest/Makefile | 5 ++--- wpa_supplicant/Makefile | 4 ++-- 10 files changed, 26 insertions(+), 23 deletions(-) diff --git a/eap_example/Makefile b/eap_example/Makefile index e5f3b3471035..ecef3c97662b 100644 --- a/eap_example/Makefile +++ b/eap_example/Makefile @@ -116,8 +116,7 @@ endif eap_example: $(OBJS_ex) $(LIBEAP) $(LDO) $(LDFLAGS) -o eap_example $(OBJS_ex) -L. -leap $(LIBS) -clean: - $(MAKE) -C ../src clean - rm -f core *~ *.o *.d libeap.a libeap.so $(ALL) +clean: common-clean + rm -f core *~ *.o *.d libeap.a libeap.so -include $(OBJS:%.o=%.d) diff --git a/hostapd/Makefile b/hostapd/Makefile index 5c830fb448b1..2e15c8911483 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -1362,9 +1362,8 @@ lcov-html: lcov -c -d .. > lcov.info genhtml lcov.info --output-directory lcov-html -clean: - $(MAKE) -C ../src clean - rm -f core *~ *.o hostapd hostapd_cli nt_password_hash hlr_auc_gw +clean: common-clean + rm -f core *~ *.o nt_password_hash hlr_auc_gw rm -f sae_pk_gen rm -f *.d *.gcno *.gcda *.gcov rm -f lcov.info diff --git a/hs20/client/Makefile b/hs20/client/Makefile index 70fb73598dfe..cbb1105e186b 100644 --- a/hs20/client/Makefile +++ b/hs20/client/Makefile @@ -75,8 +75,8 @@ hs20-osu-client: $(OBJS) $(Q)$(LDO) $(LDFLAGS) -o hs20-osu-client $(OBJS) $(LIBS) @$(E) " LD " $@ -clean: - rm -f core *~ *.o *.d hs20-osu-client +clean: common-clean + rm -f core *~ *.o *.d rm -f ../../src/utils/*.o rm -f ../../src/utils/*.d rm -f ../../src/common/*.o diff --git a/hs20/server/Makefile b/hs20/server/Makefile index 9ec7e4491ad4..24b81cd8a28a 100644 --- a/hs20/server/Makefile +++ b/hs20/server/Makefile @@ -36,8 +36,8 @@ OBJS += ../../src/utils/xml_libxml2.o hs20_spp_server: $(OBJS) $(LDO) $(LDFLAGS) -o hs20_spp_server $(OBJS) $(LIBS) -clean: - rm -f core *~ *.o *.d hs20_spp_server +clean: common-clean + rm -f core *~ *.o *.d rm -f ../../src/utils/*.o rm -f ../../src/utils/*.d rm -f ../../src/crypto/*.o diff --git a/radius_example/Makefile b/radius_example/Makefile index 75cb3caeb3dd..3492ac70fc49 100644 --- a/radius_example/Makefile +++ b/radius_example/Makefile @@ -27,8 +27,7 @@ OBJS_ex = radius_example.o radius_example: $(OBJS_ex) $(LIBS) $(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS) $(LLIBS) -clean: - $(MAKE) -C ../src clean - rm -f core *~ *.o *.d $(ALL) +clean: common-clean + rm -f core *~ *.o *.d -include $(OBJS:%.o=%.d) diff --git a/src/Makefile b/src/Makefile index c9e84c11de7a..6eb7f2acb5a1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -5,8 +5,8 @@ all: for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d; done clean: - for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done - rm -f *~ + $(Q)for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done + $(Q)rm -f *~ install: for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d install; done diff --git a/src/build.rules b/src/build.rules index 5edfea1dfa4d..18e23ea5338c 100644 --- a/src/build.rules +++ b/src/build.rules @@ -4,6 +4,9 @@ all: $(VERIFY) $(ALL) $(EXTRA_TARGETS) # disable built-in rules .SUFFIXES: +ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST))) +ROOTDIR := $(dir $(ROOTDIR:%/=%)) + ifndef CC CC=gcc endif @@ -44,3 +47,8 @@ else $(Q)$(CC) -c -o $@ $(CFLAGS) $< @$(E) " CC " $< endif + +.PHONY: common-clean +common-clean: + $(Q)$(MAKE) -C $(ROOTDIR)/src clean + $(Q)rm -f $(ALL) diff --git a/tests/Makefile b/tests/Makefile index 119ed7a2ae90..4d9f2e0ab8c1 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -151,9 +151,8 @@ run-tests: $(ALL) @echo @echo All tests completed successfully. -clean: - $(MAKE) -C ../src clean - rm -f $(ALL) *~ *.o *.d +clean: common-clean + rm -f *~ *.o *.d rm -f test-eapol rm -f test-https rm -f test-json diff --git a/wlantest/Makefile b/wlantest/Makefile index 0324fa54855e..fee80f6f4e2c 100644 --- a/wlantest/Makefile +++ b/wlantest/Makefile @@ -81,8 +81,7 @@ wlantest_cli: $(OBJS_cli) $(OWN_LIBS) test_vectors: $(TOBJS) $(OWN_LIBS) $(LDO) $(LDFLAGS) -o test_vectors $(TOBJS) $(OWN_LIBS) $(LIBS) -clean: - $(MAKE) -C ../src clean - rm -f core *~ *.o *.d $(ALL) +clean: common-clean + rm -f core *~ *.o *.d -include $(OBJS:%.o=%.d) diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 13d938168758..b18755bd7481 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -2004,11 +2004,11 @@ lcov-html: wpa_supplicant.gcda lcov -c -d .. > lcov.info genhtml lcov.info --output-directory lcov-html -clean: +clean: common-clean $(MAKE) -C ../src clean $(MAKE) -C dbus clean rm -f core *~ *.o *.d *.gcno *.gcda *.gcov - rm -f eap_*.so $(ALL) $(WINALL) eapol_test preauth_test + rm -f eap_*.so $(WINALL) eapol_test preauth_test rm -f wpa_priv rm -f nfc_pw_token rm -f lcov.info From patchwork Fri Sep 18 09:24:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366711 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=Atv3na0r; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt7k62hFNz9sPB for ; Fri, 18 Sep 2020 19:26:06 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RC8YYNrEYo5OEAKrf/GYjB7VOlUfD1buAA1gb9wsfaQ=; b=Atv3na0rR6v+VESCxIlp1G5mC nnCrhx/i152inMW/1E4rsi84QVhO5LdFXdNVnm9NWR7JG+29npNO7advEIJEmSSlDsL6us5UpMtsR s/WmQl4C80txuuNeizDerFkEyWc3JcKgJlv+ICDlPj+8nakXsrdn5yd17ynIeAJVFTYrxEbHBt3Rn FsFjU5W5JHJfXNAFnD8hvf039DXWnVL+/ini5NO4N2FEQimazpPHGI1XRF0GOzvnGWd8ERO6DsGyQ kdRmhqfA83+8UU7NVKr/6BI3CLho/DArLph+vTOKIC9x6UIOawtH5K6+UPekWUq6gGcH3QxAq4A52 pk2i9kP8w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdz-0001a7-AB; Fri, 18 Sep 2020 09:25:27 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdj-0001SF-9Q for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:25:15 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdi-0069hJ-4R; Fri, 18 Sep 2020 11:25:10 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 06/15] build: move config file handling into build.rules Date: Fri, 18 Sep 2020 11:24:52 +0200 Message-Id: <1600421070-Ie37624a7910ff4401e58ce73aa094eb448ff6be4@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_052511_346468_D2C8C2F6 X-CRM114-Status: GOOD ( 11.49 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg This will make it easier to split out the handling in a proper way, and handle common cflags/dependencies. Signed-off-by: Johannes Berg --- hostapd/Makefile | 13 +------------ src/build.rules | 23 ++++++++++++++++++++++- wpa_supplicant/Makefile | 13 +------------ 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/hostapd/Makefile b/hostapd/Makefile index 2e15c8911483..ac83730e9621 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -1,5 +1,5 @@ ALL=hostapd hostapd_cli -VERIFY=verify_config +CONFIG_FILE = .config include ../src/build.rules @@ -27,8 +27,6 @@ CFLAGS += -I$(abspath ../src/utils) export BINDIR ?= /usr/local/bin/ --include .config - ifndef CONFIG_NO_GITVER # Add VERSION_STR postfix for builds from a git repository ifeq ($(wildcard ../.git),../.git) @@ -1261,15 +1259,6 @@ ifdef CONFIG_NO_TKIP CFLAGS += -DCONFIG_NO_TKIP endif -verify_config: - @if [ ! -r .config ]; then \ - echo 'Building hostapd requires a configuration file'; \ - echo '(.config). See README for more instructions. You can'; \ - echo 'run "cp defconfig .config" to create an example'; \ - echo 'configuration.'; \ - exit 1; \ - fi - $(DESTDIR)$(BINDIR)/%: % install -D $(<) $(@) diff --git a/src/build.rules b/src/build.rules index 18e23ea5338c..486fea65861e 100644 --- a/src/build.rules +++ b/src/build.rules @@ -1,5 +1,5 @@ .PHONY: all -all: $(VERIFY) $(ALL) $(EXTRA_TARGETS) +all: _all # disable built-in rules .SUFFIXES: @@ -23,6 +23,27 @@ ifndef CFLAGS CFLAGS = -MMD -O2 -Wall -g endif +ifneq ($(CONFIG_FILE),) +-include $(CONFIG_FILE) + +.PHONY: verify_config +verify_config: + @if [ ! -r $(CONFIG_FILE) ]; then \ + echo 'Building $(firstword $(ALL)) requires a configuration file'; \ + echo '(.config). See README for more instructions. You can'; \ + echo 'run "cp defconfig .config" to create an example'; \ + echo 'configuration.'; \ + exit 1; \ + fi +VERIFY := verify_config +else +VERIFY := +endif + +# default target +.PHONY: _all +_all: $(VERIFY) $(ALL) $(EXTRA_TARGETS) + Q=@ E=echo ifeq ($(V), 1) diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index b18755bd7481..8645d908f821 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -14,9 +14,9 @@ ifdef CONFIG_BUILD_WPA_CLIENT_SO ALL += libwpa_client.so endif -VERIFY=verify_config EXTRA_TARGETS=dynamic_eap_methods +CONFIG_FILE=.config include ../src/build.rules ifdef LIBS @@ -39,8 +39,6 @@ CFLAGS += $(EXTRA_CFLAGS) CFLAGS += -I$(abspath ../src) CFLAGS += -I$(abspath ../src/utils) --include .config - ifndef CONFIG_NO_GITVER # Add VERSION_STR postfix for builds from a git repository ifeq ($(wildcard ../.git),../.git) @@ -57,15 +55,6 @@ CONFIG_WPS_TESTING=y CONFIG_TDLS_TESTING=y endif -verify_config: - @if [ ! -r .config ]; then \ - echo 'Building wpa_supplicant requires a configuration file'; \ - echo '(.config). See README for more instructions. You can'; \ - echo 'run "cp defconfig .config" to create an example'; \ - echo 'configuration.'; \ - exit 1; \ - fi - mkconfig: @if [ -f .config ]; then \ echo '.config exists - did not replace it'; \ From patchwork Fri Sep 18 09:24:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366715 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=QcwnsaMY; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt7kT3ZBBz9sPB for ; Fri, 18 Sep 2020 19:26:25 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gRamLK/m32Tn6GR/DOfG2BDio/SCG4WVNUH9QhfMib0=; b=QcwnsaMYzYWCExgyWu2cqQVN3 hrS4ds8jIIwl8KVF1EKtkUfsmKdEUfXn97OPrAlu1j5PxBpqei8y5s0zpBpwcKkilnmTIpFMccpsj m0oENuvmWMKw0EY+PCHSbxE291a+h4BNaRrXg3M+Y+88Tgs5ViVpyNngCNFykazHATriGXwDY5yfL wlVQKm14Q+LeG5//WXwbe7nnczDXAuw53y5w487hkG8rYQgQXuvmKtPxFbTEe0Hff2dkPcFyjtJAx EwVbZ/X+6t4AuRr4lxYNN92eGuLc1Y9C9hpEkJN9NXlBb17qnFS8KmeReYACIwEuEnyfQnWoKP4zy Lk4WQle0A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCeG-0001jm-2G; Fri, 18 Sep 2020 09:25:44 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdj-0001SZ-OU for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:25:19 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdi-0069hJ-De; Fri, 18 Sep 2020 11:25:10 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 07/15] build: put object files into build/ folder Date: Fri, 18 Sep 2020 11:24:53 +0200 Message-Id: <1600421070-I22e373c8507f766a8c489a5df7c9fd165db58375@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_052512_112718_3065F252 X-CRM114-Status: GOOD ( 16.41 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Instead of building in the source tree, put most object files into the build/ folder at the root, and put each thing that's being built into a separate folder. This then allows us to build hostapd and wpa_supplicant (or other combinations) without "make clean" inbetween. For the tests keep the objects in place for now (and to do that, add the build rule) so that we don't have to rewrite all of that with $(call BUILDOBJS,...) which is just noise there. Signed-off-by: Johannes Berg --- .gitignore | 1 + eap_example/Makefile | 18 +++++++++++------- hostapd/Makefile | 22 +++++++++++++++++----- hs20/client/Makefile | 14 +++----------- hs20/server/Makefile | 10 +++------- radius_example/Makefile | 5 +++-- src/ap/Makefile | 4 ++-- src/build.rules | 32 ++++++++++++++++++++++++-------- src/common/Makefile | 4 ++-- src/crypto/Makefile | 4 ++-- src/eap_common/Makefile | 4 ++-- src/eap_peer/Makefile | 4 ++-- src/eap_server/Makefile | 4 ++-- src/eapol_auth/Makefile | 4 ++-- src/eapol_supp/Makefile | 4 ++-- src/l2_packet/Makefile | 4 ++-- src/objs.mk | 3 +++ src/p2p/Makefile | 4 ++-- src/radius/Makefile | 4 ++-- src/rsn_supp/Makefile | 4 ++-- src/tls/Makefile | 4 ++-- src/utils/Makefile | 4 ++-- src/wps/Makefile | 4 ++-- tests/Makefile | 7 +++++++ wlantest/Makefile | 10 +++++++--- wpa_supplicant/Makefile | 34 ++++++++++++++++++++++++++-------- 26 files changed, 135 insertions(+), 81 deletions(-) create mode 100644 src/objs.mk diff --git a/.gitignore b/.gitignore index e057b54ea1e6..52a77fc01b9e 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ wlantest/wlantest wlantest/wlantest_cli **/parallel-vm.log tags +build/ diff --git a/eap_example/Makefile b/eap_example/Makefile index ecef3c97662b..7660b8ddd036 100644 --- a/eap_example/Makefile +++ b/eap_example/Makefile @@ -7,9 +7,9 @@ CFLAGS += -I../src CFLAGS += -I../src/utils -OBJS_both += ../src/utils/libutils.a -OBJS_both += ../src/crypto/libcrypto.a -OBJS_both += ../src/tls/libtls.a +EAP_LIBS += ../src/utils/libutils.a +EAP_LIBS += ../src/crypto/libcrypto.a +EAP_LIBS += ../src/tls/libtls.a OBJS_both += ../src/eap_common/eap_peap_common.o OBJS_both += ../src/eap_common/eap_psk_common.o @@ -83,8 +83,12 @@ CFLAGS += -DEAP_SERVER OBJS_lib=$(OBJS_both) $(OBJS_peer) $(OBJS_server) +_OBJS_VAR := OBJS_lib +include ../src/objs.mk OBJS_ex = eap_example.o eap_example_peer.o eap_example_server.o +_OBJS_VAR := OBJS_ex +include ../src/objs.mk ../src/utils/libutils.a: @@ -99,8 +103,8 @@ OBJS_ex = eap_example.o eap_example_peer.o eap_example_server.o ifneq ($(CONFIG_SOLIB), yes) LIBEAP = libeap.a -libeap.a: $(OBJS_lib) - $(AR) crT libeap.a $(OBJS_lib) +libeap.a: $(EAP_LIBS) $(OBJS_lib) + $(AR) crT libeap.a $^ $(RANLIB) libeap.a else @@ -108,8 +112,8 @@ CFLAGS += -fPIC -DPIC LDFLAGS += -shared LIBEAP = libeap.so -libeap.so: $(OBJS_lib) - $(LDO) $(LDFLAGS) $(OBJS_lib) -o $(LIBEAP) +libeap.so: $(EAP_LIBS) $(OBJS_lib) + $(LDO) $(LDFLAGS) $^ -o $(LIBEAP) endif diff --git a/hostapd/Makefile b/hostapd/Makefile index ac83730e9621..f07acdf24478 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -1272,6 +1272,9 @@ install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL)) BCHECK=../src/drivers/build.hostapd +_OBJS_VAR := OBJS +include ../src/objs.mk + hostapd: $(BCHECK) $(OBJS) $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) @$(E) " LD " $@ @@ -1279,6 +1282,10 @@ hostapd: $(BCHECK) $(OBJS) ifdef CONFIG_WPA_TRACE OBJS_c += ../src/utils/trace.o endif + +_OBJS_VAR := OBJS_c +include ../src/objs.mk + hostapd_cli: $(OBJS_c) $(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c) @$(E) " LD " $@ @@ -1335,6 +1342,13 @@ SOBJS += ../src/crypto/sha256-kdf.o SOBJS += ../src/crypto/sha384-kdf.o SOBJS += ../src/crypto/sha512-kdf.o +_OBJS_VAR := NOBJS +include ../src/objs.mk +_OBJS_VAR := HOBJS +include ../src/objs.mk +_OBJS_VAR := SOBJS +include ../src/objs.mk + nt_password_hash: $(NOBJS) $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n) @$(E) " LD " $@ @@ -1347,15 +1361,13 @@ sae_pk_gen: $(SOBJS) $(Q)$(CC) $(LDFLAGS) -o sae_pk_gen $(SOBJS) $(LIBS_s) @$(E) " LD " $@ +.PHONY: lcov-html lcov-html: - lcov -c -d .. > lcov.info + lcov -c -d $(BUILDDIR) > lcov.info genhtml lcov.info --output-directory lcov-html clean: common-clean - rm -f core *~ *.o nt_password_hash hlr_auc_gw + rm -f core *~ nt_password_hash hlr_auc_gw rm -f sae_pk_gen - rm -f *.d *.gcno *.gcda *.gcov rm -f lcov.info rm -rf lcov-html - --include $(OBJS:%.o=%.d) diff --git a/hs20/client/Makefile b/hs20/client/Makefile index cbb1105e186b..4dcfe2d3bf2c 100644 --- a/hs20/client/Makefile +++ b/hs20/client/Makefile @@ -71,19 +71,11 @@ CFLAGS += -DEAP_TLS_OPENSSL OBJS += ../../src/crypto/tls_openssl_ocsp.o LIBS += -lssl -lcrypto +_OBJS_VAR := OBJS +include ../../src/objs.mk hs20-osu-client: $(OBJS) $(Q)$(LDO) $(LDFLAGS) -o hs20-osu-client $(OBJS) $(LIBS) @$(E) " LD " $@ clean: common-clean - rm -f core *~ *.o *.d - rm -f ../../src/utils/*.o - rm -f ../../src/utils/*.d - rm -f ../../src/common/*.o - rm -f ../../src/common/*.d - rm -f ../../src/crypto/*.o - rm -f ../../src/crypto/*.d - rm -f ../../src/wps/*.o - rm -f ../../src/wps/*.d - --include $(OBJS:%.o=%.d) + rm -f core *~ diff --git a/hs20/server/Makefile b/hs20/server/Makefile index 24b81cd8a28a..0cab6d6b010a 100644 --- a/hs20/server/Makefile +++ b/hs20/server/Makefile @@ -33,14 +33,10 @@ CFLAGS += $(shell xml2-config --cflags) LIBS += $(shell xml2-config --libs) OBJS += ../../src/utils/xml_libxml2.o +_OBJS_VAR := OBJS +include ../../src/objs.mk hs20_spp_server: $(OBJS) $(LDO) $(LDFLAGS) -o hs20_spp_server $(OBJS) $(LIBS) clean: common-clean - rm -f core *~ *.o *.d - rm -f ../../src/utils/*.o - rm -f ../../src/utils/*.d - rm -f ../../src/crypto/*.o - rm -f ../../src/crypto/*.d - --include $(OBJS:%.o=%.d) + rm -f core *~ diff --git a/radius_example/Makefile b/radius_example/Makefile index 3492ac70fc49..f0e4e535aa3c 100644 --- a/radius_example/Makefile +++ b/radius_example/Makefile @@ -24,10 +24,11 @@ LLIBS = -lrt OBJS_ex = radius_example.o +_OBJS_VAR := OBJS_ex +include ../src/objs.mk + radius_example: $(OBJS_ex) $(LIBS) $(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS) $(LLIBS) clean: common-clean rm -f core *~ *.o *.d - --include $(OBJS:%.o=%.d) diff --git a/src/ap/Makefile b/src/ap/Makefile index 805181d00c12..425b123405a4 100644 --- a/src/ap/Makefile +++ b/src/ap/Makefile @@ -65,7 +65,7 @@ LIB_OBJS= \ wps_hostapd.o \ x_snoop.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libap.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/build.rules b/src/build.rules index 486fea65861e..4b04eca58cf6 100644 --- a/src/build.rules +++ b/src/build.rules @@ -4,8 +4,13 @@ all: _all # disable built-in rules .SUFFIXES: +# setup some variables ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST))) -ROOTDIR := $(dir $(ROOTDIR:%/=%)) +ROOTDIR := $(dir $(ROOTDIR:%../src/=%))../ +BUILDDIR := $(ROOTDIR)build +_PROJ := $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) +ABSROOT := $(abspath $(ROOTDIR)) +_PROJ := $(_PROJ:$(ABSROOT)/%=%) ifndef CC CC=gcc @@ -26,6 +31,9 @@ endif ifneq ($(CONFIG_FILE),) -include $(CONFIG_FILE) +# export for sub-makefiles +export CONFIG_CODE_COVERAGE + .PHONY: verify_config verify_config: @if [ ! -r $(CONFIG_FILE) ]; then \ @@ -44,6 +52,10 @@ endif .PHONY: _all _all: $(VERIFY) $(ALL) $(EXTRA_TARGETS) +# continue setup +COVSUFFIX := $(if $(CONFIG_CODE_COVERAGE),-cov,) +PROJ := $(_PROJ)$(COVSUFFIX) + Q=@ E=echo ifeq ($(V), 1) @@ -59,17 +71,21 @@ ifeq ($(Q),@) MAKEFLAGS += --no-print-directory endif -ifdef CONFIG_CODE_COVERAGE -%.o: %.c +_DIRS := $(BUILDDIR)/$(PROJ) +.PHONY: _make_dirs +_make_dirs: + @mkdir -p $(_DIRS) + +$(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c | _make_dirs + $(Q)$(CC) -c -o $@ $(CFLAGS) $< @$(E) " CC " $< - $(Q)cd $(dir $@); $(CC) -c -o $(notdir $@) $(CFLAGS) $(notdir $<) -else -%.o: %.c +$(BUILDDIR)/$(PROJ)/%.o: %.c | _make_dirs $(Q)$(CC) -c -o $@ $(CFLAGS) $< @$(E) " CC " $< -endif + +BUILDOBJ = $(patsubst %,$(BUILDDIR)/$(PROJ)/%,$(patsubst $(ROOTDIR)%,%,$(1))) .PHONY: common-clean common-clean: $(Q)$(MAKE) -C $(ROOTDIR)/src clean - $(Q)rm -f $(ALL) + $(Q)rm -rf $(ALL) $(BUILDDIR)/$(PROJ) diff --git a/src/common/Makefile b/src/common/Makefile index eeb69f0d4ff3..4cd48d9fd8ce 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -19,7 +19,7 @@ LIB_OBJS= \ sae.o \ wpa_common.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libcommon.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/crypto/Makefile b/src/crypto/Makefile index 94eac66fa955..3af5406ea381 100644 --- a/src/crypto/Makefile +++ b/src/crypto/Makefile @@ -66,7 +66,7 @@ LIB_OBJS += random.o endif +_OBJS_VAR := LIB_OBJS +include ../objs.mk libcrypto.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/eap_common/Makefile b/src/eap_common/Makefile index 7d6777babf4f..49fbbde02691 100644 --- a/src/eap_common/Makefile +++ b/src/eap_common/Makefile @@ -23,7 +23,7 @@ LIB_OBJS= \ eap_wsc_common.o \ ikev2_common.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libeap_common.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/eap_peer/Makefile b/src/eap_peer/Makefile index 282b89696e5c..36439b788379 100644 --- a/src/eap_peer/Makefile +++ b/src/eap_peer/Makefile @@ -15,7 +15,7 @@ LIB_OBJS= \ eap.o \ eap_methods.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libeap_peer.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/eap_server/Makefile b/src/eap_server/Makefile index 4ece9aa67b35..946ac195e251 100644 --- a/src/eap_server/Makefile +++ b/src/eap_server/Makefile @@ -13,7 +13,7 @@ LIB_OBJS= \ eap_server_identity.o \ eap_server_methods.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libeap_server.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/eapol_auth/Makefile b/src/eapol_auth/Makefile index 0175a19d940e..777979ce7c4f 100644 --- a/src/eapol_auth/Makefile +++ b/src/eapol_auth/Makefile @@ -8,7 +8,7 @@ install: LIB_OBJS = eapol_auth_sm.o eapol_auth_dump.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libeapol_auth.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/eapol_supp/Makefile b/src/eapol_supp/Makefile index c98280b469b7..265e5f25c37c 100644 --- a/src/eapol_supp/Makefile +++ b/src/eapol_supp/Makefile @@ -10,7 +10,7 @@ CFLAGS += -DIEEE8021X_EAPOL LIB_OBJS = eapol_supp_sm.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libeapol_supp.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/l2_packet/Makefile b/src/l2_packet/Makefile index 20f229511e9c..ab8c86ecc43d 100644 --- a/src/l2_packet/Makefile +++ b/src/l2_packet/Makefile @@ -8,7 +8,7 @@ install: LIB_OBJS = l2_packet_linux.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libl2_packet.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/objs.mk b/src/objs.mk new file mode 100644 index 000000000000..df9fb17a1c10 --- /dev/null +++ b/src/objs.mk @@ -0,0 +1,3 @@ +$(_OBJS_VAR) := $(call BUILDOBJ,$($(_OBJS_VAR))) +-include $($(_OBJS_VAR):%.o=%.d) +_DIRS += $(dir $($(_OBJS_VAR))) diff --git a/src/p2p/Makefile b/src/p2p/Makefile index 174cf6f6f7f4..c6b406661182 100644 --- a/src/p2p/Makefile +++ b/src/p2p/Makefile @@ -21,7 +21,7 @@ LIB_OBJS= \ p2p_sd.o \ p2p_utils.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libp2p.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/radius/Makefile b/src/radius/Makefile index dbe9a9a9fa71..83096f0c7fbb 100644 --- a/src/radius/Makefile +++ b/src/radius/Makefile @@ -14,7 +14,7 @@ LIB_OBJS= \ radius_das.o \ radius_server.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libradius.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/rsn_supp/Makefile b/src/rsn_supp/Makefile index 255cb73a7505..43288e3fd688 100644 --- a/src/rsn_supp/Makefile +++ b/src/rsn_supp/Makefile @@ -19,7 +19,7 @@ LIB_OBJS= \ wpa.o \ wpa_ie.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk librsn_supp.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/tls/Makefile b/src/tls/Makefile index 0a36cf9e4530..3fac5ee8c6cd 100644 --- a/src/tls/Makefile +++ b/src/tls/Makefile @@ -31,7 +31,7 @@ LIB_OBJS= \ x509v3.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libtls.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/utils/Makefile b/src/utils/Makefile index 29fb1295d726..7be05101fc30 100644 --- a/src/utils/Makefile +++ b/src/utils/Makefile @@ -34,7 +34,7 @@ LIB_OBJS += edit.o #LIB_OBJS += pcsc_funcs.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libutils.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/src/wps/Makefile b/src/wps/Makefile index 811b62977be8..ed928ef41e94 100644 --- a/src/wps/Makefile +++ b/src/wps/Makefile @@ -33,7 +33,7 @@ LIB_OBJS= \ wps_upnp_ssdp.o \ wps_upnp_web.o +_OBJS_VAR := LIB_OBJS +include ../objs.mk libwps.a: $(LIB_OBJS) $(AR) crT $@ $? - --include $(OBJS:%.o=%.d) diff --git a/tests/Makefile b/tests/Makefile index 4d9f2e0ab8c1..4a07a5dc55ca 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -5,6 +5,13 @@ ALL=test-base64 test-md4 test-milenage \ include ../src/build.rules +# for now, keep building in this folder, otherwise we need to +# put each object for each test into a separate variable and +# then do the objs.mk dance for it ... +%.o: %.c + $(Q)$(CC) -c -o $@ $(CFLAGS) $< + @$(E) " CC " $< + ifdef LIBFUZZER CC=clang CFLAGS = -MMD -O2 -Wall -g diff --git a/wlantest/Makefile b/wlantest/Makefile index fee80f6f4e2c..410c309d4745 100644 --- a/wlantest/Makefile +++ b/wlantest/Makefile @@ -71,6 +71,12 @@ TOBJS += gcmp.o OBJS_cli = wlantest_cli.o +_OBJS_VAR := OBJS +include ../src/objs.mk +_OBJS_VAR := TOBJS +include ../src/objs.mk +_OBJS_VAR := OBJS_cli +include ../src/objs.mk wlantest: $(OBJS) $(OWN_LIBS) $(LDO) $(LDFLAGS) -o wlantest $(OBJS) $(OWN_LIBS) $(LIBS) @@ -82,6 +88,4 @@ test_vectors: $(TOBJS) $(OWN_LIBS) $(LDO) $(LDFLAGS) -o test_vectors $(TOBJS) $(OWN_LIBS) $(LIBS) clean: common-clean - rm -f core *~ *.o *.d - --include $(OBJS:%.o=%.d) + rm -f core *~ diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 8645d908f821..9f81addd8228 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -1860,28 +1860,40 @@ dynamic_eap_methods: $(EAPDYN) BCHECK=../src/drivers/build.wpa_supplicant +_OBJS_VAR := OBJS_priv +include ../src/objs.mk wpa_priv: $(BCHECK) $(OBJS_priv) $(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS) @$(E) " LD " $@ $(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config +_OBJS_VAR := OBJS +include ../src/objs.mk wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs) $(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS) @$(E) " LD " $@ +_OBJS_VAR := OBJS_t +include ../src/objs.mk eapol_test: $(OBJS_t) $(Q)$(LDO) $(LDFLAGS) -o eapol_test $(OBJS_t) $(LIBS) @$(E) " LD " $@ +_OBJS_VAR := OBJS_t2 +include ../src/objs.mk preauth_test: $(OBJS_t2) $(Q)$(LDO) $(LDFLAGS) -o preauth_test $(OBJS_t2) $(LIBS) @$(E) " LD " $@ +_OBJS_VAR := OBJS_p +include ../src/objs.mk wpa_passphrase: $(OBJS_p) $(Q)$(LDO) $(LDFLAGS) -o wpa_passphrase $(OBJS_p) $(LIBS_p) $(LIBS) @$(E) " LD " $@ +_OBJS_VAR := OBJS_c +include ../src/objs.mk wpa_cli: $(OBJS_c) $(Q)$(LDO) $(LDFLAGS) -o wpa_cli $(OBJS_c) $(LIBS_c) @$(E) " LD " $@ @@ -1895,6 +1907,8 @@ LIBCTRLSO += ../src/utils/os_$(CONFIG_OS).c LIBCTRLSO += ../src/utils/common.c LIBCTRLSO += ../src/utils/wpa_debug.c +_OBJS_VAR := LIBCTRL +include ../src/objs.mk libwpa_client.a: $(LIBCTRL) $(Q)rm -f $@ $(Q)$(AR) crs $@ $? @@ -1904,14 +1918,19 @@ libwpa_client.so: $(LIBCTRLSO) @$(E) " CC $@ ($^)" $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -fPIC $^ -libwpa_test1: libwpa_test.o libwpa_client.a - $(Q)$(LDO) $(LDFLAGS) -o libwpa_test1 libwpa_test.o libwpa_client.a $(LIBS_c) +OBJS_wpatest := libwpa_test.o +_OBJS_VAR := OBJS_wpatest +include ../src/objs.mk +libwpa_test1: $(OBJS_wpatest) libwpa_client.a + $(Q)$(LDO) $(LDFLAGS) -o libwpa_test1 $(OBJS_wpatest) libwpa_client.a $(LIBS_c) @$(E) " LD " $@ -libwpa_test2: libwpa_test.o libwpa_client.so - $(Q)$(LDO) $(LDFLAGS) -o libwpa_test2 libwpa_test.o -L. -lwpa_client $(LIBS_c) +libwpa_test2: $(OBJS_wpatest) libwpa_client.so + $(Q)$(LDO) $(LDFLAGS) -o libwpa_test2 $(OBJS_wpatest) -L. -lwpa_client $(LIBS_c) @$(E) " LD " $@ +_OBJS_VAR := OBJS_nfc +include ../src/objs.mk nfc_pw_token: $(OBJS_nfc) $(Q)$(LDO) $(LDFLAGS) -o nfc_pw_token $(OBJS_nfc) $(LIBS) @$(E) " LD " $@ @@ -1989,8 +2008,9 @@ FIPSLD=$(FIPSDIR)/bin/fipsld fips: $(MAKE) CC=$(FIPSLD) FIPSLD_CC="$(CC)" -lcov-html: wpa_supplicant.gcda - lcov -c -d .. > lcov.info +.PHONY: lcov-html +lcov-html: $(call BUILDOBJ,wpa_supplicant.gcda) + lcov -c -d $(BUILDDIR) > lcov.info genhtml lcov.info --output-directory lcov-html clean: common-clean @@ -2005,5 +2025,3 @@ clean: common-clean rm -f libwpa_client.a rm -f libwpa_client.so rm -f libwpa_test1 libwpa_test2 - --include $(OBJS:%.o=%.d) From patchwork Fri Sep 18 09:24:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366713 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=d07Md/EV; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt7kJ3MkKz9sPB for ; Fri, 18 Sep 2020 19:26:16 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=43SPBflxZj23XsWr79+7z8u1DuHC2OGqKzUdXzLkH8U=; b=d07Md/EVEW2Dw9k3KZ49su9mX 4saZESXaUMPmjcwlBVr7z6A2u1QTXRsV81bV7jSIa6QBd6dQcdQ+mbyTir6npZHgvq3PqwSYosh6m KFbIAxxABurGsIunqNWPW+LElcayL3tXOXGaGL5UaolYg4qlddauBA8x/LDlHaQ8KiDVLhAgTjJya McY9pgsbZYxsr9U6ve3cwa4IyzhPcmBYQehOmGbL7+AZeiFozAF4/nfAc+CqS07dadlLpHOQpZwPG EMcL/X75kNXCQmBld8awxKyFHRHrJOaGIf5na4W19EL0AJRFPGIIpgjFX+Ln/cUyB7Nj/5oL6yt4a N8mbbikjg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCe8-0001eI-Mk; Fri, 18 Sep 2020 09:25:36 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdk-0001T3-9T for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:25:16 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdi-0069hJ-Pz; Fri, 18 Sep 2020 11:25:10 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 08/15] build: add .config file to dependencies Date: Fri, 18 Sep 2020 11:24:54 +0200 Message-Id: <1600421070-Icb541578dbe07c07f8e53407e92e0ce272c94e29@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_052512_394273_4D859078 X-CRM114-Status: GOOD ( 12.53 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg If the .config file changes, basically everything needs to be rebuilt since we don't try to detect which symbols changed or such. Now that the .config file handling is in the common build system, make everything depend on it if there's one. Signed-off-by: Johannes Berg --- src/build.rules | 4 ++-- wpa_supplicant/Makefile | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/build.rules b/src/build.rules index 4b04eca58cf6..bdcae65519cf 100644 --- a/src/build.rules +++ b/src/build.rules @@ -76,10 +76,10 @@ _DIRS := $(BUILDDIR)/$(PROJ) _make_dirs: @mkdir -p $(_DIRS) -$(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c | _make_dirs +$(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c $(CONFIG_FILE) | _make_dirs $(Q)$(CC) -c -o $@ $(CFLAGS) $< @$(E) " CC " $< -$(BUILDDIR)/$(PROJ)/%.o: %.c | _make_dirs +$(BUILDDIR)/$(PROJ)/%.o: %.c $(CONFIG_FILE) | _make_dirs $(Q)$(CC) -c -o $@ $(CFLAGS) $< @$(E) " CC " $< diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 9f81addd8228..c858f43b5909 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -1866,8 +1866,6 @@ wpa_priv: $(BCHECK) $(OBJS_priv) $(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS) @$(E) " LD " $@ -$(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config - _OBJS_VAR := OBJS include ../src/objs.mk wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs) From patchwork Fri Sep 18 09:24:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366714 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=2ATelV8/; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt7kK07JZz9sT5 for ; Fri, 18 Sep 2020 19:26:17 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CwYlXed036KAqfnw8Y6vOPx+9ty453tcSqudfih0sNg=; b=2ATelV8/9aBXOa+mwao4TGae2 iQ+18FiHsO80IX6Osi9vIE5xG04r78EoJ0kk4D9Z5dWpPulkBIFpcyGqhM7HI5G1jDdK8d+GLcyzA 6dsQhWURoFmqGcDZXa0cvkX7/vj7JHuMt24Uw5lUjCtqfBxaL56JeeMG/YQ+6+Ur8no13w/j9UoW/ xxiBiv0eeQ26jrg8DSVmPjcMq7wCB1pK8sLySzCR3fxPRqkP1i2WmPQNEPqzwrff5UxhyW7n0/Fi0 kcVVDaGrvsoNkLoolNjP6UyRRiDPh9cISkHZ/IwTYrtgIEcn7P4LKbyisFUIiuO8qP06La5+hT1ca bV6luLl9A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCeC-0001hM-CA; Fri, 18 Sep 2020 09:25:40 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCdk-0001TC-Cf for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:25:17 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdj-0069hJ-2N; Fri, 18 Sep 2020 11:25:11 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 09/15] build: remove hostapd vs. wpa_s build checks Date: Fri, 18 Sep 2020 11:24:55 +0200 Message-Id: <1600421070-Ib638eab7ed9b579f8c79c20b4c043cc7436b94ca@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_052512_487766_9A9FA43A X-CRM114-Status: GOOD ( 10.58 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg These are no longer needed now. Note that this was never actually sufficient since src/drivers/ isn't the only thing shared, and thus a cross-build didn't work. Signed-off-by: Johannes Berg --- hostapd/Makefile | 10 +--------- wpa_supplicant/Makefile | 8 -------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/hostapd/Makefile b/hostapd/Makefile index f07acdf24478..555e05f4a896 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -1264,18 +1264,10 @@ $(DESTDIR)$(BINDIR)/%: % install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL)) -../src/drivers/build.hostapd: - @if [ -f ../src/drivers/build.wpa_supplicant ]; then \ - $(MAKE) -C ../src/drivers clean; \ - fi - @touch ../src/drivers/build.hostapd - -BCHECK=../src/drivers/build.hostapd - _OBJS_VAR := OBJS include ../src/objs.mk -hostapd: $(BCHECK) $(OBJS) +hostapd: $(OBJS) $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS) @$(E) " LD " $@ diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index c858f43b5909..9adadf141e67 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -1852,14 +1852,6 @@ endif dynamic_eap_methods: $(EAPDYN) -../src/drivers/build.wpa_supplicant: - @if [ -f ../src/drivers/build.hostapd ]; then \ - $(MAKE) -C ../src/drivers clean; \ - fi - @touch ../src/drivers/build.wpa_supplicant - -BCHECK=../src/drivers/build.wpa_supplicant - _OBJS_VAR := OBJS_priv include ../src/objs.mk wpa_priv: $(BCHECK) $(OBJS_priv) From patchwork Fri Sep 18 09:24:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366735 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=n/oltP6E; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt8443Z3Tz9sR4 for ; Fri, 18 Sep 2020 19:41:40 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6RJ0dpO9atDyQmMFf4BQcIVH/lj0jsuuM4XY4ZzrR70=; b=n/oltP6EgCH5vjS7bdE+81/77 Cu6WHpnWS7k7BA9Wx2oxRCpT8HWzpat6mV0RVNy+0cdrODTs3gDmJBX/O5y/G4apD8duiG9VMOJ4l Qx+pAqaIxh7GW6q+rQrL1+m2EZLJiXE4cMd4ZaCa0entXX/Fv8EikTye1SAY4d+eU1FYlwjK8ZlUi dQncIaE3ZbU7h3tIKjUKNh4jvEaTm7HE4ZG3I641e891Ff5fm0nfsjuAKw6jUafwau4HFhxA6jygA 5PMpNLDGrFPfAE6zGVlTmV6QaD7k3fvuZYt4SakJgaAyivAqrCG6aEAwJX1VcGQdeQDdJHve8PtwP MdDXRfaJw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCsy-0004x3-Ei; Fri, 18 Sep 2020 09:40:56 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCsv-0004wS-9l for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:40:54 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdj-0069hJ-BF; Fri, 18 Sep 2020 11:25:11 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 10/15] tests: rewrite .gitignore file Date: Fri, 18 Sep 2020 11:24:56 +0200 Message-Id: <1600421070-I2ff315b9889607ed1efb68617224a1a744d61e22@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_054053_376472_6DA5DBD7 X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg The file was already outdated again, so rewrite it to ignore anything but c, h and sh files that start with "test-". Signed-off-by: Johannes Berg --- tests/.gitignore | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/tests/.gitignore b/tests/.gitignore index 7bbf25ccab14..f3c8ac941d25 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,16 +1,3 @@ -test-aes -test-asn1 -test-base64 -test-https -test-https_server -test-list -test-md4 -test-md5 -test-milenage -test-ms_funcs -test-printf -test-rc4 -test-sha1 -test-sha256 -test-x509 -test-x509v3 +test-* +!test-*.[ch] +!test-*.sh From patchwork Fri Sep 18 09:24:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366739 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=sCrgkOJx; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt84H0gtnz9sT5 for ; Fri, 18 Sep 2020 19:41:51 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Q50wcwQc5ftkpwiyxBMAdRi2t2H9/OgJ64fACKrUYww=; b=sCrgkOJxBysLx+xofKBx5J85f xdMca5lAJuzHo1S6oECqrILXNmbgE4W3emMBvEoTq3nqTa0ZkQ5jCf7mhAAKHy1uUTvZxHQOcrWE+ 7Qw+Lo/AO22SsUfUnsZNHTYWwNGEZW39UMCHFLzL0Ge+Cdwjjt2QUSRD1am2b/J66GxiTlMfSxXd5 lFmbmpJa9QGVqCzY/0c4kHjScu2dobBQYiC85mHDm8bRQ2aPwtZ0ikH0TD/R4xsehhifxbE4gwXdX 2bTvRXop07wkIDXvBzDCrb8D+SaGhT4eXcov766pzpzyyBC95DFZpTs/HpgYlGI6Zfh+nDnbepf6r 422F4mkqQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCtD-00052r-O4; Fri, 18 Sep 2020 09:41:11 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCt8-00050h-GG for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:41:08 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdj-0069hJ-K8; Fri, 18 Sep 2020 11:25:11 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 11/15] build: use the new build system for fuzz tests Date: Fri, 18 Sep 2020 11:24:57 +0200 Message-Id: <1600421070-I4d7226690685cc1275eb92be242cfdb585b6e9ac@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_054106_794092_F0EE0AC1 X-CRM114-Status: GOOD ( 10.44 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Signed-off-by: Johannes Berg --- src/build.rules | 4 ++++ tests/fuzzing/ap-mgmt/Makefile | 14 +++++++------ tests/fuzzing/asn1/Makefile | 14 +++++++------ tests/fuzzing/dpp-uri/Makefile | 12 ++++++----- tests/fuzzing/eap-aka-peer/Makefile | 14 +++++++------ tests/fuzzing/eap-mschapv2-peer/Makefile | 14 +++++++------ tests/fuzzing/eap-sim-peer/Makefile | 14 +++++++------ tests/fuzzing/eapol-key-auth/Makefile | 14 +++++++------ tests/fuzzing/eapol-key-supp/Makefile | 14 +++++++------ tests/fuzzing/eapol-supp/Makefile | 14 +++++++------ tests/fuzzing/json/Makefile | 15 +++++++------- tests/fuzzing/p2p/Makefile | 14 +++++++------ tests/fuzzing/rules.include | 26 +++--------------------- tests/fuzzing/sae/Makefile | 14 +++++++------ tests/fuzzing/tls-client/Makefile | 15 +++++++------- tests/fuzzing/tls-server/Makefile | 15 +++++++------- tests/fuzzing/wnm/Makefile | 15 +++++++------- tests/fuzzing/x509/Makefile | 15 +++++++------- 18 files changed, 134 insertions(+), 123 deletions(-) diff --git a/src/build.rules b/src/build.rules index bdcae65519cf..2437a05eee9d 100644 --- a/src/build.rules +++ b/src/build.rules @@ -82,6 +82,10 @@ $(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c $(CONFIG_FILE) | _make_dirs $(BUILDDIR)/$(PROJ)/%.o: %.c $(CONFIG_FILE) | _make_dirs $(Q)$(CC) -c -o $@ $(CFLAGS) $< @$(E) " CC " $< +# for the fuzzing tests +$(BUILDDIR)/$(PROJ)/wpa_supplicant/%.o: $(ROOTDIR)wpa_supplicant/%.c $(CONFIG_FILE) | _make_dirs + $(Q)$(CC) -c -o $@ $(CFLAGS) $< + @$(E) " CC " $< BUILDOBJ = $(patsubst %,$(BUILDDIR)/$(PROJ)/%,$(patsubst $(ROOTDIR)%,%,$(1))) diff --git a/tests/fuzzing/ap-mgmt/Makefile b/tests/fuzzing/ap-mgmt/Makefile index 192ae723e2d8..159c7c3f8106 100644 --- a/tests/fuzzing/ap-mgmt/Makefile +++ b/tests/fuzzing/ap-mgmt/Makefile @@ -1,4 +1,4 @@ -all: ap-mgmt +ALL=ap-mgmt include ../rules.include CFLAGS += -DCONFIG_WNM @@ -26,11 +26,13 @@ ELIBS += $(SRC)/tls/libtls.a OBJS += $(SRC)/drivers/driver_common.o -ap-mgmt: ap-mgmt.o $(OBJS) $(LIBS) +OBJS += ap-mgmt.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +ap-mgmt: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) -clean: - $(MAKE) -C $(SRC) clean +clean: common-clean rm -f ap-mgmt *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/asn1/Makefile b/tests/fuzzing/asn1/Makefile index 4286259342ec..fb8fbed684ef 100644 --- a/tests/fuzzing/asn1/Makefile +++ b/tests/fuzzing/asn1/Makefile @@ -1,4 +1,4 @@ -all: asn1 +ALL=asn1 include ../rules.include OBJS += $(SRC)/utils/common.o @@ -7,12 +7,14 @@ OBJS += $(SRC)/utils/wpa_debug.o OBJS += $(SRC)/utils/wpabuf.o OBJS += $(SRC)/tls/asn1.o -asn1: asn1.o $(OBJS) $(LIBS) +OBJS += asn1.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +asn1: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) -clean: +clean: common-clean $(MAKE) -C $(SRC) clean - $(MAKE) -C $(WPAS_SRC) clean rm -f asn1 *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/dpp-uri/Makefile b/tests/fuzzing/dpp-uri/Makefile index 07bfac06c826..aca8f02ad434 100644 --- a/tests/fuzzing/dpp-uri/Makefile +++ b/tests/fuzzing/dpp-uri/Makefile @@ -28,11 +28,13 @@ OBJS += $(SRC)/common/dpp_pkex.o OBJS += $(SRC)/common/dpp_reconfig.o OBJS += $(SRC)/common/dpp_tcp.o -dpp-uri: dpp-uri.o $(OBJS) $(LIBS) +OBJS += dpp-uri.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +dpp-uri: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ -lcrypto -clean: - $(MAKE) -C $(SRC) clean +clean: common-clean rm -f dpp-uri *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/eap-aka-peer/Makefile b/tests/fuzzing/eap-aka-peer/Makefile index d1a4cd372ba5..bd960caa763e 100644 --- a/tests/fuzzing/eap-aka-peer/Makefile +++ b/tests/fuzzing/eap-aka-peer/Makefile @@ -1,4 +1,4 @@ -all: eap-aka-peer +ALL=eap-aka-peer include ../rules.include CFLAGS += -DIEEE8021X_EAPOL @@ -10,12 +10,14 @@ OBJS += $(SRC)/eap_common/eap_common.o LIBS += $(SRC)/crypto/libcrypto.a LIBS += $(SRC)/utils/libutils.a -eap-aka-peer: eap-aka-peer.o $(OBJS) $(LIBS) +OBJS += eap-aka-peer.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +eap-aka-peer: $(OBJS) $(LIBS) $(Q)$(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) @$(E) " LD " $@ -clean: - $(MAKE) -C $(SRC) clean +clean: common-clean rm -f eap-aka-peer *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/eap-mschapv2-peer/Makefile b/tests/fuzzing/eap-mschapv2-peer/Makefile index 801e0af816cb..953855c85ed4 100644 --- a/tests/fuzzing/eap-mschapv2-peer/Makefile +++ b/tests/fuzzing/eap-mschapv2-peer/Makefile @@ -1,4 +1,4 @@ -all: eap-mschapv2-peer +ALL=eap-mschapv2-peer include ../rules.include CFLAGS += -DIEEE8021X_EAPOL @@ -9,12 +9,14 @@ OBJS += $(SRC)/eap_common/eap_common.o LIBS += $(SRC)/crypto/libcrypto.a LIBS += $(SRC)/utils/libutils.a -eap-mschapv2-peer: eap-mschapv2-peer.o $(OBJS) $(LIBS) +OBJS += eap-mschapv2-peer.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +eap-mschapv2-peer: $(OBJS) $(LIBS) $(Q)$(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) @$(E) " LD " $@ -clean: - $(MAKE) -C $(SRC) clean +clean: common-clean rm -f eap-mschapv2-peer *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/eap-sim-peer/Makefile b/tests/fuzzing/eap-sim-peer/Makefile index 302717e95f1d..9292ccb79b2d 100644 --- a/tests/fuzzing/eap-sim-peer/Makefile +++ b/tests/fuzzing/eap-sim-peer/Makefile @@ -1,4 +1,4 @@ -all: eap-sim-peer +ALL=eap-sim-peer include ../rules.include CFLAGS += -DIEEE8021X_EAPOL @@ -10,12 +10,14 @@ OBJS += $(SRC)/eap_common/eap_common.o LIBS += $(SRC)/crypto/libcrypto.a LIBS += $(SRC)/utils/libutils.a -eap-sim-peer: eap-sim-peer.o $(OBJS) $(LIBS) +OBJS += eap-sim-peer.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +eap-sim-peer: $(OBJS) $(LIBS) $(Q)$(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) @$(E) " LD " $@ -clean: - $(MAKE) -C $(SRC) clean +clean: common-clean rm -f eap-sim-peer *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/eapol-key-auth/Makefile b/tests/fuzzing/eapol-key-auth/Makefile index bd2b2756600f..bdc731ff4931 100644 --- a/tests/fuzzing/eapol-key-auth/Makefile +++ b/tests/fuzzing/eapol-key-auth/Makefile @@ -1,4 +1,4 @@ -all: eapol-key-auth +ALL=eapol-key-auth include ../rules.include CFLAGS += -DCONFIG_IEEE80211R_AP @@ -19,11 +19,13 @@ LIBS += $(SRC)/radius/libradius.a OBJS += $(SRC)/drivers/driver_common.o -eapol-key-auth: eapol-key-auth.o $(OBJS) $(LIBS) +OBJS += eapol-key-auth.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +eapol-key-auth: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LIBS) -Wl,--end-group -clean: - $(MAKE) -C $(SRC) clean +clean: common-clean rm -f eapol-key-auth *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/eapol-key-supp/Makefile b/tests/fuzzing/eapol-key-supp/Makefile index afe566584634..29e419b7cd03 100644 --- a/tests/fuzzing/eapol-key-supp/Makefile +++ b/tests/fuzzing/eapol-key-supp/Makefile @@ -1,4 +1,4 @@ -all: eapol-key-supp +ALL=eapol-key-supp include ../rules.include CFLAGS += -DCONFIG_IEEE80211R_AP @@ -15,11 +15,13 @@ LIBS += $(SRC)/eap_common/libeap_common.a LIBS += $(SRC)/l2_packet/libl2_packet.a LIBS += $(SRC)/utils/libutils.a -eapol-key-supp: eapol-key-supp.o $(OBJS) $(LIBS) +OBJS += eapol-key-supp.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +eapol-key-supp: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LIBS) -Wl,--end-group -clean: - $(MAKE) -C $(SRC) clean +clean: common-clean rm -f eapol-key-supp *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/eapol-supp/Makefile b/tests/fuzzing/eapol-supp/Makefile index 41a505d3720e..27e631148df1 100644 --- a/tests/fuzzing/eapol-supp/Makefile +++ b/tests/fuzzing/eapol-supp/Makefile @@ -1,4 +1,4 @@ -all: eapol-supp +ALL=eapol-supp include ../rules.include CFLAGS += -DIEEE8021X_EAPOL @@ -13,11 +13,13 @@ LIBS += $(SRC)/eap_common/libeap_common.a LIBS += $(SRC)/l2_packet/libl2_packet.a LIBS += $(SRC)/utils/libutils.a -eapol-supp: eapol-supp.o $(OBJS) $(LIBS) +OBJS += eapol-supp.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +eapol-supp: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LIBS) -Wl,--end-group -clean: - $(MAKE) -C $(SRC) clean +clean: common-clean rm -f eapol-supp *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/json/Makefile b/tests/fuzzing/json/Makefile index ffa0c5a993d6..8de19293e29b 100644 --- a/tests/fuzzing/json/Makefile +++ b/tests/fuzzing/json/Makefile @@ -1,4 +1,4 @@ -all: json +ALL=json include ../rules.include OBJS += $(SRC)/utils/base64.o @@ -8,12 +8,13 @@ OBJS += $(SRC)/utils/os_unix.o OBJS += $(SRC)/utils/wpa_debug.o OBJS += $(SRC)/utils/wpabuf.o -json: json.o $(OBJS) $(LIBS) +OBJS += json.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +json: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) -clean: - $(MAKE) -C $(SRC) clean - $(MAKE) -C $(WPAS_SRC) clean +clean: common-clean rm -f json *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/p2p/Makefile b/tests/fuzzing/p2p/Makefile index c088e32d0028..ef31a7505e28 100644 --- a/tests/fuzzing/p2p/Makefile +++ b/tests/fuzzing/p2p/Makefile @@ -1,4 +1,4 @@ -all: p2p +ALL=p2p include ../rules.include LIBS += $(SRC)/utils/libutils.a @@ -8,11 +8,13 @@ LIBS += $(SRC)/p2p/libp2p.a LIBS += $(SRC)/tls/libtls.a LIBS += $(SRC)/wps/libwps.a -p2p: p2p.o $(OBJS) $(LIBS) +OBJS += p2p.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +p2p: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) -clean: - $(MAKE) -C $(SRC) clean +clean: common-clean rm -f p2p *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/rules.include b/tests/fuzzing/rules.include index a3b0ee0aa3e1..b2e8a81ea878 100644 --- a/tests/fuzzing/rules.include +++ b/tests/fuzzing/rules.include @@ -1,3 +1,6 @@ +FUZZ_RULES := $(lastword $(MAKEFILE_LIST)) +include $(dir $(FUZZ_RULES))../../src/build.rules + FUZZ_CFLAGS = ifdef LIBFUZZER @@ -18,14 +21,6 @@ CFLAGS += -DTEST_LIBFUZZER LDFLAGS += $(FUZZ_FLAGS) endif -ifndef CC -CC=gcc -endif - -ifndef LDO -LDO=$(CC) -endif - WPAS_SRC=../../../wpa_supplicant SRC=../../../src @@ -76,18 +71,3 @@ $(SRC)/utils/libutils.a: $(SRC)/wps/libwps.a: $(MAKE) -C $(SRC)/wps - -Q=@ -E=echo -ifeq ($(V), 1) -Q= -E=true -endif -ifeq ($(QUIET), 1) -Q=@ -E=true -endif - -%.o: %.c - $(Q)$(CC) -c -o $@ $(CFLAGS) $< - @$(E) " CC " $< diff --git a/tests/fuzzing/sae/Makefile b/tests/fuzzing/sae/Makefile index 5b86c2f43b13..ee7257afeaa8 100644 --- a/tests/fuzzing/sae/Makefile +++ b/tests/fuzzing/sae/Makefile @@ -1,4 +1,4 @@ -all: sae +ALL=sae include ../rules.include CFLAGS += -DCONFIG_SHA256 @@ -13,11 +13,13 @@ OBJS += $(SRC)/crypto/sha256-prf.o OBJS += $(SRC)/crypto/sha256-kdf.o OBJS += $(SRC)/common/dragonfly.o -sae: sae.o $(OBJS) $(LIBS) +OBJS += sae.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +sae: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ -lcrypto -clean: - $(MAKE) -C $(SRC) clean +clean: common-clean rm -f sae *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/tls-client/Makefile b/tests/fuzzing/tls-client/Makefile index e91125ec1cf8..7d5e8d536fe7 100644 --- a/tests/fuzzing/tls-client/Makefile +++ b/tests/fuzzing/tls-client/Makefile @@ -1,4 +1,4 @@ -all: tls-client +ALL=tls-client include ../rules.include LIBS += $(SRC)/common/libcommon.a @@ -14,12 +14,13 @@ LIBS += $(SRC)/utils/libutils.a ELIBS += $(SRC)/crypto/libcrypto.a ELIBS += $(SRC)/tls/libtls.a -tls-client: tls-client.o $(OBJS) $(LIBS) +OBJS += tls-client.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +tls-client: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) -clean: - $(MAKE) -C $(SRC) clean - $(MAKE) -C $(WPAS_SRC) clean +clean: common-clean rm -f tls-client *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/tls-server/Makefile b/tests/fuzzing/tls-server/Makefile index dbb53e5a4ca7..45304328e4b2 100644 --- a/tests/fuzzing/tls-server/Makefile +++ b/tests/fuzzing/tls-server/Makefile @@ -1,4 +1,4 @@ -all: tls-server +ALL=tls-server include ../rules.include LIBS += $(SRC)/common/libcommon.a @@ -14,12 +14,13 @@ LIBS += $(SRC)/utils/libutils.a ELIBS += $(SRC)/crypto/libcrypto.a ELIBS += $(SRC)/tls/libtls.a -tls-server: tls-server.o $(OBJS) $(LIBS) +OBJS += tls-server.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +tls-server: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) -clean: - $(MAKE) -C $(SRC) clean - $(MAKE) -C $(WPAS_SRC) clean +clean: common-clean rm -f tls-server *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/wnm/Makefile b/tests/fuzzing/wnm/Makefile index b8d33ac04c6d..f27dd341b333 100644 --- a/tests/fuzzing/wnm/Makefile +++ b/tests/fuzzing/wnm/Makefile @@ -1,4 +1,4 @@ -all: wnm +ALL=wnm include ../rules.include CFLAGS += -DCONFIG_WNM @@ -42,12 +42,13 @@ OBJS += $(WPAS_SRC)/wpas_glue.o OBJS += $(SRC)/drivers/driver_common.o OBJS += $(SRC)/drivers/drivers.o -wnm: wnm.o $(OBJS) $(LIBS) +OBJS += wnm.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +wnm: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) -clean: - $(MAKE) -C $(SRC) clean - $(MAKE) -C $(WPAS_SRC) clean +clean: common-clean rm -f wnm *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) diff --git a/tests/fuzzing/x509/Makefile b/tests/fuzzing/x509/Makefile index d7f751a9dcb5..7fff15a3a94a 100644 --- a/tests/fuzzing/x509/Makefile +++ b/tests/fuzzing/x509/Makefile @@ -1,4 +1,4 @@ -all: x509 +ALL=x509 include ../rules.include LIBS += $(SRC)/common/libcommon.a @@ -9,12 +9,13 @@ LIBS += $(SRC)/utils/libutils.a ELIBS += $(SRC)/crypto/libcrypto.a ELIBS += $(SRC)/tls/libtls.a -x509: x509.o $(OBJS) $(LIBS) +OBJS += x509.o + +_OBJS_VAR := OBJS +include ../../../src/objs.mk + +x509: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) -clean: - $(MAKE) -C $(SRC) clean - $(MAKE) -C $(WPAS_SRC) clean +clean: common-clean rm -f x509 *~ *.o *.d ../*~ ../*.o ../*.d - --include $(OBJS:%.o=%.d) From patchwork Fri Sep 18 09:24:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366734 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=2TOliSLI; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt83x01Lkz9sR4 for ; Fri, 18 Sep 2020 19:41:32 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=voLUYwJE8PCIOKglYpXJERFaDWO+ITmUeFZkozHoBCg=; b=2TOliSLIeb86SXHXw9VkxRxZB ekdv4e5rEChxRTJ9rLPFBkn+kyexNOwUiMn145cUiE2NggPtkYIDvMFsAw8xtq3NR34qrtVy2XrA8 whO4tGjDpOiYr7ojE488nNRvucn+yyyzd3Z+PiRtwD0D3W8DCQ7Vm88HEcQ+ub6qJXvyXc7SfPB3c 4/+nDHHBqdAFClxw0hZWuIE1k7qHD0ZAGoBLeNAsLhG7O/BYxipkINSJTKWH9AkudXVXGEWOYSi41 BoRdtta/OL0OgPnvFOr8VWUj5uWkpLqeNmh6zMXd+j5lA1e8jdVeIauiJetRCRErndJF5WQ/lfMel 6Z3S/+1qw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCt4-0004yz-FH; Fri, 18 Sep 2020 09:41:02 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCt1-0004xp-Fv for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:41:00 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdj-0069hJ-Um; Fri, 18 Sep 2020 11:25:12 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 12/15] tests: use new build system for the tests Date: Fri, 18 Sep 2020 11:24:58 +0200 Message-Id: <1600421070-I7b5b815bd378c902500ee7e68186ec4e9860f552@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_054059_552915_30432E8B X-CRM114-Status: GOOD ( 10.31 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg I had previously kept that building in the sources, but we can also change that. Signed-off-by: Johannes Berg --- tests/Makefile | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 4a07a5dc55ca..c8ba3f21c0b8 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -5,13 +5,6 @@ ALL=test-base64 test-md4 test-milenage \ include ../src/build.rules -# for now, keep building in this folder, otherwise we need to -# put each object for each test into a separate variable and -# then do the objs.mk dance for it ... -%.o: %.c - $(Q)$(CC) -c -o $@ $(CFLAGS) $< - @$(E) " CC " $< - ifdef LIBFUZZER CC=clang CFLAGS = -MMD -O2 -Wall -g @@ -98,52 +91,52 @@ LLIBS += -lrt $(MAKE) -C ../src/rsn_supp -test-aes: test-aes.o $(LIBS) +test-aes: $(call BUILDOBJ,test-aes.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS) -test-asn1: test-asn1.o $(LIBS) +test-asn1: $(call BUILDOBJ,test-asn1.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS) -test-base64: test-base64.o $(LIBS) +test-base64: $(call BUILDOBJ,test-base64.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS) -test-eapol: test-eapol.o $(LIBS) +test-eapol: $(call BUILDOBJ,test-eapol.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS) -test-https: test-https.o $(LIBS) +test-https: $(call BUILDOBJ,test-https.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS) -test-https_server: test-https_server.o $(LIBS) +test-https_server: $(call BUILDOBJ,test-https_server.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS) -test-json: test-json.o $(LIBS) +test-json: $(call BUILDOBJ,test-json.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS) -test-list: test-list.o $(LIBS) +test-list: $(call BUILDOBJ,test-list.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS) -test-md4: test-md4.o $(LIBS) +test-md4: $(call BUILDOBJ,test-md4.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS) -test-milenage: test-milenage.o $(LIBS) +test-milenage: $(call BUILDOBJ,test-milenage.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS) -test-rc4: test-rc4.o $(LIBS) +test-rc4: $(call BUILDOBJ,test-rc4.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS) -test-rsa-sig-ver: test-rsa-sig-ver.o $(LIBS) +test-rsa-sig-ver: $(call BUILDOBJ,test-rsa-sig-ver.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS) -test-sha1: test-sha1.o $(LIBS) +test-sha1: $(call BUILDOBJ,test-sha1.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS) -test-sha256: test-sha256.o $(LIBS) +test-sha256: $(call BUILDOBJ,test-sha256.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS) -test-tls: test-tls.o $(LIBS) +test-tls: $(call BUILDOBJ,test-tls.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS) -test-x509v3: test-x509v3.o $(LIBS) +test-x509v3: $(call BUILDOBJ,test-x509v3.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS) @@ -159,12 +152,10 @@ run-tests: $(ALL) @echo All tests completed successfully. clean: common-clean - rm -f *~ *.o *.d + rm -f *~ rm -f test-eapol rm -f test-https rm -f test-json rm -f test-tls rm -f test_x509v3_nist.out.* rm -f test_x509v3_nist2.out.* - --include $(OBJS:%.o=%.d) From patchwork Fri Sep 18 09:24:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366738 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=Fdh3SAdZ; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt84F11FGz9sR4 for ; Fri, 18 Sep 2020 19:41:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7xe5lSbIo/C6oboJxo5kWw9hHMJQaxEOqzlCnnvQ9/Q=; b=Fdh3SAdZVWXxu4AOU2ehdpq1W cxOyfy+UBGA+X6xXk5w5Lk/4JZnM8eme7FrJfBJG6SpBzdg53JBIX1UHlyJi3XpfpPcXkBWJF1s47 +H32GbJon9f+bwbm7qQAxwK3CiLfoMemd7CocSIgq6F1ARoWOqOKkVaMtvbmE8ZM+O+MV6GgMiBVo 0rWWGC3oc/oTCZHDWMlmsp7Yevlkf2arWv+LJvrhrb4h9SvZg7pLRc22AqKWjMcrClu9G/pndzom/ qbhZV9D+mx8ddBkQI9ZNaYrmx5fT/9A76WjiBDbEc1htD7emZBkRjJB22srNcsyF49D+l/c7XR3CW 5rpFrNO6Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCt2-0004yE-97; Fri, 18 Sep 2020 09:41:00 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCsy-0004x2-Ou for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:40:58 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdk-0069hJ-7c; Fri, 18 Sep 2020 11:25:12 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 13/15] build: put archive files into build/ folder too Date: Fri, 18 Sep 2020 11:24:59 +0200 Message-Id: <1600421070-I3fe9bfe2ba31714753ed6f173f196c1483b2a4a9@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_054057_049016_EDCADF40 X-CRM114-Status: GOOD ( 10.76 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg This is something I hadn't previously done, but there are cases where it's needed, e.g. building 'wlantest' and then one of the tests/fuzzing/*/ projects, they use a different configuration (fuzzing vs. not fuzzing). Perhaps more importantly, this gets rid of the last thing that was dumped into the source directories, apart from the binaries themselves. Note that due to the use of thin archives, this required building with absolute paths. Signed-off-by: Johannes Berg --- eap_example/Makefile | 11 +----- radius_example/Makefile | 12 ++---- src/ap/Makefile | 4 +- src/build.rules | 14 ++++++- src/common/Makefile | 4 +- src/crypto/Makefile | 4 +- src/eap_common/Makefile | 4 +- src/eap_peer/Makefile | 4 +- src/eap_server/Makefile | 4 +- src/eapol_auth/Makefile | 4 +- src/eapol_supp/Makefile | 4 +- src/l2_packet/Makefile | 4 +- src/p2p/Makefile | 4 +- src/radius/Makefile | 4 +- src/rsn_supp/Makefile | 4 +- src/tls/Makefile | 4 +- src/utils/Makefile | 4 +- src/wps/Makefile | 4 +- tests/Makefile | 50 ++++-------------------- tests/fuzzing/ap-mgmt/Makefile | 3 ++ tests/fuzzing/asn1/Makefile | 3 ++ tests/fuzzing/dpp-uri/Makefile | 3 ++ tests/fuzzing/eap-aka-peer/Makefile | 3 ++ tests/fuzzing/eap-mschapv2-peer/Makefile | 3 ++ tests/fuzzing/eap-sim-peer/Makefile | 3 ++ tests/fuzzing/eapol-key-auth/Makefile | 3 ++ tests/fuzzing/eapol-key-supp/Makefile | 3 ++ tests/fuzzing/eapol-supp/Makefile | 3 ++ tests/fuzzing/json/Makefile | 3 ++ tests/fuzzing/p2p/Makefile | 3 ++ tests/fuzzing/rules.include | 46 +--------------------- tests/fuzzing/sae/Makefile | 3 ++ tests/fuzzing/tls-client/Makefile | 6 +++ tests/fuzzing/tls-server/Makefile | 6 +++ tests/fuzzing/wnm/Makefile | 6 +++ tests/fuzzing/x509/Makefile | 6 +++ wlantest/Makefile | 9 +---- 37 files changed, 118 insertions(+), 144 deletions(-) diff --git a/eap_example/Makefile b/eap_example/Makefile index 7660b8ddd036..691466f03c9a 100644 --- a/eap_example/Makefile +++ b/eap_example/Makefile @@ -90,15 +90,8 @@ OBJS_ex = eap_example.o eap_example_peer.o eap_example_server.o _OBJS_VAR := OBJS_ex include ../src/objs.mk - -../src/utils/libutils.a: - $(MAKE) -C ../src/utils - -../src/crypto/libcrypto.a: - $(MAKE) -C ../src/crypto - -../src/tls/libtls.a: - $(MAKE) -C ../src/tls +_OBJS_VAR := EAP_LIBS +include ../src/objs.mk ifneq ($(CONFIG_SOLIB), yes) diff --git a/radius_example/Makefile b/radius_example/Makefile index f0e4e535aa3c..d58a82c340c6 100644 --- a/radius_example/Makefile +++ b/radius_example/Makefile @@ -11,15 +11,6 @@ LIBS += ../src/crypto/libcrypto.a LIBS += ../src/utils/libutils.a LLIBS = -lrt -../src/utils/libutils.a: - $(MAKE) -C ../src/utils - -../src/crypto/libcrypto.a: - $(MAKE) -C ../src/crypto - -../src/radius/libradius.a: - $(MAKE) -C ../src/radius - #CLAGS += -DCONFIG_IPV6 OBJS_ex = radius_example.o @@ -27,6 +18,9 @@ OBJS_ex = radius_example.o _OBJS_VAR := OBJS_ex include ../src/objs.mk +_OBJS_VAR := LIBS +include ../src/objs.mk + radius_example: $(OBJS_ex) $(LIBS) $(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS) $(LLIBS) diff --git a/src/ap/Makefile b/src/ap/Makefile index 425b123405a4..09d54924cb7e 100644 --- a/src/ap/Makefile +++ b/src/ap/Makefile @@ -1,4 +1,4 @@ -ALL=libap.a +ALL=$(OUT)libap.a include ../lib.rules @@ -67,5 +67,5 @@ LIB_OBJS= \ _OBJS_VAR := LIB_OBJS include ../objs.mk -libap.a: $(LIB_OBJS) +$(OUT)libap.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/build.rules b/src/build.rules index 2437a05eee9d..1b830490cfe0 100644 --- a/src/build.rules +++ b/src/build.rules @@ -8,9 +8,15 @@ all: _all ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST))) ROOTDIR := $(dir $(ROOTDIR:%../src/=%))../ BUILDDIR := $(ROOTDIR)build -_PROJ := $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) +BUILDDIR := $(abspath $(BUILDDIR)) ABSROOT := $(abspath $(ROOTDIR)) +ifeq ($(origin OUT),command line) +_PROJ := $(OUT:%/=%) +_PROJ := $(_PROJ:$(BUILDDIR)/%=%) +else +_PROJ := $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) _PROJ := $(_PROJ:$(ABSROOT)/%=%) +endif ifndef CC CC=gcc @@ -87,9 +93,13 @@ $(BUILDDIR)/$(PROJ)/wpa_supplicant/%.o: $(ROOTDIR)wpa_supplicant/%.c $(CONFIG_FI $(Q)$(CC) -c -o $@ $(CFLAGS) $< @$(E) " CC " $< +# libraries - they know how to build themselves +$(BUILDDIR)/$(PROJ)/%.a: $(CONFIG_FILE) + $(Q)mkdir -p $(BUILDDIR)/$(PROJ)/$(dir $(@:$(BUILDDIR)/$(PROJ)/%=%)) + $(Q)$(MAKE) -C $(ROOTDIR)$(dir $(@:$(BUILDDIR)/$(PROJ)/%=%)) OUT=$(abspath $(dir $@))/ + BUILDOBJ = $(patsubst %,$(BUILDDIR)/$(PROJ)/%,$(patsubst $(ROOTDIR)%,%,$(1))) .PHONY: common-clean common-clean: - $(Q)$(MAKE) -C $(ROOTDIR)/src clean $(Q)rm -rf $(ALL) $(BUILDDIR)/$(PROJ) diff --git a/src/common/Makefile b/src/common/Makefile index 4cd48d9fd8ce..19573ebd30e0 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -1,4 +1,4 @@ -ALL=libcommon.a +ALL=$(OUT)libcommon.a include ../lib.rules @@ -21,5 +21,5 @@ LIB_OBJS= \ _OBJS_VAR := LIB_OBJS include ../objs.mk -libcommon.a: $(LIB_OBJS) +$(OUT)libcommon.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/crypto/Makefile b/src/crypto/Makefile index 3af5406ea381..b8accd81c583 100644 --- a/src/crypto/Makefile +++ b/src/crypto/Makefile @@ -1,4 +1,4 @@ -ALL=libcrypto.a +ALL=$(OUT)libcrypto.a include ../lib.rules @@ -68,5 +68,5 @@ endif _OBJS_VAR := LIB_OBJS include ../objs.mk -libcrypto.a: $(LIB_OBJS) +$(OUT)libcrypto.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/eap_common/Makefile b/src/eap_common/Makefile index 49fbbde02691..b50a4b731412 100644 --- a/src/eap_common/Makefile +++ b/src/eap_common/Makefile @@ -1,4 +1,4 @@ -ALL=libeap_common.a +ALL=$(OUT)libeap_common.a include ../lib.rules @@ -25,5 +25,5 @@ LIB_OBJS= \ _OBJS_VAR := LIB_OBJS include ../objs.mk -libeap_common.a: $(LIB_OBJS) +$(OUT)libeap_common.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/eap_peer/Makefile b/src/eap_peer/Makefile index 36439b788379..d7a0372ad761 100644 --- a/src/eap_peer/Makefile +++ b/src/eap_peer/Makefile @@ -1,4 +1,4 @@ -ALL=libeap_peer.a +ALL=$(OUT)libeap_peer.a include ../lib.rules @@ -17,5 +17,5 @@ LIB_OBJS= \ _OBJS_VAR := LIB_OBJS include ../objs.mk -libeap_peer.a: $(LIB_OBJS) +$(OUT)libeap_peer.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/eap_server/Makefile b/src/eap_server/Makefile index 946ac195e251..b4261ec39263 100644 --- a/src/eap_server/Makefile +++ b/src/eap_server/Makefile @@ -1,4 +1,4 @@ -ALL=libeap_server.a +ALL=$(OUT)libeap_server.a include ../lib.rules @@ -15,5 +15,5 @@ LIB_OBJS= \ _OBJS_VAR := LIB_OBJS include ../objs.mk -libeap_server.a: $(LIB_OBJS) +$(OUT)libeap_server.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/eapol_auth/Makefile b/src/eapol_auth/Makefile index 777979ce7c4f..aa597eda4499 100644 --- a/src/eapol_auth/Makefile +++ b/src/eapol_auth/Makefile @@ -1,4 +1,4 @@ -ALL=libeapol_auth.a +ALL=$(OUT)libeapol_auth.a include ../lib.rules @@ -10,5 +10,5 @@ LIB_OBJS = eapol_auth_sm.o eapol_auth_dump.o _OBJS_VAR := LIB_OBJS include ../objs.mk -libeapol_auth.a: $(LIB_OBJS) +$(OUT)libeapol_auth.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/eapol_supp/Makefile b/src/eapol_supp/Makefile index 265e5f25c37c..453e49e6bf4b 100644 --- a/src/eapol_supp/Makefile +++ b/src/eapol_supp/Makefile @@ -1,4 +1,4 @@ -ALL=libeapol_supp.a +ALL=$(OUT)libeapol_supp.a include ../lib.rules @@ -12,5 +12,5 @@ LIB_OBJS = eapol_supp_sm.o _OBJS_VAR := LIB_OBJS include ../objs.mk -libeapol_supp.a: $(LIB_OBJS) +$(OUT)libeapol_supp.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/l2_packet/Makefile b/src/l2_packet/Makefile index ab8c86ecc43d..870d652bc63e 100644 --- a/src/l2_packet/Makefile +++ b/src/l2_packet/Makefile @@ -1,4 +1,4 @@ -ALL=libl2_packet.a +ALL=$(OUT)libl2_packet.a include ../lib.rules @@ -10,5 +10,5 @@ LIB_OBJS = l2_packet_linux.o _OBJS_VAR := LIB_OBJS include ../objs.mk -libl2_packet.a: $(LIB_OBJS) +$(OUT)libl2_packet.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/p2p/Makefile b/src/p2p/Makefile index c6b406661182..00e1908f0bc1 100644 --- a/src/p2p/Makefile +++ b/src/p2p/Makefile @@ -1,4 +1,4 @@ -ALL=libp2p.a +ALL=$(OUT)libp2p.a include ../lib.rules @@ -23,5 +23,5 @@ LIB_OBJS= \ _OBJS_VAR := LIB_OBJS include ../objs.mk -libp2p.a: $(LIB_OBJS) +$(OUT)libp2p.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/radius/Makefile b/src/radius/Makefile index 83096f0c7fbb..5cefa390fab9 100644 --- a/src/radius/Makefile +++ b/src/radius/Makefile @@ -1,4 +1,4 @@ -ALL=libradius.a +ALL=$(OUT)libradius.a include ../lib.rules @@ -16,5 +16,5 @@ LIB_OBJS= \ _OBJS_VAR := LIB_OBJS include ../objs.mk -libradius.a: $(LIB_OBJS) +$(OUT)libradius.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/rsn_supp/Makefile b/src/rsn_supp/Makefile index 43288e3fd688..f5f5cad17dfb 100644 --- a/src/rsn_supp/Makefile +++ b/src/rsn_supp/Makefile @@ -1,4 +1,4 @@ -ALL=librsn_supp.a +ALL=$(OUT)librsn_supp.a include ../lib.rules @@ -21,5 +21,5 @@ LIB_OBJS= \ _OBJS_VAR := LIB_OBJS include ../objs.mk -librsn_supp.a: $(LIB_OBJS) +$(OUT)librsn_supp.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/tls/Makefile b/src/tls/Makefile index 3fac5ee8c6cd..5483345e5331 100644 --- a/src/tls/Makefile +++ b/src/tls/Makefile @@ -1,4 +1,4 @@ -ALL=libtls.a +ALL=$(OUT)libtls.a include ../lib.rules @@ -33,5 +33,5 @@ LIB_OBJS= \ _OBJS_VAR := LIB_OBJS include ../objs.mk -libtls.a: $(LIB_OBJS) +$(OUT)libtls.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/utils/Makefile b/src/utils/Makefile index 7be05101fc30..91aba38466ff 100644 --- a/src/utils/Makefile +++ b/src/utils/Makefile @@ -1,4 +1,4 @@ -ALL=libutils.a +ALL=$(OUT)libutils.a include ../lib.rules @@ -36,5 +36,5 @@ LIB_OBJS += edit.o _OBJS_VAR := LIB_OBJS include ../objs.mk -libutils.a: $(LIB_OBJS) +$(OUT)libutils.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/src/wps/Makefile b/src/wps/Makefile index ed928ef41e94..79106952783d 100644 --- a/src/wps/Makefile +++ b/src/wps/Makefile @@ -1,4 +1,4 @@ -ALL=libwps.a +ALL=$(OUT)libwps.a include ../lib.rules @@ -35,5 +35,5 @@ LIB_OBJS= \ _OBJS_VAR := LIB_OBJS include ../objs.mk -libwps.a: $(LIB_OBJS) +$(OUT)libwps.a: $(LIB_OBJS) $(AR) crT $@ $? diff --git a/tests/Makefile b/tests/Makefile index c8ba3f21c0b8..72fb8ee4f501 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -42,55 +42,19 @@ DLIBS = ../src/crypto/libcrypto.a \ ../src/rsn_supp/librsn_supp.a \ ../src/tls/libtls.a +_OBJS_VAR := LLIBS +include ../src/objs.mk +_OBJS_VAR := SLIBS +include ../src/objs.mk +_OBJS_VAR := DLIBS +include ../src/objs.mk + LIBS = $(SLIBS) $(DLIBS) LLIBS = -Wl,--start-group $(DLIBS) -Wl,--end-group $(SLIBS) # glibc < 2.17 needs -lrt for clock_gettime() LLIBS += -lrt -../src/utils/libutils.a: - $(MAKE) -C ../src/utils - -../src/common/libcommon.a: - $(MAKE) -C ../src/common - -../src/crypto/libcrypto.a: - $(MAKE) -C ../src/crypto - -../src/tls/libtls.a: - $(MAKE) -C ../src/tls - -../src/ap/libap.a: - $(MAKE) -C ../src/ap - -../src/radius/libradius.a: - $(MAKE) -C ../src/radius - -../src/l2_packet/libl2_packet.a: - $(MAKE) -C ../src/l2_packet - -../src/wps/libwps.a: - $(MAKE) -C ../src/wps - -../src/eap_peer/libeap_peer.a: - $(MAKE) -C ../src/eap_peer - -../src/eap_server/libeap_server.a: - $(MAKE) -C ../src/eap_server - -../src/eap_common/libeap_common.a: - $(MAKE) -C ../src/eap_common - -../src/eapol_auth/libeapol_auth.a: - $(MAKE) -C ../src/eapol_auth - -../src/eapol_supp/libeapol_supp.a: - $(MAKE) -C ../src/eapol_supp - -../src/rsn_supp/librsn_supp.a: - $(MAKE) -C ../src/rsn_supp - - test-aes: $(call BUILDOBJ,test-aes.o) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS) diff --git a/tests/fuzzing/ap-mgmt/Makefile b/tests/fuzzing/ap-mgmt/Makefile index 159c7c3f8106..16998569e377 100644 --- a/tests/fuzzing/ap-mgmt/Makefile +++ b/tests/fuzzing/ap-mgmt/Makefile @@ -31,6 +31,9 @@ OBJS += ap-mgmt.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + ap-mgmt: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) diff --git a/tests/fuzzing/asn1/Makefile b/tests/fuzzing/asn1/Makefile index fb8fbed684ef..274641a406bb 100644 --- a/tests/fuzzing/asn1/Makefile +++ b/tests/fuzzing/asn1/Makefile @@ -12,6 +12,9 @@ OBJS += asn1.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + asn1: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) diff --git a/tests/fuzzing/dpp-uri/Makefile b/tests/fuzzing/dpp-uri/Makefile index aca8f02ad434..1c1bab631a04 100644 --- a/tests/fuzzing/dpp-uri/Makefile +++ b/tests/fuzzing/dpp-uri/Makefile @@ -33,6 +33,9 @@ OBJS += dpp-uri.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + dpp-uri: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ -lcrypto diff --git a/tests/fuzzing/eap-aka-peer/Makefile b/tests/fuzzing/eap-aka-peer/Makefile index bd960caa763e..c964f186d146 100644 --- a/tests/fuzzing/eap-aka-peer/Makefile +++ b/tests/fuzzing/eap-aka-peer/Makefile @@ -15,6 +15,9 @@ OBJS += eap-aka-peer.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + eap-aka-peer: $(OBJS) $(LIBS) $(Q)$(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) @$(E) " LD " $@ diff --git a/tests/fuzzing/eap-mschapv2-peer/Makefile b/tests/fuzzing/eap-mschapv2-peer/Makefile index 953855c85ed4..7290e90c62b7 100644 --- a/tests/fuzzing/eap-mschapv2-peer/Makefile +++ b/tests/fuzzing/eap-mschapv2-peer/Makefile @@ -14,6 +14,9 @@ OBJS += eap-mschapv2-peer.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + eap-mschapv2-peer: $(OBJS) $(LIBS) $(Q)$(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) @$(E) " LD " $@ diff --git a/tests/fuzzing/eap-sim-peer/Makefile b/tests/fuzzing/eap-sim-peer/Makefile index 9292ccb79b2d..9e728e4f476b 100644 --- a/tests/fuzzing/eap-sim-peer/Makefile +++ b/tests/fuzzing/eap-sim-peer/Makefile @@ -15,6 +15,9 @@ OBJS += eap-sim-peer.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + eap-sim-peer: $(OBJS) $(LIBS) $(Q)$(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) @$(E) " LD " $@ diff --git a/tests/fuzzing/eapol-key-auth/Makefile b/tests/fuzzing/eapol-key-auth/Makefile index bdc731ff4931..bd15b91f2394 100644 --- a/tests/fuzzing/eapol-key-auth/Makefile +++ b/tests/fuzzing/eapol-key-auth/Makefile @@ -24,6 +24,9 @@ OBJS += eapol-key-auth.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + eapol-key-auth: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LIBS) -Wl,--end-group diff --git a/tests/fuzzing/eapol-key-supp/Makefile b/tests/fuzzing/eapol-key-supp/Makefile index 29e419b7cd03..949e2efe991c 100644 --- a/tests/fuzzing/eapol-key-supp/Makefile +++ b/tests/fuzzing/eapol-key-supp/Makefile @@ -20,6 +20,9 @@ OBJS += eapol-key-supp.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + eapol-key-supp: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LIBS) -Wl,--end-group diff --git a/tests/fuzzing/eapol-supp/Makefile b/tests/fuzzing/eapol-supp/Makefile index 27e631148df1..ea32346b2df1 100644 --- a/tests/fuzzing/eapol-supp/Makefile +++ b/tests/fuzzing/eapol-supp/Makefile @@ -18,6 +18,9 @@ OBJS += eapol-supp.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + eapol-supp: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LIBS) -Wl,--end-group diff --git a/tests/fuzzing/json/Makefile b/tests/fuzzing/json/Makefile index 8de19293e29b..9dd51a5f22ef 100644 --- a/tests/fuzzing/json/Makefile +++ b/tests/fuzzing/json/Makefile @@ -13,6 +13,9 @@ OBJS += json.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + json: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) diff --git a/tests/fuzzing/p2p/Makefile b/tests/fuzzing/p2p/Makefile index ef31a7505e28..acac9d38f1b1 100644 --- a/tests/fuzzing/p2p/Makefile +++ b/tests/fuzzing/p2p/Makefile @@ -13,6 +13,9 @@ OBJS += p2p.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + p2p: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) diff --git a/tests/fuzzing/rules.include b/tests/fuzzing/rules.include index b2e8a81ea878..e2cf577af811 100644 --- a/tests/fuzzing/rules.include +++ b/tests/fuzzing/rules.include @@ -27,47 +27,5 @@ SRC=../../../src CFLAGS += -I$(SRC) -I$(SRC)/utils -I$(WPAS_SRC) OBJS += ../fuzzer-common.o -$(SRC)/ap/libap.a: - $(MAKE) -C $(SRC)/ap TEST_FUZZ=y - -$(SRC)/common/libcommon.a: - $(MAKE) -C $(SRC)/common - -$(SRC)/crypto/libcrypto.a: - $(MAKE) -C $(SRC)/crypto TEST_FUZZ=y - -$(SRC)/eapol_auth/libeapol_auth.a: - $(MAKE) -C $(SRC)/eapol_auth - -$(SRC)/eapol_supp/libeapol_supp.a: - $(MAKE) -C $(SRC)/eapol_supp - -$(SRC)/eap_common/libeap_common.a: - $(MAKE) -C $(SRC)/eap_common - -$(SRC)/eap_peer/libeap_peer.a: - $(MAKE) -C $(SRC)/eap_peer - -$(SRC)/eap_server/libeap_server.a: - $(MAKE) -C $(SRC)/eap_server - -$(SRC)/l2_packet/libl2_packet.a: - $(MAKE) -C $(SRC)/l2_packet - -$(SRC)/p2p/libp2p.a: - $(MAKE) -C $(SRC)/p2p - -$(SRC)/radius/libradius.a: - $(MAKE) -C $(SRC)/radius - -$(SRC)/rsn_supp/librsn_supp.a: - $(MAKE) -C $(SRC)/rsn_supp TEST_FUZZ=y - -$(SRC)/tls/libtls.a: - $(MAKE) -C $(SRC)/tls TEST_FUZZ=y - -$(SRC)/utils/libutils.a: - $(MAKE) -C $(SRC)/utils TEST_FUZZ=y - -$(SRC)/wps/libwps.a: - $(MAKE) -C $(SRC)/wps +# for the lib builds +export TEST_FUZZ=y diff --git a/tests/fuzzing/sae/Makefile b/tests/fuzzing/sae/Makefile index ee7257afeaa8..ee4b0c0b6a22 100644 --- a/tests/fuzzing/sae/Makefile +++ b/tests/fuzzing/sae/Makefile @@ -18,6 +18,9 @@ OBJS += sae.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + sae: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ -lcrypto diff --git a/tests/fuzzing/tls-client/Makefile b/tests/fuzzing/tls-client/Makefile index 7d5e8d536fe7..84cfa0431566 100644 --- a/tests/fuzzing/tls-client/Makefile +++ b/tests/fuzzing/tls-client/Makefile @@ -19,6 +19,12 @@ OBJS += tls-client.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + +_OBJS_VAR := ELIBS +include ../../../src/objs.mk + tls-client: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) diff --git a/tests/fuzzing/tls-server/Makefile b/tests/fuzzing/tls-server/Makefile index 45304328e4b2..8e2400310397 100644 --- a/tests/fuzzing/tls-server/Makefile +++ b/tests/fuzzing/tls-server/Makefile @@ -19,6 +19,12 @@ OBJS += tls-server.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + +_OBJS_VAR := ELIBS +include ../../../src/objs.mk + tls-server: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) diff --git a/tests/fuzzing/wnm/Makefile b/tests/fuzzing/wnm/Makefile index f27dd341b333..73eab538765c 100644 --- a/tests/fuzzing/wnm/Makefile +++ b/tests/fuzzing/wnm/Makefile @@ -47,6 +47,12 @@ OBJS += wnm.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + +_OBJS_VAR := ELIBS +include ../../../src/objs.mk + wnm: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) diff --git a/tests/fuzzing/x509/Makefile b/tests/fuzzing/x509/Makefile index 7fff15a3a94a..306473c3dba3 100644 --- a/tests/fuzzing/x509/Makefile +++ b/tests/fuzzing/x509/Makefile @@ -14,6 +14,12 @@ OBJS += x509.o _OBJS_VAR := OBJS include ../../../src/objs.mk +_OBJS_VAR := LIBS +include ../../../src/objs.mk + +_OBJS_VAR := ELIBS +include ../../../src/objs.mk + x509: $(OBJS) $(LIBS) $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) diff --git a/wlantest/Makefile b/wlantest/Makefile index 410c309d4745..602375112f2d 100644 --- a/wlantest/Makefile +++ b/wlantest/Makefile @@ -62,13 +62,6 @@ TOBJS += bip.o TOBJS += gcmp.o -../src/utils/libutils.a: - $(MAKE) -C ../src/utils - -../src/crypto/libcrypto.a: - $(MAKE) -C ../src/crypto - - OBJS_cli = wlantest_cli.o _OBJS_VAR := OBJS @@ -77,6 +70,8 @@ _OBJS_VAR := TOBJS include ../src/objs.mk _OBJS_VAR := OBJS_cli include ../src/objs.mk +_OBJS_VAR := OWN_LIBS +include ../src/objs.mk wlantest: $(OBJS) $(OWN_LIBS) $(LDO) $(LDFLAGS) -o wlantest $(OBJS) $(OWN_LIBS) $(LIBS) From patchwork Fri Sep 18 09:25:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366736 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=EWthJvsD; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt84B5yZNz9sR4 for ; Fri, 18 Sep 2020 19:41:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MM3wSJboWwxo9QvdAA6qLMXpOHsLA1b8tBY6uXZRRMo=; b=EWthJvsDH0pofhpM/BHCn6wWb urFb7fOgwlBD1oUk63OxPgP0zRtVSonOGCkfjQNqhrvDdqopcpc/ihwJSSFCajz3yaf3vB1Cf7US3 u/e5/2SQem9T5GjnOMlnhXu09tR0zJHBe6+f08xrm1nS+X1qS5g2yEfot44Il1V1h1yy1MM5tVEHw gQP3QqQcOlL8WMMOYGXAjKe2udTS1oMgEEz2cqrz5pf43KH4QMEKDMDf33Yx6faAIQ6yA4zvowKDa ppLZdo1IjphwxLuXkLfXVukacv7ZxLlZ1wqBKGyqzCN7YGqnIvTZe9oyWMUdaIjD6ftjtRcYakveH 0Z3wzt7oA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCtA-00051I-Dj; Fri, 18 Sep 2020 09:41:08 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCt6-0004zW-D1 for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:41:05 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdk-0069hJ-Kw; Fri, 18 Sep 2020 11:25:12 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 14/15] build: allow overriding BUILDDIR from command line Date: Fri, 18 Sep 2020 11:25:00 +0200 Message-Id: <1600421070-I3dda8359cfcdef249aebe01cbbc7caf429925d1d@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_054104_470204_B34B3E07 X-CRM114-Status: GOOD ( 12.18 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg You can now specify BUILDDIR= on the make command line, e.g. in order to put that into a tmpfs or similar. Signed-off-by: Johannes Berg --- src/build.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build.rules b/src/build.rules index 1b830490cfe0..ec1cd66ce2a6 100644 --- a/src/build.rules +++ b/src/build.rules @@ -7,8 +7,8 @@ all: _all # setup some variables ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST))) ROOTDIR := $(dir $(ROOTDIR:%../src/=%))../ -BUILDDIR := $(ROOTDIR)build -BUILDDIR := $(abspath $(BUILDDIR)) +BUILDDIR ?= $(abspath $(ROOTDIR)build) +BUILDDIR := $(BUILDDIR:%/=%) ABSROOT := $(abspath $(ROOTDIR)) ifeq ($(origin OUT),command line) _PROJ := $(OUT:%/=%) From patchwork Fri Sep 18 09:25:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1366737 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=YKc/gt0q; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bt84F218pz9sT5 for ; Fri, 18 Sep 2020 19:41:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VnbOKzRPhBBI/R00izISm3+RtjfoxcbsnSYUSBTz1jw=; b=YKc/gt0qbwj7wJ8oENPEfR9fk vX/1jUHaFAoNjLQLDIVUpJkZ24NQczaoSaSiENWoK049mBFKeOZVQPbPU67YsZU7uCs7J3SUyD5Q+ acIwMwiNH2xBai3qqnv01sJlXwrTXpZphIYoIxPyLQfJ5QLHWyU6G2rhdyvgjpc8sgy85FrmRAaHq lBH8f8f3Ez8P+ivBT8sHzdFk9cHVMngMJPmXBAF/NHTxmrTVvRYAGD3karOzISRUUGegmT5QGoWg4 NQZt0NaO0ZhT4N5E42vlmybZTZNRjvajCdyvzN0s2vL+vCW9573oJ21wFG6R4NwnEFwm/y1q0i1U2 Hzh4Qh/rg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCt6-0004zq-QA; Fri, 18 Sep 2020 09:41:04 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJCt3-0004ye-Sv for hostap@lists.infradead.org; Fri, 18 Sep 2020 09:41:02 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kJCdk-0069hJ-Tz; Fri, 18 Sep 2020 11:25:13 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v6 15/15] gitignore: add various things Date: Fri, 18 Sep 2020 11:25:01 +0200 Message-Id: <1600421070-Idd2216270ffb65fc2de208a8f08ef012e15cd9e8@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200918092501.14821-1-johannes@sipsolutions.net> References: <20200918092501.14821-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_054101_984757_46D4446F X-CRM114-Status: GOOD ( 13.99 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Signed-off-by: Johannes Berg --- tests/fuzzing/ap-mgmt/.gitignore | 1 + tests/fuzzing/asn1/.gitignore | 1 + tests/fuzzing/dpp-uri/.gitignore | 1 + tests/fuzzing/eap-aka-peer/.gitignore | 1 + tests/fuzzing/eap-mschapv2-peer/.gitignore | 1 + tests/fuzzing/eap-sim-peer/.gitignore | 1 + tests/fuzzing/eapol-key-auth/.gitignore | 1 + tests/fuzzing/eapol-key-supp/.gitignore | 1 + tests/fuzzing/eapol-supp/.gitignore | 1 + tests/fuzzing/json/.gitignore | 1 + tests/fuzzing/p2p/.gitignore | 1 + tests/fuzzing/sae/.gitignore | 1 + tests/fuzzing/tls-client/.gitignore | 1 + tests/fuzzing/tls-server/.gitignore | 1 + tests/fuzzing/wnm/.gitignore | 1 + tests/fuzzing/x509/.gitignore | 1 + tests/p2p-fuzzer/.gitignore | 1 + wpa_supplicant/doc/docbook/.gitignore | 1 + wpa_supplicant/wpa_gui-qt4/icons/.gitignore | 2 ++ 19 files changed, 20 insertions(+) create mode 100644 tests/fuzzing/ap-mgmt/.gitignore create mode 100644 tests/fuzzing/asn1/.gitignore create mode 100644 tests/fuzzing/dpp-uri/.gitignore create mode 100644 tests/fuzzing/eap-aka-peer/.gitignore create mode 100644 tests/fuzzing/eap-mschapv2-peer/.gitignore create mode 100644 tests/fuzzing/eap-sim-peer/.gitignore create mode 100644 tests/fuzzing/eapol-key-auth/.gitignore create mode 100644 tests/fuzzing/eapol-key-supp/.gitignore create mode 100644 tests/fuzzing/eapol-supp/.gitignore create mode 100644 tests/fuzzing/json/.gitignore create mode 100644 tests/fuzzing/p2p/.gitignore create mode 100644 tests/fuzzing/sae/.gitignore create mode 100644 tests/fuzzing/tls-client/.gitignore create mode 100644 tests/fuzzing/tls-server/.gitignore create mode 100644 tests/fuzzing/wnm/.gitignore create mode 100644 tests/fuzzing/x509/.gitignore create mode 100644 tests/p2p-fuzzer/.gitignore create mode 100644 wpa_supplicant/wpa_gui-qt4/icons/.gitignore diff --git a/tests/fuzzing/ap-mgmt/.gitignore b/tests/fuzzing/ap-mgmt/.gitignore new file mode 100644 index 000000000000..8d79d3c8062d --- /dev/null +++ b/tests/fuzzing/ap-mgmt/.gitignore @@ -0,0 +1 @@ +ap-mgmt diff --git a/tests/fuzzing/asn1/.gitignore b/tests/fuzzing/asn1/.gitignore new file mode 100644 index 000000000000..69d0e5c726be --- /dev/null +++ b/tests/fuzzing/asn1/.gitignore @@ -0,0 +1 @@ +asn1 diff --git a/tests/fuzzing/dpp-uri/.gitignore b/tests/fuzzing/dpp-uri/.gitignore new file mode 100644 index 000000000000..6dd276499bef --- /dev/null +++ b/tests/fuzzing/dpp-uri/.gitignore @@ -0,0 +1 @@ +dpp-uri diff --git a/tests/fuzzing/eap-aka-peer/.gitignore b/tests/fuzzing/eap-aka-peer/.gitignore new file mode 100644 index 000000000000..d11f75fe3bd9 --- /dev/null +++ b/tests/fuzzing/eap-aka-peer/.gitignore @@ -0,0 +1 @@ +eap-aka-peer diff --git a/tests/fuzzing/eap-mschapv2-peer/.gitignore b/tests/fuzzing/eap-mschapv2-peer/.gitignore new file mode 100644 index 000000000000..3368b213cf0c --- /dev/null +++ b/tests/fuzzing/eap-mschapv2-peer/.gitignore @@ -0,0 +1 @@ +eap-mschapv2-peer diff --git a/tests/fuzzing/eap-sim-peer/.gitignore b/tests/fuzzing/eap-sim-peer/.gitignore new file mode 100644 index 000000000000..ea94e26e2eb8 --- /dev/null +++ b/tests/fuzzing/eap-sim-peer/.gitignore @@ -0,0 +1 @@ +eap-sim-peer diff --git a/tests/fuzzing/eapol-key-auth/.gitignore b/tests/fuzzing/eapol-key-auth/.gitignore new file mode 100644 index 000000000000..f693f2cd05c0 --- /dev/null +++ b/tests/fuzzing/eapol-key-auth/.gitignore @@ -0,0 +1 @@ +eapol-key-auth diff --git a/tests/fuzzing/eapol-key-supp/.gitignore b/tests/fuzzing/eapol-key-supp/.gitignore new file mode 100644 index 000000000000..dcbbbdb02651 --- /dev/null +++ b/tests/fuzzing/eapol-key-supp/.gitignore @@ -0,0 +1 @@ +eapol-key-supp diff --git a/tests/fuzzing/eapol-supp/.gitignore b/tests/fuzzing/eapol-supp/.gitignore new file mode 100644 index 000000000000..e370093d82a3 --- /dev/null +++ b/tests/fuzzing/eapol-supp/.gitignore @@ -0,0 +1 @@ +eapol-supp diff --git a/tests/fuzzing/json/.gitignore b/tests/fuzzing/json/.gitignore new file mode 100644 index 000000000000..3c840093b758 --- /dev/null +++ b/tests/fuzzing/json/.gitignore @@ -0,0 +1 @@ +json diff --git a/tests/fuzzing/p2p/.gitignore b/tests/fuzzing/p2p/.gitignore new file mode 100644 index 000000000000..8bea15da48ef --- /dev/null +++ b/tests/fuzzing/p2p/.gitignore @@ -0,0 +1 @@ +p2p diff --git a/tests/fuzzing/sae/.gitignore b/tests/fuzzing/sae/.gitignore new file mode 100644 index 000000000000..1bb959165a21 --- /dev/null +++ b/tests/fuzzing/sae/.gitignore @@ -0,0 +1 @@ +sae diff --git a/tests/fuzzing/tls-client/.gitignore b/tests/fuzzing/tls-client/.gitignore new file mode 100644 index 000000000000..b41f93681f4d --- /dev/null +++ b/tests/fuzzing/tls-client/.gitignore @@ -0,0 +1 @@ +tls-client diff --git a/tests/fuzzing/tls-server/.gitignore b/tests/fuzzing/tls-server/.gitignore new file mode 100644 index 000000000000..341256f57f3f --- /dev/null +++ b/tests/fuzzing/tls-server/.gitignore @@ -0,0 +1 @@ +tls-server diff --git a/tests/fuzzing/wnm/.gitignore b/tests/fuzzing/wnm/.gitignore new file mode 100644 index 000000000000..0e1d383dc444 --- /dev/null +++ b/tests/fuzzing/wnm/.gitignore @@ -0,0 +1 @@ +wnm diff --git a/tests/fuzzing/x509/.gitignore b/tests/fuzzing/x509/.gitignore new file mode 100644 index 000000000000..490a5d71f3f2 --- /dev/null +++ b/tests/fuzzing/x509/.gitignore @@ -0,0 +1 @@ +x509 diff --git a/tests/p2p-fuzzer/.gitignore b/tests/p2p-fuzzer/.gitignore new file mode 100644 index 000000000000..ee9420df0753 --- /dev/null +++ b/tests/p2p-fuzzer/.gitignore @@ -0,0 +1 @@ +p2p-fuzzer diff --git a/wpa_supplicant/doc/docbook/.gitignore b/wpa_supplicant/doc/docbook/.gitignore index 8c3945c526b5..dac35c5a5edd 100644 --- a/wpa_supplicant/doc/docbook/.gitignore +++ b/wpa_supplicant/doc/docbook/.gitignore @@ -1,5 +1,6 @@ manpage.links manpage.refs +manpage.log *.8 *.5 *.html diff --git a/wpa_supplicant/wpa_gui-qt4/icons/.gitignore b/wpa_supplicant/wpa_gui-qt4/icons/.gitignore new file mode 100644 index 000000000000..8d772cc93884 --- /dev/null +++ b/wpa_supplicant/wpa_gui-qt4/icons/.gitignore @@ -0,0 +1,2 @@ +hicolor +pixmaps