Makefile: change usr.bin build system

This commit is contained in:
Michael Shaw 2024-02-13 14:16:07 -05:00
commit e9f5935d48
4 changed files with 9 additions and 27 deletions

View file

@ -1,24 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-only
# usr.bin/Makefile
#
# Compile all user programs.
UPRG := test1 ftest vfs
UPRGCLEAN := $(addsuffix clean,$(UPRG))
UPRGBUILD := $(addsuffix build,$(UPRG))
UPRGINSTALL := $(addsuffix install,$(UPRG))
all: $(UPRGBUILD) $(UPRGINSTALL)
%build: %
@$(MAKE) --no-print-directory -C $< &
clean: $(UPRGCLEAN)
%clean: %
@$(MAKE) -C $< clean
@echo " CLEAN usr.bin/$<"
%install: %
@mkdir -p ../bin
@$(MAKE) --no-print-directory -C $< install

View file

@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
CC := x86_64-elf-gcc
LD := x86_64-elf-ld

5
usr.bin/make.sh Executable file
View file

@ -0,0 +1,5 @@
usrprog=('ftest' 'test1' 'vfs')
for prog in ${usrprog[@]}; do
make -C $prog $1 --no-print-directory
done