DIR_BASENAME = $(notdir $(CWD)) ifeq ($(EXE_BASENAME),) ifneq ($(DIR_BASENAME),test) EXE_BASENAME = $(EXE_BASENAME_PREFIX)$(DIR_BASENAME).elf else EXE_BASENAME = $(EXE_BASENAME_PREFIX)test-$(notdir $(shell cd ..; $(PWD))).elf endif endif MCU_FLASH_PUSH_FILE_HEX ?= $(patsubst %.elf,%.hex,$(EXE_BASENAME)) EXE_MAP ?= $(patsubst %.elf,%.map,$(EXE_BASENAME)) # I think these (or something equivalent) should go somewhere here. Not cleaned # up enough in modm builds to do it. #include $(JWBDIR)/make/defs.mk #include $(JWBDIR)/make/defs-cpp.mk include $(JWBDIR)/make/mcu-defs.mk include $(JWBDIR)/make/exe.mk include $(JWBDIR)/make/mcu-flash.mk all: $(MCU_FLASH_PUSH_FILE_HEX) clean: mcu-exe.clean mcu-exe.clean: rm -f $(EXE_MAP)