1b0104773SPascal BrandSHELL = /bin/bash 2b0104773SPascal Brand 3b0104773SPascal Brand.PHONY: all 4b0104773SPascal Brandall: 5b0104773SPascal Brand 629f1a45dSJens Wiklander.PHONY: mem_usage 729f1a45dSJens Wiklandermem_usage: 829f1a45dSJens Wiklander 9*71767a5cSJerome Forissier# If $(PLATFORM) is defined and contains a hyphen, parse it as 10*71767a5cSJerome Forissier# $(PLATFORM)-$(PLATFORM_FLAVOR) for convenience 11*71767a5cSJerome Forissierifneq (,$(findstring -,$(PLATFORM))) 12*71767a5cSJerome Forissierops := $(join PLATFORM PLATFORM_FLAVOR,$(addprefix =,$(subst -, ,$(PLATFORM)))) 13*71767a5cSJerome Forissier$(foreach op,$(ops),$(eval override $(op))) 14*71767a5cSJerome Forissierendif 15*71767a5cSJerome Forissier 16b0104773SPascal Brand# Make these default for now 17b0104773SPascal BrandARCH ?= arm32 1892542a71SPascal BrandPLATFORM ?= stm 19b0104773SPascal BrandO ?= out/$(ARCH)-plat-$(PLATFORM) 20b0104773SPascal Brand 21b0104773SPascal Brandarch_$(ARCH) := y 22b0104773SPascal Brand 23b0104773SPascal Brandifneq ($O,) 244334e8d7SJerome Forissierout-dir := $O 25b0104773SPascal Brandendif 26b0104773SPascal Brand 27b0104773SPascal Brandifneq ($V,1) 28b0104773SPascal Brandq := @ 29b0104773SPascal Brandcmd-echo := true 30b0104773SPascal Brandelse 31b0104773SPascal Brandq := 32b0104773SPascal Brandcmd-echo := echo 33b0104773SPascal Brandendif 34b0104773SPascal Brand 35b0104773SPascal Brandinclude core/core.mk 36b0104773SPascal Brand 37b0104773SPascal Brandinclude ta/ta.mk 38b0104773SPascal Brand 39b0104773SPascal Brand.PHONY: clean 40b0104773SPascal Brandclean: 410047cb63SJerome Forissier @echo ' CLEAN .' 42b0104773SPascal Brand ${q}rm -f $(cleanfiles) 43b0104773SPascal Brand 44b0104773SPascal Brand.PHONY: cscope 45b0104773SPascal Brandcscope: 460047cb63SJerome Forissier @echo ' CSCOPE .' 47b0104773SPascal Brand ${q}rm -f cscope.* 48b0104773SPascal Brand ${q}find $(PWD) -name "*.[chSs]" > cscope.files 49b0104773SPascal Brand ${q}cscope -b -q -k 50