Makefile 1.4 KB
Newer Older
W
wenjun 已提交
1 2 3 4
include $(LITEOSTOPDIR)/config.mk

MODULE_NAME := c

5 6 7 8 9
ARCH = arm
TOPDIR = $(LITEOSTOPDIR)/../..
MUSLDIR = $(TOPDIR)/third_party/musl
MUSLPORTINGDIR = $(MUSLDIR)/porting/liteos_a/kernel
OPTRTDIR = $(TOPDIR)/third_party/optimized-routines
W
wenjun 已提交
10

11
MUSL_SRCS =
M
mamingshuai 已提交
12

13 14 15
MUSLPORTING_SRCS = \
	src/*/$(ARCH)/*.[csS] \
	src/*/*.c
M
mamingshuai 已提交
16

17 18
LOCAL_SRCS = $(wildcard $(addprefix $(MUSLPORTINGDIR)/,$(MUSLPORTING_SRCS)))
LOCAL_SRCS := $(filter-out $(subst $(MUSLPORTINGDIR),$(MUSLDIR),$(LOCAL_SRCS)),$(addprefix $(MUSLDIR)/,$(MUSL_SRCS)) $(LOCAL_SRCS))
M
mamingshuai 已提交
19 20

ifeq ($(LOSCFG_ARCH_ARM_VER), "armv7-a")
21 22 23 24 25 26 27
LOCAL_SRCS := $(filter-out $(addprefix $(MUSLDIR)/src/string/,memchr.c memcpy.c strcmp.c strcpy.c strlen.c), $(LOCAL_SRCS))
LOCAL_SRCS += \
	$(OPTRTDIR)/string/arm/memchr.S \
	$(OPTRTDIR)/string/arm/memcpy.S \
	$(OPTRTDIR)/string/arm/strcmp.S \
	$(OPTRTDIR)/string/arm/strcpy.c \
	$(OPTRTDIR)/string/arm/strlen-armv6t2.S
M
mamingshuai 已提交
28
endif
W
wenjun 已提交
29

30 31
LOCAL_SRCS += $(wildcard src/*.c src/*/*.c)

W
wenjun 已提交
32
LOCAL_INCLUDE := \
M
mamingshuai 已提交
33 34 35 36
	-I $(LITEOSTOPDIR)/syscall \
	-I $(LITEOSTOPDIR)/bsd/dev/random \
	-I $(LITEOSTOPDIR)/bsd/compat/linuxkpi/include

37
LOCAL_INCLUDE += $(addprefix -I$(MUSLPORTINGDIR)/, src/include src/internal)
W
wenjun 已提交
38

39
LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LITEOS_GCOV_OPTS)
W
wenjun 已提交
40 41 42 43 44 45
ifeq ($(LOSCFG_COMPILER_CLANG_LLVM), y)
LOCAL_FLAGS +=-Wno-char-subscripts -Wno-unknown-pragmas
else
LOCAL_FLAGS += -frounding-math -Wno-unused-but-set-variable -Wno-unknown-pragmas
endif

46
include $(MODULE)