libnl和libopenssl,hostapd交叉编译

1.nl:

mkdir __install

./configure CC=arm-linux-gnueabihf-gcc \
    --prefix=$(pwd)/__install \
    --host=arm-linux-gnueabihf \
    CFLAGS=-I/usr/include

make

make install

 

2.openssl:

mkdir __install

./config no-asm shared --prefix=$(pwd)/__install \
    --cross-compile-prefix=arm-linux-gnueabihf-

make

make install

 

3.hostapd:

cd hostapd-2.8/hostapd

cp deconfig .config

 1 alvin@ubuntu:~/Documents/wifi_ap/hostapd-2.8/hostapd$ git df Makefile
 2 diff --git a/hostapd/Makefile b/hostapd/Makefile
 3 index 6e263c5..f7309a7 100644
 4 --- a/hostapd/Makefile
 5 +++ b/hostapd/Makefile
 6 @@ -1,6 +1,4 @@
 7 -ifndef CC
 8 -CC=gcc
 9 -endif
10 +CC=arm-linux-gnueabihf-gcc
11 
12  ifndef CFLAGS
13  CFLAGS = -MMD -O2 -Wall -g
14 @@ -24,6 +22,9 @@ endif
15  CFLAGS += $(EXTRA_CFLAGS)
16  CFLAGS += -I$(abspath ../src)
17  CFLAGS += -I$(abspath ../src/utils)
18 +CFLAGS += -I$(abspath ../../openssl-1.0.2r/__install/include)
19 +LDFLAGS += -L$(abspath ../../openssl-1.0.2r/__install/lib)
20 +LDFLAGS += -L$(abspath ../../libnl-3.2.25/__install/lib)
21 
22  export BINDIR ?= /usr/local/bin/

make

posted on 2019-06-14 17:55  Alvin2012  阅读(2134)  评论(0编辑  收藏  举报

导航