File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,11 @@ OBJS:= \
3434 ./src/string.o \
3535 ./src/image.o \
3636 ./src/libwolfboot.o \
37- ./hal/hal.o \
38- ./hal/$(TARGET ) .o
37+ ./hal/hal.o
38+
39+ ifneq ($(TARGET ) ,library)
40+ OBJS+=./hal/$(TARGET).o
41+ endif
3942
4043ifeq ($(SIGN ) ,NONE)
4144 PRIVATE_KEY =
@@ -171,12 +174,14 @@ stage1/loader_stage1.bin: FORCE
171174 @echo " \t[BIN] $@ "
172175 $(Q )$(MAKE ) -C $(dir $@ ) $(notdir $@ )
173176
174- test-lib : include/target.h $(OBJS )
175- $(Q )$(CC ) $(CFLAGS ) -o $@ $(OBJS )
176-
177- libwolfboot.a : $(OBJS )
177+ libwolfboot.a : include/target.h $(OBJS )
178+ @echo " \t[LIB] $@ "
178179 $(Q )$(AR ) rcs $@ $(OBJS )
179180
181+ test-lib : hal/library.o libwolfboot.a
182+ @echo " \t[BIN] $@ "
183+ $(Q )$(CC ) $(CFLAGS ) -o $@ $^
184+
180185wolfboot.efi : wolfboot.elf
181186 @echo " \t[BIN] $@ "
182187 $(Q )$(OBJCOPY ) -j .rodata -j .text -j .sdata -j .data \
@@ -447,11 +452,11 @@ tools/keytools/otp/otp-keystore-primer.bin: FORCE
447452secondary : $(SECONDARY_PRIVATE_KEY )
448453
449454% .o :% .c
450- @echo " \t[CC- $( ARCH) ] $@ "
455+ @echo " \t[CC $( ARCH) ] $@ "
451456 $(Q )$(CC ) $(CFLAGS ) -c $(OUTPUT_FLAG ) $@ $^
452457
453458% .o :% .S
454- @echo " \t[AS- $( ARCH) ] $@ "
459+ @echo " \t[AS $( ARCH) ] $@ "
455460 $(Q )$(CC ) $(CFLAGS ) -c $(OUTPUT_FLAG ) $@ $^
456461
457462src/x86/fsp_s.o : $(FSP_S_BIN )
You can’t perform that action at this time.
0 commit comments