chore(make): fix and optimize some build scripts
Signed-off-by: Caoruihong <crh.cao@huawei.com> Change-Id: I2e61b7ea231be78423dc10412e0ab9a710cad8ef
This commit is contained in:
@@ -30,38 +30,36 @@
|
||||
import("//kernel/liteos_a/liteos.gni")
|
||||
|
||||
module_name = "userinit"
|
||||
executable(module_name) {
|
||||
kernel_module(module_name) {
|
||||
sources = [ "src/los_user_init.c" ]
|
||||
|
||||
include_dirs = [
|
||||
"include",
|
||||
"$LITEOSTOPDIR/syscall",
|
||||
]
|
||||
|
||||
configs = []
|
||||
configs += [
|
||||
"$LITEOSTOPDIR:public",
|
||||
"$LITEOSTOPDIR:los_config",
|
||||
]
|
||||
|
||||
ldflags = [
|
||||
"-static",
|
||||
"-Wl,-r",
|
||||
]
|
||||
|
||||
output_dir = target_out_dir
|
||||
}
|
||||
|
||||
group("user") {
|
||||
public_deps = [ ":$module_name" ]
|
||||
deps = [ ":copy_userinit" ]
|
||||
}
|
||||
|
||||
config("public") {
|
||||
}
|
||||
|
||||
copy("copy_userinit") {
|
||||
userinit = "lib$module_name.O"
|
||||
executable(userinit) {
|
||||
output_dir = target_out_dir
|
||||
deps = [ ":$module_name" ]
|
||||
sources = [ "$target_out_dir/unstripped/bin/$module_name" ]
|
||||
outputs = [ "$root_out_dir/lib$module_name.O" ]
|
||||
configs = []
|
||||
configs += [ "$LITEOSTOPDIR:los_config" ]
|
||||
ldflags = [
|
||||
"-static",
|
||||
"-Wl,-r",
|
||||
]
|
||||
}
|
||||
|
||||
copy("copy_userinit") {
|
||||
deps = [ ":$userinit" ]
|
||||
sources = [ "$target_out_dir/unstripped/bin/$userinit" ]
|
||||
outputs = [ "$root_out_dir/$userinit" ]
|
||||
}
|
||||
|
||||
group("user") {
|
||||
deps = [ ":copy_userinit" ]
|
||||
}
|
||||
|
||||
@@ -32,17 +32,8 @@ include $(LITEOSTOPDIR)/config.mk
|
||||
MODULE_NAME := userinit
|
||||
|
||||
LOCAL_INCLUDE := \
|
||||
-I $(LITEOSTOPDIR)/kernel/base/include\
|
||||
-I $(LITEOSTOPDIR)/kernel/include \
|
||||
-I $(LITEOSTOPDIR)/kernel/extended/include \
|
||||
-I $(LITEOSTOPDIR)/syscall \
|
||||
-I $(LITEOSTOPDIR)/fs/vfs \
|
||||
-I $(LITEOSTHIRDPARTY)/FatFs/source \
|
||||
-I $(LITEOSTOPDIR)/fs/proc/include \
|
||||
-I $(LITEOSTOPDIR)/fs/jffs2/include\
|
||||
-I $(LITEOSTOPDIR)/fs/nfs/include\
|
||||
-I $(LITEOSTOPDIR)/bsd/compat/linuxkpi/include \
|
||||
-I $(LITEOSTOPDIR)/kernel/user/include
|
||||
-I include
|
||||
|
||||
LOCAL_SRCS := $(wildcard src/*.c) \
|
||||
$(wildcard src/*.S)
|
||||
|
||||
Reference in New Issue
Block a user