build env
authorThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Fri, 17 Oct 2025 06:40:03 +0000 (06:40 +0000)
committerThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Fri, 17 Oct 2025 06:40:03 +0000 (06:40 +0000)
developer/make/target_kmod.mk
developer/make/target_lib_cli.mk

index ee6e194..2a77560 100644 (file)
@@ -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 $< $@
 
index 06032cf..2401fe2 100644 (file)
@@ -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