目的
将新增加的文件( * .c,* .cpp, * .h)通过Makefile追加至“Z3Gateway.Makefile”,使用工程定义规则编译。
1. 环境
SDK: gecko_sdk_4.0.2
IDE: Simplicity Studio v5
2. BasePath
设定 BasePath=msming 即可递归msming下的所有子目录。
####################################################################
# Module Makefile #
####################################################################
# 目录/文件, cfile/src/a.c
#FilePath = $(abspath $(lastword $(MAKEFILE_LIST)))
# 目录/, cfile/src/
#FileDir = $(dir $(FilePath))
# 文件, a.c
#FileName = $(notdir $(FilePath))
#$(info FilePath: $(FilePath))
#$(info FileDir: $(FileDir))
#$(info FileName: $(FileName))
#WorkDir = $(shell pwd)
####################################################################
#子模块名称
BasePath = msming
#包含BasePath的路经,最大10层
SourcePaths := $(shell find $(BasePath) -maxdepth 10 -type d)