From 2053a8e61ca9a3d9cd040feb6e21b6f3b4782e65 Mon Sep 17 00:00:00 2001 From: Michael Cardell Widerkrantz Date: Tue, 8 Apr 2025 16:52:55 +0200 Subject: [PATCH] fw: Rename FIRMWARE_SOURCES, use globbing The symbol is only used for the check targets (with clangd and splint) and doesn't include all the source files in the firmware. Let's just use globbing instead. --- hw/application_fpga/Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/application_fpga/Makefile b/hw/application_fpga/Makefile index 6e9558e..fa715e0 100644 --- a/hw/application_fpga/Makefile +++ b/hw/application_fpga/Makefile @@ -60,6 +60,7 @@ CFLAGS = \ -Wall \ -Wpedantic \ -Wno-language-extension-token \ + -Wextra \ -flto \ -g \ -I $(LIBDIR)/include \ @@ -136,11 +137,8 @@ FIRMWARE_OBJS = \ $(P)/fw/tk1/preload_app.o \ $(P)/fw/tk1/mgmt_app.o -FIRMWARE_SOURCES = \ - $(P)/fw/tk1/main.c \ - $(P)/fw/tk1/proto.c \ - $(P)/fw/tk1/blake2s/blake2s.c \ - $(P)/fw/tk1/syscall_handler.c +CHECK_SOURCES = \ + $(P)/fw/tk1/*.[ch] TESTFW_OBJS = \ $(P)/fw/testfw/main.o \ @@ -219,7 +217,7 @@ compile_commands.json: .PHONY: check check: - clang-tidy -header-filter=.* -checks=cert-* $(FIRMWARE_SOURCES) -- $(CFLAGS) + clang-tidy -header-filter=.* -checks=cert-* $(CHECK_SOURCES) -- $(CFLAGS) .PHONY: splint splint: @@ -235,7 +233,7 @@ splint: -unreachable \ -unqualifiedtrans \ -fullinitblock \ - $(FIRMWARE_SOURCES) + $(CHECK_SOURCES) testfw.elf: tkey-libs $(TESTFW_OBJS) $(P)/fw/tk1/firmware.lds $(CC) $(CFLAGS) $(TESTFW_OBJS) $(LDFLAGS) -o $@ > $(basename $@).map