aboutsummaryrefslogtreecommitdiff
path: root/projects/hsm/Makefile
blob: a7b0e8215e1afc567ae07b8a47e8ac6d966c3ff1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.
PROJ = hsm

SRCS = main.c

OBJS = $(SRCS:.c=.o)

CFLAGS += -I $(LIBHAL_DIR)

LIBS += $(LIBHAL_DIR)/libhal.a $(LIBTFM_DIR)/libtfm.a

all: $(PROJ:=.elf)

$(PROJ).elf: $(OBJS) $(BOARD_OBJS) $(LIBS)
	$(CC) $(CFLAGS) $^ -o $@ -T$(LDSCRIPT) -g -Wl,-Map=$(PROJ).map
	$(OBJCOPY) -O ihex $(PROJ).elf $(PROJ).hex
	$(OBJCOPY) -O binary $(PROJ).elf $(PROJ).bin
	$(SIZE) $(PROJ).elf

clean:
	rm -f *.o
	rm -f *.elf
	rm -f *.hex
	rm -f *.bin
	rm -f *.map