YB_Platform/public/make/makefile.toolchain

49 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-07-13 11:27:03 +08:00
# ==============================================================================
# toolchain makefile
#FileName makefile.toolchain
#Author: xianfeng.du
#Data 2022-08-10
#Description: toolchain
# ==============================================================================
2023-08-23 18:09:50 +08:00
#MaPU_TC_HOME ?= /public/lixinxin/MaPUIDE/toolchain
MaPU_TC_HOME := /public/share/tools/msdk/toolchain
$(info "MaPU_TC_HOME=" $(MaPU_TC_HOME))
2023-07-13 11:27:03 +08:00
UCP_CC := $(MaPU_TC_HOME)/bin/ucp2
UCP_INC := $(MaPU_TC_HOME)/include/ucp2
UCP_LIB := $(MaPU_TC_HOME)/lib/ucp2
DEFINES ?=
ifeq ($(debug_option),yes)
C_OPT_FLAGS ?= -O0
CC_FLAGS ?= -g
else
C_OPT_FLAGS ?= -O2
endif
CC_FLAGS := $(C_OPT_FLAGS) -Wall
CC_FLAGS += -Werror
CC_FLAGS += -Wno-constant-conversion -nostdlibinc
CC_FLAGS += -MMD -MP
#CC_FLAGS += -ffunction-sections -fdata-sections
TAR_FLAGS ?= --target=ucps2
DIA_FLAGS ?=
ifeq ($(diagnostic_option),yes)
DIA_FLAGS := -mllvm --enable-ucps2-stack-diagnostic
endif
LD_FLAGS := -lm -lc -lgloss -lclang_rt.builtins-ucps2
LD_FLAGS += -lprint -lspinlock -lhwque
GC_FLAGS ?= --gc-sections
LIB_DIRS := $(UCP_LIB)/debug
INC_DIRS := $(DIR_LIB)/inc
INC_DIRS += $(UCP_INC)/newlib
INC_DIRS += $(UCP_INC)/llvm
USER_OBJS := $(UCP_LIB)/debug/crt0.o