Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
0326cbf1
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
464
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0326cbf1
编写于
9月 10, 2021
作者:
O
openharmony_ci
提交者:
Gitee
9月 10, 2021
浏览文件
操作
浏览文件
下载
差异文件
!619 简化make脚本
Merge pull request !619 from Caoruihong/opt_make_scripts
上级
87139975
a627cdba
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
44 addition
and
183 deletion
+44
-183
apps/app.mk
apps/app.mk
+2
-84
apps/config.mk
apps/config.mk
+0
-9
arch/arm/arm.mk
arch/arm/arm.mk
+0
-9
config.mk
config.mk
+14
-7
kernel/user/Makefile
kernel/user/Makefile
+1
-1
tools/build/mk/los_config.mk
tools/build/mk/los_config.mk
+1
-9
tools/build/mk/module.mk
tools/build/mk/module.mk
+26
-64
未找到文件。
apps/app.mk
浏览文件 @
0326cbf1
...
...
@@ -27,88 +27,6 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OBJOUT
:=
$(BUILD)
$(
dir
$(
subst
$(LITEOSTOPDIR)
,,
$(
shell
pwd
)))
$(APP_NAME)
override
TARGET
=
$(OUT)
/bin/
$(APP_NAME)
APP
:=
$(OUT)
/bin/
$(APP_NAME)
# create a separate list of objects per source type
LOCAL_CSRCS
:=
$(
filter
%.c,
$(LOCAL_SRCS)
)
LOCAL_CPPSRCS
:=
$(
filter
%.cpp,
$(LOCAL_SRCS)
)
LOCAL_ASMSRCS
:=
$(
filter
%.S,
$(LOCAL_SRCS)
)
LOCAL_ASMSRCS2
:=
$(
filter
%.s,
$(LOCAL_SRCS)
)
LOCAL_CCSRCS
:=
$(
filter
%.cc,
$(LOCAL_SRCS)
)
LOCAL_COBJS
:=
$(
patsubst
%.c,
$(OBJOUT)
/%.o,
$(LOCAL_CSRCS)
)
LOCAL_CPPOBJS
:=
$(
patsubst
%.cpp,
$(OBJOUT)
/%.o,
$(LOCAL_CPPSRCS)
)
LOCAL_ASMOBJS
:=
$(
patsubst
%.S,
$(OBJOUT)
/%.o,
$(LOCAL_ASMSRCS)
)
LOCAL_ASMOBJS2
:=
$(
patsubst
%.s,
$(OBJOUT)
/%.o,
$(LOCAL_ASMSRCS2)
)
LOCAL_CCOBJS
:=
$(
patsubst
%.cc,
$(OBJOUT)
/%.o,
$(LOCAL_CCSRCS)
)
LOCAL_OBJS
:=
$(LOCAL_COBJS)
$(LOCAL_CPPOBJS)
$(LOCAL_ASMOBJS)
$(LOCAL_ASMOBJS2)
$(LOCAL_CCOBJS)
LOCAL_CGCH
:=
$(
patsubst
%.h,%.h.gch,
$(LOCAL_CHS)
)
LOCAL_CPPGCH
:=
$(
patsubst
%.h,%.h.gch,
$(LOCAL_CPPHS)
)
all
:
$(APP)
define
ECHO
=
ifeq
($$(HIDE),@)
_$(1)
:=
$
(
$(1)
)
$(1)
=
echo
"
$(1)
"
$
$(
patsubst
$
$(OUT)
/%,%,
$$
@
)
&&
$$
(
_
$(1)
)
endif
endef
$(foreach
cmd,CC
GPP
AS,$(eval
$(call
ECHO,$(cmd))))
LOCAL_FLAGS
+=
-MD
-MP
-include
$(LOCAL_OBJS:%.o=%.d)
$(LOCAL_COBJS)
:
$(OBJOUT)/%.o: %.c
$(HIDE)$(OBJ_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PPSRCS
:=
LOCAL_ASMSRCS
:=
LOCAL_COBJS
:=
LOCAL_CPPOBJS
:=
LOCAL_ASMOBJS
:=
LOCAL_ASMOBJS2
:=
# LOCAL_OBJS is passed back
#LOCAL_OBJS :=
include
$(MODULE)
apps/config.mk
浏览文件 @
0326cbf1
...
...
@@ -69,12 +69,3 @@ endif
ifeq
($(LOSCFG_DRIVERS_TRACE), y)
APP_SUBDIRS
+=
trace
endif
# clear all local variables
LOCAL_FLAGS
:=
LOCAL_CFLAGS
:=
LOCAL_CPPFLAGS
:=
LOCAL_ASFLAGS
:=
LOCAL_SRCS
:=
LOCAL_CHS
:=
LOCAL_CPPHS
:=
arch/arm/arm.mk
浏览文件 @
0326cbf1
...
...
@@ -74,12 +74,3 @@ ARCH_INCLUDE := -I $(LITEOSTOPDIR)/arch/arm/include \
-I
$(LITEOSTOPDIR)
/arch/arm/
$(ARCH)
/src/include
LITEOS_PLATFORM_INCLUDE
+=
$(ARCH_INCLUDE)
# expose FPU info to assembly code
ifeq
($(LOSCFG_ARCH_FPU_DISABLE), y)
LITEOS_CMACRO
+=
-DLOSCFG_ARCH_FPU_DISABLE
else
ifeq
($(LOSCFG_ARCH_FPU_VFP_D16), y)
LITEOS_CMACRO
+=
-DLOSCFG_ARCH_FPU_VFP_D16
else
ifeq
($(LOSCFG_ARCH_FPU_VFP_D32), y)
LITEOS_CMACRO
+=
-DLOSCFG_ARCH_FPU_VFP_D32
endif
config.mk
浏览文件 @
0326cbf1
...
...
@@ -52,10 +52,17 @@ LITEOS_LDFLAGS := $(LITEOS_LD_OPTS) $(LITEOS_LD_PATH) \
$(LITEOS_LD_SCRIPT)
# clear all local variables
LOCAL_FLAGS
:=
LOCAL_CFLAGS
:=
LOCAL_CPPFLAGS
:=
LOCAL_ASFLAGS
:=
LOCAL_SRCS
:=
LOCAL_CHS
:=
LOCAL_CPPHS
:=
LOCAL_FLAGS
=
LOCAL_CFLAGS
=
LOCAL_CPPFLAGS
=
LOCAL_ASFLAGS
=
LOCAL_SRCS
=
LOCAL_CHS
=
LOCAL_CPPHS
=
# basic build flags
CFLAGS
:=
$(LITEOS_CFLAGS)
CXXFLAGS
:=
$(LITEOS_CXXFLAGS)
ASFLAGS
:=
$(LITEOS_ASFLAGS)
LDFLAGS
:=
$(LITEOS_LDFLAGS)
ARFLAGS
:=
rc
kernel/user/Makefile
浏览文件 @
0326cbf1
...
...
@@ -44,7 +44,7 @@ include $(MODULE)
USERINIT
:=
$(OUT)
/lib/lib
$(MODULE_NAME)
.O
$(USERINIT)
:
$(
MODULE
)
$(USERINIT)
:
$(
TARGET
)
$(HIDE)$(LD)
-r
-o
$@
--whole-archive
$<
--no-whole-archive
clean_userinit
:
...
...
tools/build/mk/los_config.mk
浏览文件 @
0326cbf1
...
...
@@ -36,14 +36,9 @@ endif
## variable define ##
HIDE
=
@
RM
=
-rm
-rf
ARFLAGS
=
cr
OS
:=
$(
shell
uname
-s
)
OBJ_MKDIR
=
if
[
!
-d
$(
dir
$@
)
]
;
then
mkdir
-p
$(
dir
$@
)
;
fi
OUT
=
$(
or
$(OUTDIR)
,
$(LITEOSTOPDIR)
/out/
$
(
LOSCFG_PRODUCT_NAME:
"%"
=
%
))
BUILD
=
$(OUT)
/obj
MODULE
=
$(LITEOSTOPDIR)
/tools/build/mk/module.mk
LITEOS_SCRIPTPATH
=
$(LITEOSTOPDIR)
/tools/scripts
LITEOS_PLATFORM
=
$
(
LOSCFG_PLATFORM:
"%"
=
%
)
LITEOSTHIRDPARTY
=
$(LITEOSTOPDIR)
/../../third_party
## compiler relative ##
...
...
@@ -328,8 +323,6 @@ ifeq ($(LOSCFG_NET_LWIP_SACK_2_1), y)
-I
$(LITEOSTOPDIR)
/net/lwip-2.1/porting/include
\
-I
$(LWIPDIR)
/include
\
-I
$(LITEOSTOPDIR)
/net/mac
LITEOS_CMACRO
+=
$(LWIP_MACROS)
else
ifeq
($(LOSCFG_NET_LWIP_SACK_2_0), y)
LWIPDIR
:=
$(LITEOSTHIRDPARTY)
/lwip_enhanced/src
LITEOS_BASELIB
+=
-llwip
...
...
@@ -337,8 +330,7 @@ else ifeq ($(LOSCFG_NET_LWIP_SACK_2_0), y)
LITEOS_LWIP_SACK_INCLUDE
+=
\
-I
$(LWIPDIR)
/include
\
-I
$(LITEOSTOPDIR)
/net/mac
LWIP_MACROS
+=
-DLWIP_CONFIG_FILE
=
\"
lwip/lwipopts.h
\"
-DLWIP_LITEOS_A_COMPAT
LITEOS_CMACRO
+=
$(LWIP_MACROS)
LITEOS_CMACRO
+=
-DLWIP_CONFIG_FILE
=
\"
lwip/lwipopts.h
\"
-DLWIP_LITEOS_A_COMPAT
else
$(error
"unknown lwip version"
)
endif
...
...
tools/build/mk/module.mk
浏览文件 @
0326cbf1
...
...
@@ -27,88 +27,50 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OBJOUT
:=
$(BUILD)
$(
dir
$(
subst
$(LITEOSTOPDIR)
,,
$(
shell
pwd
)))
$(MODULE_NAME)
OBJOUT
=
$(OUT)
/obj
TOPDIR
=
$(
abspath
$(LITEOSTOPDIR)
/../..
)
MODULE
:
=
$(OUT)
/lib/lib
$(MODULE_NAME)
.a
TARGET
=
$(OUT)
/lib/lib
$(MODULE_NAME)
.a
# create a separate list of objects per source type
LOCAL_OBJS
=
$(
addprefix
$(OBJOUT)
/,
$(
addsuffix
.o,
$(
basename
$(
subst
$(TOPDIR)
/,,
$(
abspath
$(LOCAL_SRCS)
)))))
LOCAL_CSRCS
:=
$(
filter
%.c,
$(LOCAL_SRCS)
)
LOCAL_CPPSRCS
:=
$(
filter
%.cpp,
$(LOCAL_SRCS)
)
LOCAL_ASMSRCS
:=
$(
filter
%.S,
$(LOCAL_SRCS)
)
LOCAL_ASMSRCS2
:=
$(
filter
%.s,
$(LOCAL_SRCS)
)
LOCAL_CCSRCS
:=
$(
filter
%.cc,
$(LOCAL_SRCS)
)
all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OCAL_CGCH)
:
%.h.gch : %.h
$(HIDE)$(
CC)
$(LITEOS_CFLAGS)
$(LOCAL_FLAGS)
$(LOCAL_CFLAGS)
$>
$^
$(
OUT)/lib/lib%.a
:
$(LOCAL_OBJS)
$(HIDE)$(
AR)
$(ARFLAGS)
$@
$^
$(
LOCAL_CPPGCH)
:
%.h.gch : %.h
$(HIDE)$(GPP)
$(L
ITEOS_CXXFLAGS)
$(LOCAL_FLAGS)
$(LOCAL_CPPFLAGS)
-x
c++-header
$>
$^
$(
OUT)/bin/%
:
$(LOCAL_OBJS)
$(HIDE)$(GPP)
$(L
DFLAGS)
-o
$@
$^
LOCAL_GCH
:=
$(LOCAL_CGCH)
$(LOCAL_CPPGCH)
$(OUT)/%/
:
;$(HIDE)mkdir -p $@
$(LOCAL_OBJS)
:
$(LOCAL_GCH)
$(MODULE)
:
$(LOCAL_OBJS)
$(HIDE)$(OBJ_MKDIR)
$(HIDE)$(AR)
$(ARFLAGS)
$@
$^
$(LOCAL_OBJS)
:
| $(dir $(LOCAL_OBJS))
$(TARGET)
:
| $(dir $(TARGET))
clean
:
$(HIDE)$(RM)
$(
MODULE)
$(OBJOUT)
$(LOCAL_GCH)
*
.bak
*
~
$(HIDE)$(RM)
$(
TARGET)
$(LOCAL_OBJS)
.PHONY
:
all clean
# clear some variables we set here
LOCAL_CSRCS
:=
LOCAL_CPPSRCS
:=
LOCAL_ASMSRCS
:=
LOCAL_COBJS
:=
LOCAL_CPPOBJS
:=
LOCAL_ASMOBJS
:=
LOCAL_ASMOBJS2
:=
# LOCAL_OBJS is passed back
#LOCAL_OBJS :=
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录