iw交叉编译:
mkdir __install
alvin@ubuntu:~/Documents/wifi_ap/iw-5.0$ git df Makefile
diff --git a/Makefile b/Makefile
index 46d3030..95c7a01 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
MAKEFLAGS += --no-print-directory
+PREFIX := $(shell pwd)/__install
PREFIX ?= /usr
SBINDIR ?= $(PREFIX)/sbin
MANDIR ?= $(PREFIX)/share/man
@@ -7,12 +8,13 @@ PKG_CONFIG ?= pkg-config
MKDIR ?= mkdir -p
INSTALL ?= install
+CC := arm-linux-gnueabihf-gcc
CC ?= "gcc"
+LDFLAGS += -L$(shell pwd)/../libnl-3.2.25/__install/lib
CFLAGS ?= -O2 -g
CFLAGS += -Wall -Wextra -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
- -Werror-implicit-function-declaration -Wsign-compare -Wno-unused-parameter
- -Wstringop-overflow=4
+ -Werror-implicit-function-declaration -Wsign-compare -Wno-unused-parameter
OBJS = iw.o genl.o event.o info.o phy.o
interface.o ibss.o station.o survey.o util.o ocb.o
make
make install