diff --git a/apps/config.mk b/apps/config.mk index 3862ce07db69a97590032852c86b1393b6bb92e9..6e15ccab0099eb43a65ecf0941ebfa6055a7959f 100644 --- a/apps/config.mk +++ b/apps/config.mk @@ -30,7 +30,7 @@ include $(LITEOSTOPDIR)/config.mk # common flags config -BASE_OPTS := -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE $(LITEOS_GCOV_OPTS) +BASE_OPTS := -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE ASFLAGS := CFLAGS := $(LITEOS_COPTS) $(BASE_OPTS) -fPIE diff --git a/arch/arm/arm/Makefile b/arch/arm/arm/Makefile index f12ec1cce362049c44575eebf96897bf80ffabf1..f6cb6a1ec3f722218045833fb91e0e96854602af 100644 --- a/arch/arm/arm/Makefile +++ b/arch/arm/arm/Makefile @@ -43,8 +43,6 @@ else LOCAL_SRCS += src/startup/reset_vector_up.S endif -LOCAL_FLAGS := $(LITEOS_GCOV_OPTS) - AS_OBJS_LIBC_FLAGS = -D__ASSEMBLY__ # linux style macros LINUX_ARCH_$(LOSCFG_ARCH_ARM_V7A) = -D__LINUX_ARM_ARCH__=7 @@ -56,6 +54,6 @@ LINUX_ARCH_$(LOSCFG_ARCH_ARM_V8M) = -D__LINUX_ARM_ARCH__=8 AS_OBJS_LIBC_FLAGS += $(LINUX_ARCH_y) ifeq ($(LOSCFG_GDB), y) -LOCAL_FLAGS += $(AS_OBJS_LIBC_FLAGS) +LOCAL_FLAGS := $(AS_OBJS_LIBC_FLAGS) endif include $(MODULE) diff --git a/bsd/Makefile b/bsd/Makefile index 33101c2c1e4562e23a0583930d5e64a46545aa68..353779cdb04b638cbc077e2d6f4c0ba103cf5744 100644 --- a/bsd/Makefile +++ b/bsd/Makefile @@ -43,6 +43,4 @@ LOCAL_SRCS += $(wildcard crypto/rijndael/*.c) \ $(wildcard libkern/*.c) endif -LOCAL_FLAGS := $(LITEOS_GCOV_OPTS) - include $(MODULE) diff --git a/bsd/compat/linuxkpi/Makefile b/bsd/compat/linuxkpi/Makefile index 1eb41c16d52b39cd003770197ac9321de0d97be1..d4e304db8fb4778cc57dbd4e052dbaf58ff3a5a9 100644 --- a/bsd/compat/linuxkpi/Makefile +++ b/bsd/compat/linuxkpi/Makefile @@ -37,6 +37,4 @@ ifneq ($(LOSCFG_HRTIMER_ENABLE), y) LOCAL_SRCS := $(filter-out src/linux_hrtimer.c, $(LOCAL_SRCS)) endif -LOCAL_FLAGS := $(LITEOS_GCOV_OPTS) - include $(MODULE) diff --git a/bsd/dev/usb/Makefile b/bsd/dev/usb/Makefile index a0fb6e8837bebed2867c8adeb42fec65dc6c68f5..f01ea12db1488c6163088e59442568c54347e6e7 100644 --- a/bsd/dev/usb/Makefile +++ b/bsd/dev/usb/Makefile @@ -135,6 +135,4 @@ LOCAL_SRCS += $(INPUT_SRC)/uhid.c \ $(CORE_SRC)/usb_hid.c endif -LOCAL_FLAGS += $(LITEOS_GCOV_OPTS) - include $(HDF_DRIVER) diff --git a/compat/posix/Makefile b/compat/posix/Makefile index 85c4fedb6e4afa9879f8ad07d749dce78e2dd3fc..cfeb6a3a3b096dfaed9f15b610752b9939ceaf5f 100644 --- a/compat/posix/Makefile +++ b/compat/posix/Makefile @@ -35,6 +35,6 @@ LOCAL_SRCS := $(wildcard src/*.c) LOCAL_INCLUDE := -I $(LITEOSTOPDIR)/compat/posix/src -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/drivers/block/disk/Makefile b/drivers/block/disk/Makefile index e743b7d51ba256f8368199f213d59317f936ef2c..4e35bd1bdebf88811cf46eb8f46c35775c811aaf 100644 --- a/drivers/block/disk/Makefile +++ b/drivers/block/disk/Makefile @@ -33,6 +33,4 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard src/*.c) -LOCAL_FLAGS := $(LITEOS_GCOV_OPTS) - include $(MODULE) diff --git a/drivers/char/bch/Makefile b/drivers/char/bch/Makefile index 76ebc566253053389e4c2d62479fb8deb728d50a..6774a10428d9037d779357e2ce865679b839eb9b 100644 --- a/drivers/char/bch/Makefile +++ b/drivers/char/bch/Makefile @@ -36,6 +36,6 @@ LOCAL_SRCS := $(wildcard $(LITEOSTHIRDPARTY)/NuttX/drivers/bch/*.c) LOCAL_INCLUDE := \ -I $(LITEOSTHIRDPARTY)/NuttX/drivers/bch -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/drivers/char/trace/Makefile b/drivers/char/trace/Makefile index a79a9cf34ffa082c24ce8edcbdb73df97b2b6324..f4fa8887fc719cf40b747fab7d81a662ba7c7705 100644 --- a/drivers/char/trace/Makefile +++ b/drivers/char/trace/Makefile @@ -35,6 +35,6 @@ LOCAL_SRCS := $(wildcard src/*.c) LOCAL_INCLUDE := -I $(LITEOSTOPDIR)/drivers/char/trace/include -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/drivers/mtd/multi_partition/Makefile b/drivers/mtd/multi_partition/Makefile index e3c6f639fe92d7c3ef788416d8432136aab89d22..ff995946d2b78e6ccbb3f391bd0bc14d0db90b64 100644 --- a/drivers/mtd/multi_partition/Makefile +++ b/drivers/mtd/multi_partition/Makefile @@ -35,13 +35,12 @@ LOCAL_SRCS := $(wildcard src/*.c) LOCAL_INCLUDE := \ -I $(LITEOSTOPDIR)/fs/jffs2/include \ - -I $(LITEOSTOPDIR)/drivers/mtd/multi_partition/include \ -I $(LITEOSTOPDIR)/../../device/hisilicon/drivers/include/mtd/common/include ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y) LOCAL_INCLUDE += -I $(LITEOSTOPDIR)/../../device/qemu/drivers/cfiflash endif -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/fs/fat/Makefile b/fs/fat/Makefile index 72b987f3ae7c45720a931373428f028e964280a0..cc615847482b74c6def78955589a530af41b955d 100644 --- a/fs/fat/Makefile +++ b/fs/fat/Makefile @@ -34,13 +34,9 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard os_adapt/*.c) LOCAL_SRCS += $(wildcard $(LITEOSTHIRDPARTY)/FatFs/source/*.c) -LOCAL_INCLUDE := \ - -I $(LITEOSTHIRDPARTY)/FatFs/source \ - -I $(LITEOSTOPDIR)/fs/fat/os_adapt \ - -I $(LITEOSTOPDIR)/fs/fat/virpart/include \ - -I $(LITEOSTOPDIR)/fs/vfs \ +LOCAL_INCLUDE := -I $(LITEOSTOPDIR)/fs/fat/os_adapt -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/fs/fat/virpart/Makefile b/fs/fat/virpart/Makefile index 3ba118c31c7904e25a370fb072c6858df475c903..d06b559d41167726b95ba3e72217f5458cadff5e 100644 --- a/fs/fat/virpart/Makefile +++ b/fs/fat/virpart/Makefile @@ -33,10 +33,8 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard src/*.c) -LOCAL_INCLUDE := \ - -I $(LITEOSTOPDIR)/fs/fat/virpart/include \ - -I $(LITEOSTOPDIR)/fs/fat/os_adapt +LOCAL_INCLUDE := -I $(LITEOSTOPDIR)/fs/fat/os_adapt -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/fs/jffs2/Makefile b/fs/jffs2/Makefile index a778ca551a5768c34ba2b55f0154d57382f20d71..09c9fefd75f3ed58896fa3d5e2ffbc245fa40a46 100644 --- a/fs/jffs2/Makefile +++ b/fs/jffs2/Makefile @@ -35,10 +35,9 @@ LOCAL_SRCS := $(wildcard src/*.c) \ $(wildcard $(LITEOSTHIRDPARTY)/Linux_Kernel/fs/jffs2/*.c) LOCAL_INCLUDE := \ -I $(LITEOSTOPDIR)/fs/jffs2/include \ - -I $(LITEOSTOPDIR)/drivers/mtd/multi_partition/include \ -I $(LITEOSTHIRDPARTY)/Linux_Kernel/fs/jffs2 \ -I $(LITEOSTHIRDPARTY)/Linux_Kernel/fs -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/fs/nfs/Makefile b/fs/nfs/Makefile index 5b999391e351e3e3cb626bfd688067601bec440f..4991913a2f73ae902952c460c97cf9e689184849 100644 --- a/fs/nfs/Makefile +++ b/fs/nfs/Makefile @@ -33,6 +33,6 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard $(LITEOSTHIRDPARTY)/NuttX/fs/nfs/*.c) -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/fs/proc/Makefile b/fs/proc/Makefile index 2b8d72e6f58258c74898c7238ce359ae0499db82..943fa35b506b75fac24bb1de8613d998ebad8b63 100644 --- a/fs/proc/Makefile +++ b/fs/proc/Makefile @@ -33,6 +33,4 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard os_adapt/*.c) $(wildcard src/*.c) -LOCAL_FLAGS := $(LITEOS_GCOV_OPTS) - include $(MODULE) \ No newline at end of file diff --git a/fs/ramfs/Makefile b/fs/ramfs/Makefile index 4f8e3b9fc99d3dfe5f833bfb45babace680f56ce..dce8aef819b893106bff12c994d1dd21fd9fd89f 100644 --- a/fs/ramfs/Makefile +++ b/fs/ramfs/Makefile @@ -33,6 +33,4 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard $(LITEOSTHIRDPARTY)/NuttX/fs/tmpfs/*.c) -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) - include $(MODULE) diff --git a/fs/romfs/Makefile b/fs/romfs/Makefile index 49d97302975df13a58a947026511d7eb3e3b34fb..4d40ec5cd19069a559d3bb93a6017376c7ea6534 100644 --- a/fs/romfs/Makefile +++ b/fs/romfs/Makefile @@ -32,6 +32,4 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard $(LITEOSTHIRDPARTY)/NuttX/fs/romfs/*.c) -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) - include $(MODULE) diff --git a/fs/rootfs/Makefile b/fs/rootfs/Makefile index 6762cab464afdc8a458e2b1a3589dadb6d4a05a7..a5e8213cae6abdfdf5c9bfe2c8ebcc5ae2a27b53 100644 --- a/fs/rootfs/Makefile +++ b/fs/rootfs/Makefile @@ -33,14 +33,11 @@ MODULE_NAME := rootfs LOCAL_SRCS := $(wildcard los_rootfs.c los_bootargs.c) -LOCAL_INCLUDE := \ - -I $(LITEOSTOPDIR)/kernel/common \ - ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y) LOCAL_INCLUDE += -I $(LITEOSTOPDIR)/../../device/qemu/drivers/cfiflash endif -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/fs/vfs/Makefile b/fs/vfs/Makefile index c45a4f304889473e1faa92799d00cc5e90192a1f..240db04ba023457f0e969a1a201815c7bb16ebc8 100644 --- a/fs/vfs/Makefile +++ b/fs/vfs/Makefile @@ -95,19 +95,10 @@ $(LITEOSTHIRDPARTY)/NuttX/fs/driver/fs_unregisterdriver.c \ $(wildcard vfs_cmd/*.c) LOCAL_INCLUDE := \ - -I $(LITEOSTOPDIR)/fs/vfs/include \ - -I $(LITEOSTOPDIR)/fs/vfs/include/bcache\ - -I $(LITEOSTOPDIR)/drivers/block/disk/include\ -I $(LITEOSTOPDIR)/drivers/char/bch/include\ - -I $(LITEOSTOPDIR)/drivers/mtd/multi_partition/include\ - -I $(LITEOSTOPDIR)/fs/vfs/include/operation\ -I $(LITEOSTOPDIR)/syscall\ -I $(LITEOSTOPDIR)/fs/zpfs/include -ifeq ($(LOSCFG_FS_FAT), y) -LOCAL_INCLUDE += -I $(LITEOSTHIRDPARTY)/FatFs/source -endif - -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/fs/vfs/bcache/Makefile b/fs/vfs/bcache/Makefile index 0fb1100adee8b57addcd0c043f04abbde0224b82..01e51cb47066fac7f8f52afc5b00d55e981a05cf 100644 --- a/fs/vfs/bcache/Makefile +++ b/fs/vfs/bcache/Makefile @@ -33,10 +33,5 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard src/*.c) -LOCAL_INCLUDE := \ - -I $(LITEOSTHIRDPARTY)/FatFs/source - -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) - include $(MODULE) diff --git a/fs/zpfs/Makefile b/fs/zpfs/Makefile index a3339c33eadf1c2321f73d112eb7d6205dff5bed..9584e738ccfee4dabae4562ca9426a5cccbbeccc 100644 --- a/fs/zpfs/Makefile +++ b/fs/zpfs/Makefile @@ -35,6 +35,6 @@ LOCAL_SRCS := $(wildcard src/*.c) LOCAL_INCLUDE := \ -I $(LITEOSTOPDIR)/fs/zpfs/include -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/kernel/base/Makefile b/kernel/base/Makefile index d20fc22958847b6e5f788725b081abceb0f6df9f..b805e2b9c34c00570b1a9de8d7b34484fd25ce77 100644 --- a/kernel/base/Makefile +++ b/kernel/base/Makefile @@ -40,12 +40,6 @@ LOCAL_SRCS := $(wildcard ipc/*.c) $(wildcard core/*.c) $(wildcard mem/membox/*. $(wildcard sched/sched_sq/*.c) \ $(wildcard vm/*.c) -LOCAL_INCLUDE := \ - -I $(LITEOSTOPDIR)/kernel/base/include \ - -I $(LITEOSTOPDIR)/kernel/extended/include \ - -I $(LITEOSTOPDIR)/kernel/base/mem \ - -I $(LITEOSTOPDIR)/kernel/base/vm - -LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) include $(MODULE) diff --git a/kernel/common/Makefile b/kernel/common/Makefile index 0bfc44e8863105679c15111e390739783122995c..4a474095e3c160d8e331e7e26277b97753ecabd2 100644 --- a/kernel/common/Makefile +++ b/kernel/common/Makefile @@ -41,6 +41,6 @@ ifneq ($(LOSCFG_FS_VFS), y) LOCAL_SRCS := $(filter-out console.c virtual_serial.c, $(LOCAL_SRCS)) endif -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/kernel/extended/blackbox/Makefile b/kernel/extended/blackbox/Makefile index 190bcb425e0af41dc5f12f10af03a31c165354c5..cc7a3cc4bcf173db56a7d0fcbc295a66e468acef 100644 --- a/kernel/extended/blackbox/Makefile +++ b/kernel/extended/blackbox/Makefile @@ -4,12 +4,8 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard *.c) -LOCAL_INCLUDE := \ - -I $(LITEOSTOPDIR)/kernel/common \ - -I $(LITEOSTOPDIR)/kernel/common/blackbox \ - -I $(LITEOSTOPDIR)/syscall \ - -I $(LITEOSTOPDIR)/kernel/base/include +LOCAL_INCLUDE := -I $(LITEOSTOPDIR)/syscall -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/kernel/extended/cppsupport/Makefile b/kernel/extended/cppsupport/Makefile index 826bd05a286e7915fe856748ef55451a6802232e..7d3a2662d9d67a10db6ffad92fb6e0e9aabf0e2e 100644 --- a/kernel/extended/cppsupport/Makefile +++ b/kernel/extended/cppsupport/Makefile @@ -35,9 +35,6 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard *.c) -LOCAL_INCLUDE := \ - -I $(LITEOSTOPDIR)/kernel/base/include -I $(LITEOSTOPDIR)/kernel/extended/include - -LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) include $(MODULE) diff --git a/kernel/extended/cpup/Makefile b/kernel/extended/cpup/Makefile index 61b090299232e6244f4d2d8fa8a5df05bb7f3e8f..8d11bbf2bb3dba12ec7c85f6ffa4790e55558cd1 100644 --- a/kernel/extended/cpup/Makefile +++ b/kernel/extended/cpup/Makefile @@ -33,9 +33,4 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard *.c) -LOCAL_INCLUDE := \ - -I $(LITEOSTOPDIR)/kernel/base/include -I $(LITEOSTOPDIR)/kernel/extended/include - -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) - include $(MODULE) diff --git a/kernel/extended/dynload/Makefile b/kernel/extended/dynload/Makefile index 6d719c2c5dab6f593b2cfa9f123c0fac5a1cd152..a0ffc4d0a8d13c1fbc97ba8a6f24f2264e1e4c58 100644 --- a/kernel/extended/dynload/Makefile +++ b/kernel/extended/dynload/Makefile @@ -33,10 +33,6 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard src/*.c) -LOCAL_INCLUDE := \ - -I $(LITEOSTOPDIR)/kernel/base/include \ - -I $(LITEOSTOPDIR)/fs/include - -LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) include $(MODULE) diff --git a/kernel/extended/hidumper/Makefile b/kernel/extended/hidumper/Makefile index 230c1d8a795949c48d2348041d1b7b287a066428..eab29ad31bc8fe8a60fc01e9e5e97816731b5977 100644 --- a/kernel/extended/hidumper/Makefile +++ b/kernel/extended/hidumper/Makefile @@ -4,10 +4,4 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard *.c) -LOCAL_INCLUDE := \ - -I $(LITEOSTOPDIR)/kernel/common \ - -I $(LITEOSTOPDIR)/kernel/common/hidumper \ - -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) - include $(MODULE) diff --git a/kernel/extended/hilog/Makefile b/kernel/extended/hilog/Makefile index eef9b37aa4dc93c4ae834e254f1a6a2ca9870710..1ae10896f960a77d43661598e1f424bc053a39d3 100644 --- a/kernel/extended/hilog/Makefile +++ b/kernel/extended/hilog/Makefile @@ -33,8 +33,6 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard *.c) -LOCAL_INCLUDE := -I $(LITEOSTOPDIR)/kernel/base/include - -LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) include $(MODULE) diff --git a/kernel/extended/liteipc/Makefile b/kernel/extended/liteipc/Makefile index 3af1a5049a33b748fc1c4bddacfabe74c3d6e36d..f94e8b8c227314d8f51bee5572d6b7111098d566 100644 --- a/kernel/extended/liteipc/Makefile +++ b/kernel/extended/liteipc/Makefile @@ -30,8 +30,6 @@ include $(LITEOSTOPDIR)/config.mk MODULE_NAME := $(notdir $(shell pwd)) -ifeq ($(LOSCFG_KERNEL_LITEIPC), y) - LOCAL_SRCS += $(wildcard ./*.c) -endif +LOCAL_SRCS := $(wildcard ./*.c) include $(MODULE) diff --git a/kernel/extended/pipes b/kernel/extended/pipes deleted file mode 120000 index 9ab05035dfd43f0f18258aaefd97c7e9f50481e8..0000000000000000000000000000000000000000 --- a/kernel/extended/pipes +++ /dev/null @@ -1 +0,0 @@ -../../../../third_party/NuttX/drivers/pipes \ No newline at end of file diff --git a/kernel/extended/pipes/BUILD.gn b/kernel/extended/pipes/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..85058ea003412e4d5a23ffdd4435f88e060a2cc1 --- /dev/null +++ b/kernel/extended/pipes/BUILD.gn @@ -0,0 +1,46 @@ +# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. +# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this list of +# conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, this list +# of conditions and the following disclaimer in the documentation and/or other materials +# provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its contributors may be used +# to endorse or promote products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import("//kernel/liteos_a/liteos.gni") + +module_switch = defined(LOSCFG_KERNEL_PIPE) +module_name = get_path_info(rebase_path("."), "name") +kernel_module(module_name) { + sources = [ + "//third_party/NuttX/drivers/pipes/fifo.c", + "//third_party/NuttX/drivers/pipes/pipe.c", + "//third_party/NuttX/drivers/pipes/pipe_common.c", + ] + + public_configs = [ ":public" ] +} + +config("public") { + include_dirs = [ "//third_party/NuttX/drivers/pipes" ] +} diff --git a/kernel/extended/pipes/Makefile b/kernel/extended/pipes/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..72b274bd6597726bb46b95f3c8a9174f3e15688d --- /dev/null +++ b/kernel/extended/pipes/Makefile @@ -0,0 +1,37 @@ +# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved. +# Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this list of +# conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, this list +# of conditions and the following disclaimer in the documentation and/or other materials +# provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its contributors may be used +# to endorse or promote products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +include $(LITEOSTOPDIR)/config.mk + +MODULE_NAME := $(notdir $(shell pwd)) + +LOCAL_DIR := $(LITEOSTOPDIR)/../../third_party/NuttX/drivers/pipes + +LOCAL_SRCS := $(wildcard $(LOCAL_DIR)/*.c) + +include $(MODULE) diff --git a/kernel/extended/power/Makefile b/kernel/extended/power/Makefile index eb849846a68f68d2214c914dbf018c7d4ca303ae..8d11bbf2bb3dba12ec7c85f6ffa4790e55558cd1 100644 --- a/kernel/extended/power/Makefile +++ b/kernel/extended/power/Makefile @@ -33,10 +33,4 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard *.c) -LOCAL_INCLUDE := -I $(LITEOSTOPDIR)/kernel/base/include \ - -I $(LITEOSTOPDIR)/kernel/extended/include \ - -I $(LITEOSTOPDIR)/arch/arm/include - -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) - include $(MODULE) diff --git a/kernel/extended/trace/Makefile b/kernel/extended/trace/Makefile index 2fe469d89f2b3626c464bf1afcf2ff3b737e750d..68fa83154973ed9fcc6107b75fa785a8a6fc3b75 100644 --- a/kernel/extended/trace/Makefile +++ b/kernel/extended/trace/Makefile @@ -56,7 +56,7 @@ LOCAL_SRCS += $(wildcard pipeline/serial/*.c) LOCAL_INCLUDE += -I $(LITEOSTOPDIR)/kernel/extended/trace/pipeline/serial endif -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/kernel/extended/vdso/src/Makefile b/kernel/extended/vdso/src/Makefile index eacf8d243fe525cfdcdbf3a99c7199ee7fef4cdd..ee2c229dd27dd10aa9a1e15cd905e6abdfe99a36 100644 --- a/kernel/extended/vdso/src/Makefile +++ b/kernel/extended/vdso/src/Makefile @@ -33,8 +33,6 @@ MODULE_NAME := $(notdir $(shell pwd)/../vdso) LOCAL_SRCS := $(wildcard *.c) $(wildcard *.S) -LOCAL_INCLUDE := -I $(LITEOSTOPDIR)/kernel/base/include -I ../include - -LOCAL_FLAGS := $(LOCAL_INCLUDE) -DOHOS_VDSO_SO=\"$(OUT)/lib/OHOS-vdso.so\" +LOCAL_FLAGS := -DOHOS_VDSO_SO=\"$(OUT)/lib/OHOS-vdso.so\" include $(MODULE) \ No newline at end of file diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 7671a46aa8ce1b578df9ebd0a02e6a60de9c9256..562d957b0cf2ef5d8b987506d41c5d52cf81647c 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -49,12 +49,11 @@ endif LOCAL_INCLUDE := \ -I $(LITEOSTOPDIR)/syscall \ - -I $(LITEOSTOPDIR)/bsd/dev/random \ - -I $(LITEOSTOPDIR)/bsd/compat/linuxkpi/include + -I $(LITEOSTOPDIR)/bsd/dev/random LOCAL_INCLUDE += $(addprefix -I$(MUSLPORTINGDIR)/, src/include src/internal) -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) $(LOCAL_CMACRO) +LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LOCAL_CMACRO) ifeq ($(LOSCFG_COMPILER_CLANG_LLVM), y) LOCAL_FLAGS +=-Wno-char-subscripts -Wno-unknown-pragmas else diff --git a/lib/libscrew/Makefile b/lib/libscrew/Makefile index 4f0f70a5837d796cc4d562be509321bf8bf57aba..a9d14d086f896027779550bee86c020ba1d9d45a 100644 --- a/lib/libscrew/Makefile +++ b/lib/libscrew/Makefile @@ -6,10 +6,4 @@ LOCAL_SRCS := \ $(wildcard src/*.c) \ $(LITEOSTOPDIR)/../../third_party/FreeBSD/sys/libkern/crc32.c -LOCAL_INCLUDE := \ - -I $(LITEOSTOPDIR)/kernel/include \ - -I $(LITEOSTOPDIR)/lib/libscrew/include \ - -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) - include $(MODULE) diff --git a/security/Makefile b/security/Makefile index a300fb8922968fd4c4bc00fc5e86ca3036819018..e17501e98cc44af7d78ff770ebf9352729f47852 100644 --- a/security/Makefile +++ b/security/Makefile @@ -43,6 +43,6 @@ LOCAL_SRCS += $(wildcard vid/*.c) LOCAL_INCLUDE += -I $(LITEOSTOPDIR)/security/vid endif -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/security/cap/Makefile b/security/cap/Makefile index a32f48af769aab1f2131474486b4ec3e40523a97..8d11bbf2bb3dba12ec7c85f6ffa4790e55558cd1 100644 --- a/security/cap/Makefile +++ b/security/cap/Makefile @@ -33,9 +33,4 @@ MODULE_NAME := $(notdir $(shell pwd)) LOCAL_SRCS := $(wildcard *.c) -LOCAL_INCLUDE := \ - -I $(LITEOSTOPDIR)/security/cap - -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) - include $(MODULE) diff --git a/shell/Makefile b/shell/Makefile index d49850a13b6de25d1c815bc03c8b30ed401fac24..c5cd6a3d661cc27d5470d91a84034af5f4d8a69b 100644 --- a/shell/Makefile +++ b/shell/Makefile @@ -35,13 +35,10 @@ ifeq ($(LOSCFG_SHELL), y) LOCAL_SRCS := $(wildcard full/src/base/*.c) $(wildcard full/src/cmds/*.c) LOCAL_INCLUDE := \ -I $(LITEOSTOPDIR)/fs/nfs \ - -I $(LITEOSTOPDIR)/shell/full/include \ - -I $(LITEOSTOPDIR)/fs/ramfs \ - -I $(LITEOSTOPDIR)/fs/fat \ - -I $(LITEOSTOPDIR)/kernel/base/include \ + -I $(LITEOSTOPDIR)/fs/ramfs endif -LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS) +LOCAL_FLAGS := $(LOCAL_INCLUDE) include $(MODULE) diff --git a/syscall/Makefile b/syscall/Makefile index d4dc0c72999195f9226bab201a5f7375d18357c7..cf93130d393782500e6f9e7088d340c88aef1d3e 100644 --- a/syscall/Makefile +++ b/syscall/Makefile @@ -37,10 +37,4 @@ ifneq ($(LOSCFG_NET_LWIP_SACK), y) LOCAL_SRCS := $(filter-out net_syscall.c, $(LOCAL_SRCS)) endif -LOCAL_INCLUDE := -I $(LITEOSTOPDIR)/kernel/base/include \ - -I $(LITEOSTOPDIR)/kernel/extended/dynload/include \ - -I $(LITEOSTOPDIR)/fs/include \ - -I $(LITEOSTOPDIR)/compat/posix/include \ - -I $(LITEOSTOPDIR)/bsd/compat/linuxkpi/include \ - -I $(LITEOSTOPDIR)/../../third_party/musl/kernel/include include $(MODULE) diff --git a/tools/build/mk/los_config.mk b/tools/build/mk/los_config.mk index 13306c66fa352826fd328c25cda26dcd54b47eba..b9bad187b64adb810e720c5ae239b0ff1d71a10c 100644 --- a/tools/build/mk/los_config.mk +++ b/tools/build/mk/los_config.mk @@ -166,7 +166,7 @@ endif ifeq ($(LOSCFG_KERNEL_PIPE), y) LITEOS_BASELIB += -lpipes LIB_SUBDIRS += kernel/extended/pipes - LITEOS_PIPE_INCLUDE += -I $(LITEOSTOPDIR)/kernel/extended/pipes + LITEOS_PIPE_INCLUDE += -I $(LITEOSTOPDIR)/../../third_party/NuttX/drivers/pipes endif ifeq ($(LOSCFG_KERNEL_PM), y) @@ -241,7 +241,6 @@ endif -I $(LITEOSTOPDIR)/fs/vfs/include LITEOS_VFS_INCLUDE += -I $(LITEOSTOPDIR)/fs/vfs/include/operation LITEOS_VFS_MTD_INCLUDE := -I $(LITEOSTOPDIR)/drivers/mtd/multi_partition/include - LITEOS_VFS_DISK_INCLUDE := -I $(LITEOSTOPDIR)/drivers/block/disk/include endif ifeq ($(LOSCFG_FS_FAT), y) @@ -259,6 +258,7 @@ endif ifeq ($(LOSCFG_FS_FAT_DISK), y) LITEOS_BASELIB += -ldisk LIB_SUBDIRS += $(LITEOSTOPDIR)/drivers/block/disk + LITEOS_VFS_DISK_INCLUDE := -I $(LITEOSTOPDIR)/drivers/block/disk/include endif ifeq ($(LOSCFG_FS_FAT_CACHE), y)