To be a better coder
分类: LINUX
2017-11-14 10:28:29
SRC_PATH = $(TOP_PATH)/src/
BIN_PATH = $(TOP_PATH)/bin/
LIB_PATH = $(TOP_PATH)/lib/
INC_PATH = $(TOP_PATH)/include/
这个原因可能是Make工具对低版本内核的Makefile一些旧的规则兼容不好,我们只需要修改对应的Makefile。
如 一:
原始的:
/
%/: prepare scripts
FORCE
$(Q)$(MAKE)
KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir)
修改后:
/: prepare scripts
FORCE
$(Q)$(MAKE)
KBUILD_MODULES=$(if $(CONFIG_MODULES),1)
\
$(build)=$(build-dir)
%/:
prepare scripts
FORCE
$(Q)$(MAKE)
KBUILD_MODULES=$(if $(CONFIG_MODULES),1)
\
$(build)=$(build-dir)
如二:
原始的:
config %config: scripts_basic outputmakefile
FORCE
$(Q)mkdir
-p include/linux
include/config
$(Q)$(MAKE)
$(build)=scripts/kconfig
$@
修改后:
config: scripts_basic outputmakefile
FORCE
$(Q)mkdir
-p include/linux
include/config
$(Q)$(MAKE)
$(build)=scripts/kconfig
$@
%config: scripts_basic
outputmakefile
FORCE
$(Q)mkdir
-p include/linux
include/config
$(Q)$(MAKE)
$(build)=scripts/kconfig $@
hostapd:
cd hostapd-2.6/hostapd && sed -i -e '28c BINDIR = $(TOP_PATH)\/..\/install_root\/usr\/local' Makefile && make
hostapd_install:
cd hostapd-2.6/hostapd && make install