1 2TARGET_TOOLCHAIN_ROOT := /home/yaire/CEVA-ToolBox/V18.05/BX/ 3 4CC = ${TARGET_TOOLCHAIN_ROOT}/cevatools/bin/clang 5CXX = ${TARGET_TOOLCHAIN_ROOT}/cevatools/bin/clang++ 6LD = ${TARGET_TOOLCHAIN_ROOT}/cevatools/bin/ceva-elf-ld 7AS = ${TARGET_TOOLCHAIN_ROOT}/cevatools/bin/ceva-elf-as 8TOOLS_OBJS := \ 9${TARGET_TOOLCHAIN_ROOT}/cevatools/lib/clang/9.0.1/cevabx1-unknown-unknown-elf/rtlv1.0.0-fp1-dpfp1/lib/crt0.o ${TARGET_TOOLCHAIN_ROOT}/cevatools/lib/clang/9.0.1/cevabx1-unknown-unknown-elf/rtlv1.0.0-fp1-dpfp1/lib/crtn.o 10 11TOOLS_LIBS := \ 12-lc++ -lc++abi -lc -lcompiler-rt 13 14 LDFLAGS += \ 15 -T \ 16 ../../../../../targets/ceva/CEVA_BX1_TFLM_18.0.5.ld \ 17 --no-relax \ 18 --no-gc-sections \ 19 -defsym \ 20 __internal_data_size=512k \ 21 -defsym \ 22 __internal_code_size=256k \ 23 -L${TARGET_TOOLCHAIN_ROOT}cevatools/lib/clang/9.0.1/cevabx1-unknown-unknown-elf/rtlv1.0.0-fp1-dpfp1/lib/ \ 24 -lc++ -lc++abi -lc -lcompiler-rt -lCEVA_TFLM_lib -lceva_dsp_lib 25 26 27OUT_NAME = %{EXECUTABLE}% 28 29CXXFLAGS += %{CXX_FLAGS}% 30CCFLAGS += %{CC_FLAGS}% 31 32#============================================================= 33# Files and directories 34#============================================================= 35SRCS := \ 36%{SRCS}% 37 38OBJS := \ 39$(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(SRCS))) 40 41 42#============================================================= 43# Common rules 44#============================================================= 45.PHONY: all app flash clean run debug 46 47%.o: %.cc 48 $(CXX) $(CXXFLAGS) $(EXT_CFLAGS) $(INCLUDES) -c $< -o $@ 49 50%.o: %.c 51 $(CC) $(CCFLAGS) $(EXT_CFLAGS) $(INCLUDES) -c $< -o $@ 52 53$(OUT_NAME): $(OBJS) 54 $(LD) -o $@ $(OBJS) $(TOOLS_OBJS) ${TOOLS_LIBS} $(LDFLAGS) 55 56 57 58#================================================================= 59# Global rules 60#================================================================= 61all: $(OUT_NAME) 62 63app: $(OUT_NAME) 64 65clean: 66 -@$(RM) $(call fix_platform_path,$(OBJS)) 67 -@$(RM) $(OUT_NAME) %{EXTRA_RM_TARGETS}% 68 69 70