Skip to content

Commit 64e3e1f

Browse files
julek-wolfssldgarske
authored andcommitted
Makefile: Add library_fs target and improve clean rules
- Update build rules for test-lib and lib-fs. - Improve clean rule to remove test-lib and lib-fs binaries.
1 parent 326b46e commit 64e3e1f

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ endif
161161

162162
ifeq ($(TARGET),library)
163163
CFLAGS+=-g
164-
MAIN_TARGET:=libwolfboot.a
164+
MAIN_TARGET:=test-lib
165+
endif
166+
167+
ifeq ($(TARGET),library_fs)
168+
MAIN_TARGET:=lib-fs
165169
endif
166170

167171
ifeq ($(TARGET),raspi3)
@@ -214,9 +218,9 @@ test-lib: libwolfboot.a hal/library.o
214218
@echo "\t[BIN] $@"
215219
$(Q)$(CC) $(CFLAGS) -o $@ hal/library.o libwolfboot.a
216220

217-
lib-fs: libwolfboot.a hal/library.o
221+
lib-fs: libwolfboot.a hal/library_fs.o
218222
@echo "\t[BIN] $@"
219-
$(Q)$(CC) $(CFLAGS) -o hal/library.o libwolfboot.a
223+
$(Q)$(CC) $(CFLAGS) -o $@ hal/library_fs.o libwolfboot.a
220224

221225
wolfboot.efi: wolfboot.elf
222226
@echo "\t[BIN] $@"
@@ -444,6 +448,8 @@ clean:
444448
$(Q)rm -f tools/keytools/otp/otp-keystore-gen
445449
$(Q)rm -f .stack_usage
446450
$(Q)rm -f $(WH_NVM_BIN) $(WH_NVM_HEX)
451+
$(Q)rm -f test-lib
452+
$(Q)rm -f lib-fs
447453
$(Q)$(MAKE) -C test-app clean V=$(V)
448454
$(Q)$(MAKE) -C tools/check_config -s clean
449455
$(Q)$(MAKE) -C stage1 -s clean

0 commit comments

Comments
 (0)