aboutsummaryrefslogtreecommitdiff
path: root/projects/hsm/Makefile
blob: f5546d8cb023509e83272154a1c3c525ab19666a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 binary $(PROJ).elf $(PROJ).bin
	$(SIZE) $(PROJ).elf

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