]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
build: Use build.rules in lib.rules
authorJohannes Berg <johannes.berg@intel.com>
Fri, 18 Sep 2020 09:49:50 +0000 (11:49 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 10 Oct 2020 09:47:41 +0000 (12:47 +0300)
Use the new build.rules in lib.rules and also unify the
clean targets to lib.rules.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
16 files changed:
src/ap/Makefile
src/common/Makefile
src/crypto/Makefile
src/eap_common/Makefile
src/eap_peer/Makefile
src/eap_server/Makefile
src/eapol_auth/Makefile
src/eapol_supp/Makefile
src/l2_packet/Makefile
src/lib.rules
src/p2p/Makefile
src/radius/Makefile
src/rsn_supp/Makefile
src/tls/Makefile
src/utils/Makefile
src/wps/Makefile

index 54e48a0dd032735273dfeb832f4ebdfa50139215..805181d00c1259204d14de77b222cb33434dc66e 100644 (file)
@@ -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
index ccb280e9019c27aa01377d641c7c335687d3e73c..eeb69f0d4ff3062b2a5384f5903070f8c087fbbc 100644 (file)
@@ -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
index c40e95566104eef29b626ed415f951aaced2bb8c..94eac66fa955535d052adaff425220b93934668d 100644 (file)
@@ -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
index f00b438c6188ead58da74070c982c8e04e562d1f..7d6777babf4fd500f326ecdc9faa28b2f5eb1e94 100644 (file)
@@ -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 \
index 6531ccd5dac0b0a568f578c499ea3e6c800bbd75..282b89696e5c62f30414dc5cd8c02cb83d3dd426 100644 (file)
@@ -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
 
index 1172b72466d280885dc8cda5a10ebc69f90191e0..4ece9aa67b35ab9f598abfdfa993853eb7d873f5 100644 (file)
@@ -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
 
index 7b927a12773105e629a8c85739b6464eab2c3cc7..0175a19d940ee677d75cd4ebdb5f0c17ee81f0fe 100644 (file)
@@ -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
 
index 80db9d48689ee499530fb33f6af8008805918a10..c98280b469b7c94ebaf4e9ed40d568e88ea9d3cb 100644 (file)
@@ -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
 
index 47925b790c74f5dcdefb32c32a16a4fe295b6bc2..20f229511e9c646ffcb34ea93eff636a6fc425b0 100644 (file)
@@ -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
 
index a46315442d2acde584aa268762c706b563c76745..81b895967e01da359405b75dab9c684f2afdf2bf 100644 (file)
@@ -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)
index 5587fcf281d3a495d2373aa7fd4432e3b31d9340..174cf6f6f7f4579f9bf7abe2c7fce9056a619085 100644 (file)
@@ -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
index 3ad4751dfbfe57b62a48bfe25d383e7d174c5c4c..dbe9a9a9fa71714861fd66702fb40a913bb45dc3 100644 (file)
@@ -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= \
index eea0efba96e6815f0446199267c24e42add33b05..255cb73a750576fb6c2a087f3210674e20d6e4c7 100644 (file)
@@ -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
index 52a890a157d2efcba5ad94a3872500db0f0501af..0a36cf9e4530ff8fe56d5a5c6e456946ef4fc8be 100644 (file)
@@ -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
index 1ee2bee67f6b34c889d0d78bc36f1c6a27a9ca46..29fb1295d72652057bcce1af621fc392e8471735 100644 (file)
@@ -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
index 4806fe8dadf7e169f1be9dda76b5e92380c9c2fd..811b62977be818bd50e4b2b9c8c516b89f54e7b1 100644 (file)
@@ -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