提交 b19527c5 编写于 作者: O openharmony_ci 提交者: Gitee

!138 优化menuconfig.h的使用

Merge pull request !138 from Caoruihong/master
/out # General ignored file types
/test
/include
.config*
cscope*
tags
.vscode
*.o *.o
.idea *.a
*.img *.so
*.swp *.swp
*.rej *.rej
*.orig *.orig
*.a
*.so # IDE settings
.config.cmd .vscode
.idea
.settings .settings
.cproject .cproject
.project .project
platform/include/menuconfig.h
platform/board.ld # VIM files
apps/init/init cscope*
apps/shell/shell tags
# Menuconfig temp files
/include/config
/include/generated
.config*
# Build temp files
/platform/board.ld
/out
...@@ -49,7 +49,6 @@ LITEOS_TARGET = liteos ...@@ -49,7 +49,6 @@ LITEOS_TARGET = liteos
LITEOS_LIBS_TARGET = libs_target LITEOS_LIBS_TARGET = libs_target
LITEOS_MENUCONFIG_H = $(LITEOSTOPDIR)/include/generated/autoconf.h LITEOS_MENUCONFIG_H = $(LITEOSTOPDIR)/include/generated/autoconf.h
LITEOS_PLATFORM_BASE = $(LITEOSTOPDIR)/platform LITEOS_PLATFORM_BASE = $(LITEOSTOPDIR)/platform
LITEOS_PLATFORM_MENUCONFIG_H = $(LITEOS_PLATFORM_BASE)/include/menuconfig.h
export CONFIG_=LOSCFG_ export CONFIG_=LOSCFG_
MENUCONFIG_PATH = $(LITEOSTOPDIR)/tools/menuconfig MENUCONFIG_PATH = $(LITEOSTOPDIR)/tools/menuconfig
...@@ -124,7 +123,7 @@ $(__LIBS): $(OUT) $(CXX_INCLUDE) ...@@ -124,7 +123,7 @@ $(__LIBS): $(OUT) $(CXX_INCLUDE)
$(OUT): $(LITEOS_MENUCONFIG_H) $(OUT): $(LITEOS_MENUCONFIG_H)
$(HIDE)mkdir -p $(OUT)/lib $(HIDE)mkdir -p $(OUT)/lib
$(HIDE)$(CC) -I$(LITEOSTOPDIR)/kernel/base/include -I$(LITEOSTOPDIR)/../../$(LOSCFG_BOARD_CONFIG_PATH) \ $(HIDE)$(CC) -I$(LITEOSTOPDIR)/kernel/base/include -I$(LITEOSTOPDIR)/../../$(LOSCFG_BOARD_CONFIG_PATH) \
-I$(LITEOS_PLATFORM_BASE)/include -E $(LITEOS_PLATFORM_BASE)/board.ld.S \ -I$(LITEOS_PLATFORM_BASE)/include -imacros $< -E $(LITEOS_PLATFORM_BASE)/board.ld.S \
-o $(LITEOS_PLATFORM_BASE)/board.ld -P -o $(LITEOS_PLATFORM_BASE)/board.ld -P
$(BUILD): $(BUILD):
...@@ -141,14 +140,13 @@ menuconfig:$(MENUCONFIG_MCONF) ...@@ -141,14 +140,13 @@ menuconfig:$(MENUCONFIG_MCONF)
$< $(KCONFIG_FILE_PATH) $< $(KCONFIG_FILE_PATH)
genconfig:$(MENUCONFIG_CONF) genconfig:$(MENUCONFIG_CONF)
$(HIDE)mkdir -p include/config include/generated platform/include $(HIDE)mkdir -p include/config include/generated
$< --olddefconfig $(KCONFIG_FILE_PATH) $< --olddefconfig $(KCONFIG_FILE_PATH)
$< --silentoldconfig $(KCONFIG_FILE_PATH) $< --silentoldconfig $(KCONFIG_FILE_PATH)
-mv -f $(LITEOS_MENUCONFIG_H) $(LITEOS_PLATFORM_MENUCONFIG_H)
##### menuconfig end ####### ##### menuconfig end #######
$(LITEOS_MENUCONFIG_H): $(LITEOS_MENUCONFIG_H):
ifneq ($(LITEOS_PLATFORM_MENUCONFIG_H), $(wildcard $(LITEOS_PLATFORM_MENUCONFIG_H))) ifneq ($(LITEOS_MENUCONFIG_H), $(wildcard $(LITEOS_MENUCONFIG_H)))
$(HIDE)$(MAKE) genconfig $(HIDE)$(MAKE) genconfig
endif endif
$(LITEOS_TARGET): $(__LIBS) $(LITEOS_TARGET): $(__LIBS)
...@@ -197,16 +195,13 @@ clean: ...@@ -197,16 +195,13 @@ clean:
done done
$(HIDE)$(MAKE) -C apps clean $(HIDE)$(MAKE) -C apps clean
$(HIDE)$(RM) $(__OBJS) $(LITEOS_TARGET) $(BUILD) $(LITEOS_MENUCONFIG_H) *.bak *~ $(HIDE)$(RM) $(__OBJS) $(LITEOS_TARGET) $(BUILD) $(LITEOS_MENUCONFIG_H) *.bak *~
$(HIDE)$(RM) $(LITEOS_PLATFORM_MENUCONFIG_H) $(HIDE)$(RM) include/config include/generated
$(HIDE)$(RM) include
$(HIDE)$(MAKE) cleanrootfs $(HIDE)$(MAKE) cleanrootfs
$(HIDE)echo "clean $(LITEOS_PLATFORM) finish" $(HIDE)echo "clean $(LITEOS_PLATFORM) finish"
cleanall: cleanall: clean
$(HIDE)$(RM) $(LITEOSTOPDIR)/out $(HIDE)$(RM) $(LITEOSTOPDIR)/out $(LITEOS_PLATFORM_BASE)/board.ld
$(HIDE)find $(LITEOS_PLATFORM_BASE)/ -name board.ld -exec rm -rf {} \; $(HIDE)echo "clean all done"
$(HIDE)cd sample/sample_osdrv;make clean;cd ../..;
$(HIDE)echo "clean all"
cleanrootfs: cleanrootfs:
$(HIDE)$(RM) $(OUT)/rootfs $(HIDE)$(RM) $(OUT)/rootfs
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#ifndef _ARCH_CONFIG_H #ifndef _ARCH_CONFIG_H
#define _ARCH_CONFIG_H #define _ARCH_CONFIG_H
#include "menuconfig.h"
#define CPSR_INT_DISABLE 0xC0 /* Disable both FIQ and IRQ */ #define CPSR_INT_DISABLE 0xC0 /* Disable both FIQ and IRQ */
#define CPSR_IRQ_DISABLE 0x80 /* IRQ disabled when =1 */ #define CPSR_IRQ_DISABLE 0x80 /* IRQ disabled when =1 */
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#define __LOS_TLB_V6_H__ #define __LOS_TLB_V6_H__
#include "los_typedef.h" #include "los_typedef.h"
#include "menuconfig.h"
#include "arm.h" #include "arm.h"
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "compiler.h" #include "compiler.h"
#include "los_base.h" #include "los_base.h"
#include "los_typedef.h" #include "los_typedef.h"
#include "menuconfig.h"
#ifdef LOSCFG_FS_ZPFS #ifdef LOSCFG_FS_ZPFS
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "menuconfig.h"
#ifdef LOSCFG_FS_VFS #ifdef LOSCFG_FS_VFS
#include "fs/file.h" #include "fs/file.h"
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#ifndef _LOS_PARTITION_UTILS_H #ifndef _LOS_PARTITION_UTILS_H
#define _LOS_PARTITION_UTILS_H #define _LOS_PARTITION_UTILS_H
#include "menuconfig.h"
#include "los_typedef.h" #include "los_typedef.h"
#include "los_base.h" #include "los_base.h"
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#ifndef _SYS_CONFIG_H #ifndef _SYS_CONFIG_H
#define _SYS_CONFIG_H #define _SYS_CONFIG_H
#include "menuconfig.h"
#ifdef __cplusplus #ifdef __cplusplus
#if __cplusplus #if __cplusplus
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#ifndef _LWIP_PORTING_LWIPOPTS_H_ #ifndef _LWIP_PORTING_LWIPOPTS_H_
#define _LWIP_PORTING_LWIPOPTS_H_ #define _LWIP_PORTING_LWIPOPTS_H_
#include "menuconfig.h"
// lwIP debug options, comment the ones you don't want // lwIP debug options, comment the ones you don't want
#if LWIP_DEBUG #if LWIP_DEBUG
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "menuconfig.h"
#ifdef LOSCFG_FS_VFS #ifdef LOSCFG_FS_VFS
#include "errno.h" #include "errno.h"
#include "unistd.h" #include "unistd.h"
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
*/ */
#define _GNU_SOURCE #define _GNU_SOURCE
#include "menuconfig.h"
#ifdef LOSCFG_FS_VFS #ifdef LOSCFG_FS_VFS
#include "fs/fs.h" #include "fs/fs.h"
#include "fs/file.h" #include "fs/file.h"
......
...@@ -119,6 +119,7 @@ CXX_PATH = $(LITEOSTOPDIR)/lib/cxxstl ...@@ -119,6 +119,7 @@ CXX_PATH = $(LITEOSTOPDIR)/lib/cxxstl
JFFS_PATH = $(LITEOSTOPDIR)/fs/jffs2 JFFS_PATH = $(LITEOSTOPDIR)/fs/jffs2
LITEOS_SCRIPTPATH ?= $(LITEOSTOPDIR)/tools/scripts LITEOS_SCRIPTPATH ?= $(LITEOSTOPDIR)/tools/scripts
LITEOS_LIB_BIGODIR = $(OUT)/lib/obj LITEOS_LIB_BIGODIR = $(OUT)/lib/obj
LITEOS_MENUCONFIG_H = $(LITEOSTOPDIR)/include/generated/autoconf.h
LOSCFG_ENTRY_SRC = $(LITEOSTOPDIR)/kernel/common/los_config.c LOSCFG_ENTRY_SRC = $(LITEOSTOPDIR)/kernel/common/los_config.c
### include variable ### include variable
...@@ -670,6 +671,9 @@ LITEOS_COPTS_EXTRA_INTERWORK := $(LITEOS_COPTS_EXTRA) ...@@ -670,6 +671,9 @@ LITEOS_COPTS_EXTRA_INTERWORK := $(LITEOS_COPTS_EXTRA)
#-fno-inline #-fno-inline
endif endif
# kernel configuration macros
LITEOS_CMACRO += -imacros $(LITEOS_MENUCONFIG_H)
ifneq ($(LOSCFG_COMPILER_CLANG_LLVM), y) ifneq ($(LOSCFG_COMPILER_CLANG_LLVM), y)
LITEOS_LD_OPTS += -nostartfiles LITEOS_LD_OPTS += -nostartfiles
endif endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册