@@ -26,10 +26,10 @@ SIGN_ALG=
2626OBJCOPY_FLAGS =
2727
2828OBJS: = \
29- ./hal/$(TARGET ) .o \
3029 ./src/string.o \
3130 ./src/image.o \
32- ./src/libwolfboot.o
31+ ./src/libwolfboot.o \
32+ ./hal/$(TARGET ) .o
3333
3434ifeq ($(SIGN ) ,NONE)
3535 PRIVATE_KEY =
@@ -85,50 +85,50 @@ TARGET_H_TEMPLATE:=include/target.h.in
8585ifeq ($(TZEN ) ,1)
8686ifeq ($(TARGET ) ,stm32l5)
8787 # Don't build a contiguous image
88- MAIN_TARGET:=wolfboot.bin test-app/image_v1_signed.bin
88+ MAIN_TARGET: =wolfboot.bin test-app/image_v1_signed.bin
8989endif
9090
9191ifeq ($(TARGET ) ,stm32u5)
9292 # Don't build a contiguous image
93- MAIN_TARGET:=wolfboot.bin test-app/image_v1_signed.bin
93+ MAIN_TARGET: =wolfboot.bin test-app/image_v1_signed.bin
9494endif
9595
9696ifeq ($(TARGET ) ,stm32h5)
9797 # Don't build a contiguous image
98- MAIN_TARGET:=wolfboot.bin test-app/image_v1_signed.bin
98+ MAIN_TARGET: =wolfboot.bin test-app/image_v1_signed.bin
9999endif
100100endif # TZEN=1
101101
102102ifeq ($(TARGET ) ,x86_64_efi)
103- MAIN_TARGET:=wolfboot.efi
103+ MAIN_TARGET: =wolfboot.efi
104104endif
105105
106106ifeq ($(FSP ) , 1)
107- MAIN_TARGET:=wolfboot_stage1.bin
107+ MAIN_TARGET: =wolfboot_stage1.bin
108108endif
109109
110110ifeq ($(TARGET ) ,library)
111- CFLAGS+=-g
112- MAIN_TARGET:=test-lib
111+ CFLAGS+ =-g
112+ MAIN_TARGET: =test-lib
113113endif
114114
115115ifeq ($(TARGET ) ,raspi3)
116- MAIN_TARGET:=wolfboot.bin
116+ MAIN_TARGET: =wolfboot.bin
117117endif
118118
119119ifeq ($(TARGET ) ,sim)
120- MAIN_TARGET:=wolfboot.bin tools/bin-assemble/bin-assemble test-app/image_v1_signed.bin internal_flash.dd
120+ MAIN_TARGET: =wolfboot.bin tools/bin-assemble/bin-assemble test-app/image_v1_signed.bin internal_flash.dd
121121endif
122122
123123ifeq ($(TARGET ) ,nxp_p1021)
124- MAIN_TARGET:=factory_wstage1.bin
124+ MAIN_TARGET: =factory_wstage1.bin
125125endif
126126ifeq ($(TARGET ) ,nxp_t1024)
127- MAIN_TARGET:=factory_wstage1.bin
127+ MAIN_TARGET: =factory_wstage1.bin
128128endif
129129
130130ifeq ($(FLASH_OTP_KEYSTORE ) ,1)
131- MAIN_TARGET:=include/target.h tools/keytools/otp/otp-keystore-primer factory .bin
131+ MAIN_TARGET+ = tools/keytools/otp/otp-keystore-primer.bin
132132endif
133133
134134ASFLAGS: =$(CFLAGS )
@@ -177,11 +177,14 @@ standalone:
177177 $(Q)$(OBJCOPY) $(OBJCOPY_FLAGS) -O binary test-app/image.elf standalone.bin
178178 $(Q)$(SIZE) test-app/image.elf
179179
180+
180181include tools/test.mk
181182include tools/test-enc.mk
182183include tools/test-delta.mk
183184include tools/test-renode.mk
184185
186+ hal/$(TARGET ) .o :
187+
185188keytools_check : keytools FORCE
186189
187190$(PRIVATE_KEY ) :
@@ -367,7 +370,7 @@ cppcheck:
367370 --suppress=" objectIndex" --suppress=" comparePointers" \
368371 --error-exitcode=89 --std=c89 src/* .c hal/* .c hal/spi/* .c hal/uart/* .c
369372
370- otp : tools/keytools/otp/otp-keystore-primer.bin
373+ otp : tools/keytools/otp/otp-keystore-primer.bin FORCE
371374
372375tools/keytools/otp/otp-keystore-primer.bin : FORCE
373376 make -C tools/keytools/otp clean
0 commit comments