TEST=corestest-bustest-trngtest-hashtest-aes-key-wraptest-pbkdf2test-ecdsatest-rsatest-mkmif
CFLAGS+=-I$(LIBHAL_DIR)LIBC_OBJS=printf.ogettimeofday.o
LIBS+=$(LIBHAL_DIR)/libhal.a$(LIBTFM_DIR)/libtfm.a
all:$(TEST:=.elf)vpath %.c $(LIBHAL_DIR)/tests $(LIBHAL_DIR)/utils# .mo extension for files with main() that need to be wrapped as __main()%.mo:%.c$(CC)-c$(CFLAGS)-Dmain=__main-o$@$<
%.elf:%.momain.o$(BOARD_OBJS)$(LIBC_OBJS)$(LIBS)$(CC)$(CFLAGS)$^-o$*.elf-T$(LDSCRIPT)-g-Wl,-Map=$*.map
$(OBJCOPY)-Obinary$*.elf$*.bin
$(SIZE)$*.elf
# don't automatically delete objects, to avoid a lot of unnecessary rebuilding.SECONDARY:$(BOARD_OBJS)$(LIBC_OBJS)clean:rm-f*.o*.mo
rm-f*.elf
rm-f*.bin
rm-f*.map