From: Thomas Walker Lynch Date: Fri, 17 Oct 2025 06:40:03 +0000 (+0000) Subject: build env X-Git-Url: https://git.reasoningtechnology.com/fossil/%7Bstyle.link%7D?a=commitdiff_plain;h=6e95334e81e96310351cc34a91aa1affcdbac7b4;p=RT-project-share build env --- diff --git a/developer/make/target_kmod.mk b/developer/make/target_kmod.mk index ee6e194..2a77560 100644 --- a/developer/make/target_kmod.mk +++ b/developer/make/target_kmod.mk @@ -6,7 +6,7 @@ SOURCE_DIR := cc BUILD_DIR := /lib/modules/$(shell uname -r)/build OUTPUT_DIR := scratchpad/kmod -# authored module basenames (without .mod.c) +# authored module basenames (without .kmod.c) BASE_LIST := $(patsubst %.kmod.c,%,$(notdir $(wildcard cc/*.kmod.c))) # paths in scratchpad/kmod @@ -41,8 +41,8 @@ _prepare: @mkdir -p $(OUTPUT_DIR) @printf "obj-m := %s\n" "$(foreach m,$(BASE_LIST),$(m).o)" > $(OUTPUT_DIR)/Makefile -# copy authored .mod.c → scratchpad/kmod/*.c (Kbuild expects sources under M) -$(OUTPUT_DIR)/%.c: $(SOURCE_DIR)/%.mod.c | _prepare +# copy authored .kmod.c → scratchpad/kmod/*.c (Kbuild expects sources under M) +$(OUTPUT_DIR)/%.c: $(SOURCE_DIR)/%.kmod.c | _prepare @echo "--- Preparing Kbuild Source: $@ ---" cp $< $@ diff --git a/developer/make/target_lib_cli.mk b/developer/make/target_lib_cli.mk index 06032cf..2401fe2 100644 --- a/developer/make/target_lib_cli.mk +++ b/developer/make/target_lib_cli.mk @@ -8,7 +8,7 @@ # bail early if there is no compiler ifeq ($(C),) - $(error No C compiler specified.) + $(error target_lib_cli.mk: no C compiler specified.) endif # keep only the source directories that are in the file system @@ -16,7 +16,8 @@ SRCDIR_LIST := $(wildcard $(SRCDIR_LIST)) # bail early if the SRCDIR_list is empty ifeq ($(SRCDIR_LIST),) - exit + @printf "target_lib_cli.mk: empty SRCDIR_LIST" + exit 0 endif # duplicate source file names in different directories will cause