jw-pkg/make/mcu-exe.mk
Jan Lindemann b2d6e6f554 Everywhere: Rename MODDIR -> JWBDIR
Rename the omnipresent MODDIR variable to JWBDIR, since that's more to the
point.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-29 21:34:18 +00:00

28 lines
813 B
Makefile

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)