vbos/usr.bin/Makefile.common
Michael Shaw 5a67532500 utest: rename utest to init
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-07-22 01:13:18 -04:00

32 lines
607 B
Text

ifneq ($(V),1)
Q := @
else
Q :=
endif
USR_CFLAGS ?= -g3 -O0 -pipe -Wall -ffreestanding -nostdlib \
-fno-stack-protector -m64 -march=x86-64 -mabi=sysv \
-Iinclude -MMD
USR_LDFLAGS ?= -nostdlib -static -m elf_x86_64 -z max-page-size=0x1000
DEPS := $(UOBJ:.o=.d)
$(OUT): $(UOBJ)
$(Q)echo " LD [U] $(DIR)/$@"
$(Q)$(LD) $(USR_LDFLAGS) -o $@ $^
%.o: %.c
$(Q)echo " CC [U] $(DIR)/$@"
$(Q)$(CC) $(USR_CFLAGS) -c $< -o $@
%.o: %.S
$(Q)echo " CC [U] $(DIR)/$@"
$(Q)$(CC) $(USR_CFLAGS) -c $< -o $@
clean:
$(Q)rm -rf $(UOBJ) $(OUT) $(DEPS)
print-%:
$(Q)echo $($(*))