blob: 1c93f00900f1548fc11f5ea187f9886f1abb5ebe [file] [log] [blame]
developer6b200c72022-06-15 19:48:25 +08001From 1f3706d10812d70adefe32fe0d7d3a3ec25374f0 Mon Sep 17 00:00:00 2001
2From: Hauke Mehrtens <hauke@hauke-m.de>
3Date: Sun, 21 Nov 2021 00:02:57 +0100
4Subject: Revert "iw: allow specifying CFLAGS/LIBS externally"
5
6This reverts commit 1325244b77d56fd7a16d1e35fdae0efc151920b1.
7
8The OpenWrt build system provides the CFLAGS and LIBS names from the
9package Makefile to overwrite them for libnl-tiny. This is not possible
10after this upstream change which we revert here any more
11
12Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
13---
14 Makefile | 20 ++++++++++----------
15 1 file changed, 10 insertions(+), 10 deletions(-)
16
17--- a/Makefile
18+++ b/Makefile
developer42c7a432024-07-12 14:39:29 +080019@@ -46,30 +46,30 @@ NLLIBNAME = libnl-1
developer6b200c72022-06-15 19:48:25 +080020 endif
21
22 ifeq ($(NL2FOUND),Y)
23-override CFLAGS += -DCONFIG_LIBNL20
24-override LIBS += -lnl-genl
25+CFLAGS += -DCONFIG_LIBNL20
26+LIBS += -lnl-genl
27 NLLIBNAME = libnl-2.0
28 endif
29
30 ifeq ($(NL3xFOUND),Y)
31 # libnl 3.2 might be found as 3.2 and 3.0
32 NL3FOUND = N
33-override CFLAGS += -DCONFIG_LIBNL30
34-override LIBS += -lnl-genl-3
35+CFLAGS += -DCONFIG_LIBNL30
36+LIBS += -lnl-genl-3
37 NLLIBNAME = libnl-3.0
38 endif
39
40 ifeq ($(NL3FOUND),Y)
41-override CFLAGS += -DCONFIG_LIBNL30
42-override LIBS += -lnl-genl
43+CFLAGS += -DCONFIG_LIBNL30
44+LIBS += -lnl-genl
45 NLLIBNAME = libnl-3.0
46 endif
47
48 # nl-3.1 has a broken libnl-gnl-3.1.pc file
49 # as show by pkg-config --debug --libs --cflags --exact-version=3.1 libnl-genl-3.1;echo $?
50 ifeq ($(NL31FOUND),Y)
51-override CFLAGS += -DCONFIG_LIBNL30
52-override LIBS += -lnl-genl
53+CFLAGS += -DCONFIG_LIBNL30
54+LIBS += -lnl-genl
55 NLLIBNAME = libnl-3.1
56 endif
57
developer42c7a432024-07-12 14:39:29 +080058@@ -77,8 +77,8 @@ ifeq ($(NLLIBNAME),)
developer6b200c72022-06-15 19:48:25 +080059 $(error Cannot find development files for any supported version of libnl)
60 endif
61
62-override LIBS += $(shell $(PKG_CONFIG) --libs $(NLLIBNAME))
63-override CFLAGS += $(shell $(PKG_CONFIG) --cflags $(NLLIBNAME))
64+LIBS += $(shell $(PKG_CONFIG) --libs $(NLLIBNAME))
65+CFLAGS += $(shell $(PKG_CONFIG) --cflags $(NLLIBNAME))
66 endif # NO_PKG_CONFIG
67
68 ifeq ($(V),1)