From patchwork Wed Sep 9 22:03: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: 1361080 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=dJrWrbGx; 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 4Bmx0K3y1pz9sTX for ; Thu, 10 Sep 2020 08:05:21 +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=dJrWrbGxUMAyCHMGETQ+NRErW osl4goljkpqRxJn55ecqST0NV1xXsKBDGAJQg+MLZy/gyysPrSMChWi87UIfw9cH9VGCLPwaVbEkR 3EQ7vkW3520SIYebnNZLyj/H6jfb06lHZpln7kPp6V8L+pB+p2202dMIrEJsr7Zds8RtJEer7Zr1I 3ure9BbIt2asjZzxLmJ5UqgJ+VlDztl/mfLd6Il53bxC39vHdKX0+7sYK13Pm0IDN1QN0NfZwtWJs F8PFQPdYo1VFa6fOFrkMAdfSFoFKGUy9cJPtgwmeatNi4tp4da10ruwynpt1cutRlZU+i7ThMbdQr +EKVGSa3Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8CR-0001ZC-KV; Wed, 09 Sep 2020 22:04:19 +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 1kG8CP-0001Xm-6k for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:04:18 +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 1kG8CL-001Ll2-4k; Thu, 10 Sep 2020 00:04:13 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 01/15] hs20: server: add a .gitignore file Date: Thu, 10 Sep 2020 00:03:48 +0200 Message-Id: <1599688874-I81366372464f4b460a73bad9da126e78d1d692a5@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180417_289065_1FB71C53 X-CRM114-Status: GOOD ( 12.70 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:03: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: 1361081 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=VCHmal9l; 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 4Bmx0K1rjsz9sTN for ; Thu, 10 Sep 2020 08:05:21 +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=VCHmal9lEb9eebTKaehxjyMJ9 Ayx4dpQQQHDM7VIqCM7KtsvuOrBSgXFO92Sgf4DeXbtBtz5VPbXtPrp3pZYZ0kIDd63/06+bDUhHG w3ADVnadPXvbkGQyBCx46rvKCikBK/7bVufQ+nzcdR8npzXjb3gLiYKGMF17s8VpdxvL2CQhFTGLL T1ttADnnpXDavdZ3KkKNiXw4ouAbOm4wuFbvGUOpYfWNtuc7amySM+/PPmjaQOJnq3FS/l3FrWjFz ycH/T1G24fUInOB8GRRDqKSONGzpREQ0pAdvBbtM+FhybU94GqUGWEktdI6DO5o7XPsvBDWfHsl0/ uNzmOWy/g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8CW-0001bE-Af; Wed, 09 Sep 2020 22:04:24 +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 1kG8CP-0001Xq-6m for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:04: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 1kG8CM-001Ll2-Cb; Thu, 10 Sep 2020 00:04:15 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 02/15] build: pull common fragments into a common.rules file Date: Thu, 10 Sep 2020 00:03:49 +0200 Message-Id: <1599688874-I5adf174c14de58d5c5133d7424e164654fd1c160@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180417_381984_C2D63B4A X-CRM114-Status: GOOD ( 15.26 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:03: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: 1361082 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=Qw64DYCy; 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 4Bmx0H3qP6z9sTK for ; Thu, 10 Sep 2020 08:05:19 +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=Qw64DYCyzd6urFNb0WBpA/PK8 EmQvCQQDoS1cvQKZKwHB/bIq/zNdNmLSrGJvFrDVcz8OiUPVFL4ctko0hzU7G/+vc8i84hTBtspWh cTDtk6lS4Lt+dnwA/+qXMBAUlcZJoI4ScmDkSskN4U0KHxaQ1ARrkHCAskjJbK8znaLBecLv6Pj6q OrYGf8yINpeoZUpy2WYkknl0TK+dCUhBDvIBUkgYn7QecOns1+kfQ4eZ3kcF6CJ2QNCUPXmRAfPVT olGPR+/T1AQ2AvXWAIzsPyLZvA1SozLfq4F1VX7jWGQ22p4G3Dkw5gWMzgUCv14txuvE6TNvYbuxq L772PbkmQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8CU-0001aX-Oo; Wed, 09 Sep 2020 22:04:22 +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 1kG8CP-0001Xr-8M for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:04: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 1kG8CN-001Ll2-I0; Thu, 10 Sep 2020 00:04:15 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 03/15] build: disable built-in rules Date: Thu, 10 Sep 2020 00:03:50 +0200 Message-Id: <1599688874-Ide74bfaa4f5d4a7c630198a163d950264e139e85@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180417_331905_6AC9910E X-CRM114-Status: GOOD ( 10.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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:03: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: 1361086 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=ZoGSrtAR; 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 4Bmx0K4CB1z9sTd for ; Thu, 10 Sep 2020 08:05:21 +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=ZoGSrtARP8LBnmOWyIb/4mNO0 +94/eYEKGnZz+PmPGNELxsb+J6cDlAmwK7TbgtheRvfxgop8lT0lph9ZDCujGiOIjdopn/l8VOeho KA81UGU1f3XNqZHi1cZYEOVYEH5Art1SYpYHBEN/8lxni5EO+kbMFWpHlvUu8r2zCY0Nm24Clwyws yn1AHGYhh+Yk1A3sONtsKIiRsDqtr3cyJYX1Qcvyl2D+kWEIOknBBKVIiVpYE1R+crCCKlZ+jRS9a fJZG1MCuXNXTRcsdfg/2/2Ug/nL/KTXdzIBugA2Z0xeOdjG0Vt/wz6c702GNEE2Px9dxBekxEaxKW Xo1HxAIiQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8CY-0001c0-4b; Wed, 09 Sep 2020 22:04:26 +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 1kG8CQ-0001Yg-EY for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:04: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 1kG8CO-001Ll2-CK; Thu, 10 Sep 2020 00:04:16 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 04/15] build: use common.rules in lib.rules Date: Thu, 10 Sep 2020 00:03:51 +0200 Message-Id: <1599688874-I847cd5e04defedd5c34720fe4688c0173f883e9a@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180418_635659_F7B37563 X-CRM114-Status: GOOD ( 10.68 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:03: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: 1361083 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=svJct8aK; 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 4Bmx0K1vnqz9sTW for ; Thu, 10 Sep 2020 08:05:21 +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=svJct8aKyiZq2QDye6NM9mZVQ m39QqYs24Jndr/BcPdgiNFhe5gutCe+Eng6gbGwGdCnY0AwIixTDDWAWVx3ToShD+UnCXYAidEtdn zx1veHkFhGi1FXoXdaGKQgeTyW6WuzKeQAIV4wWX+1KG9fojWNQ24o9xyQy+1UVAIyUrCsPA6nk+v FFY4sz2KD0NGmop6HTaOdCopNFRqAxBfNMuhJimd59xKhJzr0GCOUPy0tHWDX3ugvilYlXsxrwuo5 lFKHP6c7pfeDW8DKZOguHuJMld55WIVsYzQU42APGrNI0FKhHWRRfRwpwmiP48+gyO4glSnxTY30X JOZAVI7gQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8Ca-0001cF-1d; Wed, 09 Sep 2020 22:04:28 +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 1kG8CR-0001ZB-V1 for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:04:21 +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 1kG8CP-001Ll2-JD; Thu, 10 Sep 2020 00:04:18 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 05/15] build: add a common-clean target Date: Thu, 10 Sep 2020 00:03:52 +0200 Message-Id: <1599688874-If0b4368e847a16595115731f5341cfd34714b387@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180420_100559_E8A0A422 X-CRM114-Status: GOOD ( 11.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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:03: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: 1361087 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=xy7JBgUE; 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 4Bmx0H3Plgz9sTH for ; Thu, 10 Sep 2020 08:05:19 +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=xy7JBgUE1axYvpbVeLW7GlaHH pQTdR2ZEm03nenabkkMRlNZEaCHiwxVNKhUEyxw3vGHLgjKB+eKK6r8Enr58wXJDBkFfTwsTukACc eq+KNI6UFp5MVdZQRt+IyXqlPWxXZ0VPUpryk71iQpntQgeCD7YPTAWixI/R7OH8msqsXvkAIZvbS AxWOmkLbw3bSSgBe15bNEnPApnBnd/qVQpfi+F0LvEGJqqvEZeJ7vYGhUgcprXwNS5jAZNh/qTExK de0Oa2DCm0nhAIp3omk88W6tbky5CYxo16CHcpPyIoFAi9wDlUzY0KXwk3ySMBkMhiqlLybMTEA9w OpV+GDktg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8Ca-0001cR-SY; Wed, 09 Sep 2020 22:04:28 +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 1kG8CS-0001Ze-U9 for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:04:21 +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 1kG8CR-001Ll2-0b; Thu, 10 Sep 2020 00:04:19 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 06/15] build: move config file handling into build.rules Date: Thu, 10 Sep 2020 00:03:53 +0200 Message-Id: <1599688875-Ie37624a7910ff4401e58ce73aa094eb448ff6be4@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180420_989734_110A78B0 X-CRM114-Status: GOOD ( 11.66 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:03: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: 1361089 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=tLORO8uy; 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 4Bmx0W75k7z9sTH for ; Thu, 10 Sep 2020 08:05:31 +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=4SQX6Gbv0XbQWsl5I+n+RwQhrH0AC5IQDUxHYVrMjEc=; b=tLORO8uyg1Nf0USGYdpWDXSRu 0+FOGAQ+lxVuKRYr0QTr+6pzOkO+JSIxDCWgIdjV2Jt7IM/Zcm4joFw/e5qsCNbecbB1WvrU+T7fm IA2YP13XzGC7sd0hB2LSFXKiUjbyV/+dG5Ik3tTyFYDRYuAUuZXsLD32fAv67UzARqk+b9+7NSLtL dxN3bf8NvvRX2U9sx1CzH/EyqxozlAYN6ck8AXDALVvXqNBopmUiGxFU/w18Ze6z84JhRqXyN5A3+ i+57ryBLrL7VfcAVZMFmzomENFH4V6OgC8KO0a9wF5ITcGMideX+PbB3Tbt5I/qa4Ew9kG2Mgl1QQ uSeQM04Zw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8Ce-0001dO-Bp; Wed, 09 Sep 2020 22:04: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 1kG8CT-0001Zv-NE for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:04:24 +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 1kG8CS-001Ll2-0d; Thu, 10 Sep 2020 00:04:20 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 07/15] build: put object files into build/ folder Date: Thu, 10 Sep 2020 00:03:54 +0200 Message-Id: <1599688875-I22e373c8507f766a8c489a5df7c9fd165db58375@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180422_059143_3F76263F X-CRM114-Status: GOOD ( 16.59 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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..b5d31b8769e5 --- /dev/null +++ b/src/objs.mk @@ -0,0 +1,3 @@ +$(_OBJS_VAR) := $(call BUILDOBJ,$($(_OBJS_VAR))) +-include $($(1):%.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 Wed Sep 9 22:03: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: 1361084 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=sAgtHXyD; 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 4Bmx0H3sCwz9sTM for ; Thu, 10 Sep 2020 08:05:19 +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=sAgtHXyDYkog/5Nb+sM1krKG6 nJUnkWCkTp/wcw+mG7Oj71c7sX1GodYjfmmZcPml1r/+igtjITLh7oyljYCLowpZ5TmS2lINXHfpD rhtlePkuO1ZcqxWmjmgCeUJhCWKo5DnJXGOBYSpKHnwh7E0apgdBMHcbrqn+hjm/v78tLiUCfxNvR ucJ8cn4v8KUT3zCvQPNpte8BJiFgpdbhQomQOjH9UsFKoHfM69QfFLNIag9hJYf6iv9791Hu9kL1Q rpYbfNHVfZvjKy3zmYEtYorUvNMzx59srQJTaaPWAASWoFN9bKALaamIEBz3AA5jCoFJilH6TRV+l CdxU3XzEg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8Cc-0001cq-5x; Wed, 09 Sep 2020 22:04:30 +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 1kG8CU-0001aB-JH for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:04:23 +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 1kG8CS-001Ll2-RU; Thu, 10 Sep 2020 00:04:21 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 08/15] build: add .config file to dependencies Date: Thu, 10 Sep 2020 00:03:55 +0200 Message-Id: <1599688875-Icb541578dbe07c07f8e53407e92e0ce272c94e29@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180422_673116_02D4063E X-CRM114-Status: GOOD ( 12.72 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:03: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: 1361085 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=Pjxg4Ptm; 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 4Bmx0M5s6Sz9sTg for ; Thu, 10 Sep 2020 08:05:23 +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=Pjxg4Ptm/KhX2b8Goty3HhMAE x6eowg3rNZnUWzJQnUQLPNBJoIeHTfnslRgDTgbkdaHobE5Up7H9qMMn1kWtm0eawo1O2FfjzVvdk wUENxxHU4ZL+9DJDn/ggN9gyzTuxTJTShaGurISZsYQlYIcSZq+SHIc6AQIOv8vA5GymAkIyREdCz kzn4xvjTcCr4ziYtNdA8otGc/Nz2P+qyUUcoAqqrp8mpd50uFT4xrZTmfaiZ8YX6Tv4ByZ81+aCDa Km9llt539aaUVU80GweVZrGMR5TCW+2xS9iVMV4YQJudWeNVdw7r6d/ufnUrh/WpaKwWSDXPJQBuk u9TEFb92Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8Cf-0001dp-Fh; Wed, 09 Sep 2020 22:04:33 +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 1kG8CV-0001as-Jk for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:04:24 +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 1kG8CT-001Ll2-Ms; Thu, 10 Sep 2020 00:04:22 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 09/15] build: remove hostapd vs. wpa_s build checks Date: Thu, 10 Sep 2020 00:03:56 +0200 Message-Id: <1599688875-Ib638eab7ed9b579f8c79c20b4c043cc7436b94ca@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180423_670478_5F1A8523 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:03: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: 1361094 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=iHzL8Mot; 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 4Bmx1825Spz9sTH for ; Thu, 10 Sep 2020 08:06:04 +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=iHzL8Motdo+IgUJ9hLKZAJ9hm wSjIKjpPPJcHT32L3JeGI9xaOu8IW9mSMPV74rQvUQUBAbNe/fBpSTQuqbY57Jhb+lNkS26Zy25WP nHlv7s83/teB4iw1Yedcrkuvl+EjAqpHs3jGYG0heqhRaVz9V0Z1vYpxJ3yQSYcMpooG4Dv3tMf95 ZrxaGq0zdK5t15ElmVLP0Hb6/Gm3MMYfsWa8s/7n35z6I1EAhmArWS3pGsQQxljIbB6SRV/n8RtXG NU/xK4XHyRk+y9fMyRNxGe3OOcRoZZruOiW4IxcOUB0aMk2V7Jb+Wn7HszgHiHxkpqj1NNskor85p g/TsLI08g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8DO-0001yf-IX; Wed, 09 Sep 2020 22:05:18 +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 1kG8DF-0001ub-Ad for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:05: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 1kG8CU-001Ll2-NL; Thu, 10 Sep 2020 00:04:23 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 10/15] tests: rewrite .gitignore file Date: Thu, 10 Sep 2020 00:03:57 +0200 Message-Id: <1599688875-I2ff315b9889607ed1efb68617224a1a744d61e22@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180509_496509_F456E71B X-CRM114-Status: GOOD ( 10.02 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:03: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: 1361092 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=YqDPIe+B; 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 4Bmx0w1BtHz9sTH for ; Thu, 10 Sep 2020 08:05:52 +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=YqDPIe+Be1ArNWLjfq+40znKx qhXuZ8GozrOXO2WQDZBcnT14DQl9j80qiR0Q74FcwO2mi0JA6r/3gDKn6B5uHGYpZvtAIzXYF2tr3 xdfC/IHPkJNPza7skHTWojEM9GoB2hoha6aYiPfcPRDJouWnogpT4Oe5rzkOwIvUnLTwL3qYxFFvT 68dqOyvBEzxDivUFwfVsxVKJmVH1f5WW3ffmhXySRBFeNeFM+NsKPtHUHfXTw66ithXzfWETg91xT hjWBSXPwEhvfr2V7rpk+NiVPeZgzRHFbQgGrwQ1pDS6sIjT2UUNRDNaQnpZhAyqT/nySqzxPkqmQK YDJTUMohA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8DD-0001tP-AX; Wed, 09 Sep 2020 22:05:07 +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 1kG8D7-0001qK-Qx for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:05:04 +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 1kG8CV-001Ll2-LB; Thu, 10 Sep 2020 00:04:24 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 11/15] build: use the new build system for fuzz tests Date: Thu, 10 Sep 2020 00:03:58 +0200 Message-Id: <1599688875-I4d7226690685cc1275eb92be242cfdb585b6e9ac@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180502_303841_49008181 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:03: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: 1361090 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=uocFB8tV; 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 4Bmx0b5Whxz9sTH for ; Thu, 10 Sep 2020 08:05:35 +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=uocFB8tVTOSwvyOuyMB82RID1 upf2iXloV8LPVp1mf40SHPyFx2JnCJPEmfUkOf7hXRUMXpPKb8ylj7bIBz7XzTAQZ73hFtc9/GGSQ xbmgK4W3RNTtFpSkkcCpGCdsaDtiT424m4j/3stCpXZlTg0K4ur7kNmr7riq9PGFwJ2+33Rvm6bA1 hVhvsB/VWDZUI+9lC16eltwAoelmr/wYdHczTrnDs1G1KXv88XZC84y84ojnt/zkk4989YvZZyLSm l2p6GR2DgjKIvtxhRNlX/qJBcNzGtTBvoVTK41ZLO2P1vz//y8UPtx608sd2RXPV6KW/HV+vUSyu0 qLdWMzEPg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8Cu-0001iD-DO; Wed, 09 Sep 2020 22:04:48 +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 1kG8Cr-0001gZ-Bz for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:04:46 +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 1kG8CX-001Ll2-P0; Thu, 10 Sep 2020 00:04:26 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 12/15] tests: use new build system for the tests Date: Thu, 10 Sep 2020 00:03:59 +0200 Message-Id: <1599688875-I7b5b815bd378c902500ee7e68186ec4e9860f552@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180445_445718_D8C2DB94 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:04: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: 1361093 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=VsHZ8e2N; 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 4Bmx0z1754z9sTH for ; Thu, 10 Sep 2020 08:05:55 +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=VsHZ8e2NxfZlHJ2e1qGeuoZZL FW+8ky8d5PEMv7sgZew3lAX5N7ERTQ8q5ocQuXgiqHlXOfaMWfgaWoDZrTWcy7464C6yA1QI5JdHw jnrhtg0uN9Sj7QwOLt3EIY/m6DAbCBe24Z1d8HNX5FyOzZzC5jQQRZ1x1NXvxrQLpIM11AQ3StkiZ ss+FMkS23lZldReeq47apkA3uIP8QCytuo6tOwh7JWjjycr95Q2k/iyuIDlXLfxd8zmFZudarESV2 h/9uPZkE03b8QciLiIZK2Kwl2MlYUqNopgMqOJBYp24hWxTbdx8TW4kLxU9tdVZXJAMHwXA5h1rYt Vy31WjodA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8D1-0001m6-3N; Wed, 09 Sep 2020 22:04:55 +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 1kG8Cw-0001jQ-U5 for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:04:52 +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 1kG8CY-001Ll2-CU; Thu, 10 Sep 2020 00:04:26 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 13/15] build: put archive files into build/ folder too Date: Thu, 10 Sep 2020 00:04:00 +0200 Message-Id: <1599688875-I3fe9bfe2ba31714753ed6f173f196c1483b2a4a9@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180451_199349_859C19BB X-CRM114-Status: GOOD ( 10.94 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:04: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: 1361091 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=vznYVTMx; 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 4Bmx0k5bxdz9sTK for ; Thu, 10 Sep 2020 08:05:42 +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=vznYVTMxJqPbE9/y5/hmhhCy9 N7EgNlDveHYysu0sO4QeR9p+ixQbOc8hUzneoeA0tmskzNvIP1UDve5+vo1YJagGi3INYGE8s+wBo 68946KC8GA35ZHPBnhVEJD2fxnevq6nkgNjcsV6GWF8I4/m4tBIcoZyLd4EPLtcwaxkQCg21gKIJ6 1wVQ1GaDlr2zecXJHtgSgZZ6epCQGJz9UH7skROvHSOdE5xgyjrBtxsbrcCY3wli8kVr8sK4Irh9L sqWpdGsnWylTPpXlzGKXOSJ6Du6FF4dnUez4m04DEQkRlOKqvFbtO7krXepTPpQ3XgXv8BBYsBsUy 6m9VhDcpw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG8D7-0001qF-92; Wed, 09 Sep 2020 22:05:01 +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 1kG8D4-0001nl-8Y for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:05: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 1kG8CZ-001Ll2-5y; Thu, 10 Sep 2020 00:04:27 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 14/15] build: allow overriding BUILDDIR from command line Date: Thu, 10 Sep 2020 00:04:01 +0200 Message-Id: <1599688875-I3dda8359cfcdef249aebe01cbbc7caf429925d1d@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180458_480261_C3CCF8CB X-CRM114-Status: GOOD ( 12.32 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 Wed Sep 9 22:04:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1361108 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=lcKofskQ; 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 4BmyZ6651wz9sTW for ; Thu, 10 Sep 2020 09:16:14 +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=lcKofskQaHsFWNlNqe4sPiwQq sq86Allz7dxrVzsShzaLMEY9BCKNUNE0jwS3nocNEKeuL5vhyD80liQXRyh+9wwBzeksRLLmjjLl+ 08t8eDhCC69nvG48HuujB7c3Z/rlyau37vaVSEUf4C/Sb3N8qlTD0NbFOLRgwzayzt7NjKUbq0fmI KgQ6nMSOS6iAOetfxwz4xDMOIdankY4qDJoJvhfcAlyYvQTaw/i26T0xK2T3haK87IpuESmBSQJGZ 4tngBvithz/vknrM7dkCLDi+9kIGtSORQ+ZWj6+gojrIPQqtsPeV9ig/YhoBLkDoEFjp8DoeqT1LZ 3bHiQ1K3g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG9Jd-00033z-1c; Wed, 09 Sep 2020 23:15:49 +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 1kG8DI-0001xR-Lf for hostap@lists.infradead.org; Wed, 09 Sep 2020 22:05: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 1kG8Ca-001Ll2-Cl; Thu, 10 Sep 2020 00:04:28 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v5 15/15] gitignore: add various things Date: Thu, 10 Sep 2020 00:04:02 +0200 Message-Id: <1599688875-Idd2216270ffb65fc2de208a8f08ef012e15cd9e8@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200909220402.460780-1-johannes@sipsolutions.net> References: <20200909220402.460780-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200909_180512_791528_D15D44F5 X-CRM114-Status: GOOD ( 14.17 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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