vbos/scripts/Makefile.build
Michael Shaw 552f45c258 config initial test
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
2026-04-12 08:45:35 -04:00

30 lines
698 B
INI

# SPDX-License-Identifier: GPL-2.0-only
# kernel makefile
-include .config
include $(obj)Makefile
# 1. Filter subdirectories (items ending in /) from files
subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y)))
real-objs-y := $(filter-out %/, $(obj-y))
# 2. Target to build everything in this directory
__build: $(subdir-y) $(real-objs-y)
@echo " Built-in $(obj)"
# 3. Rule to descend into subdirectories
$(subdir-y):
@$(MAKE) -f scripts/Makefile.build obj=$(obj)$@/
# 4. Standard rule to compile .c files to .o
%.o: %.c
@echo " CC $(obj)$@"
@$(CC) $(CFLAGS) -c $< -o $(obj)$@
%.o: %.S
@echo " CC $(obj)$@"
@$(CC) $(CFLAGS) -c $< -o $(obj)$@
.PHONY: __build $(subdir-y)