Files
NJU_PA/nanos-lite/Makefile
tracer-ics2023 ffcd9fbbab > compile NEMU
221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 12:26:49 up 6 days, 21:24,  1 user,  load average: 0.72, 0.73, 0.62
2024-09-24 12:26:53 +08:00

35 lines
857 B
Makefile

HAS_NAVY = 1
RAMDISK_FILE = build/ramdisk.img
NAME = nanos-lite
SRCS = $(shell find -L ./src/ -name "*.c" -o -name "*.cpp" -o -name "*.S")
include $(AM_HOME)/Makefile
ifeq ($(ARCH),native)
ISA = am_native
else
INC_PATH += include $(NAVY_HOME)/libs/libc/include
endif
./src/resources.S: $(RAMDISK_FILE)
@touch $@
ifeq ($(HAS_NAVY),)
files = $(RAMDISK_FILE) src/files.h src/syscall.h
# create an empty file if it does not exist
$(foreach f,$(files),$(if $(wildcard $f),, $(shell touch $f)))
else
ifeq ($(wildcard $(NAVY_HOME)/libs/libos/src/syscall.h),)
$(error $$NAVY_HOME must be a Navy-apps repo)
endif
update:
$(MAKE) -s -C $(NAVY_HOME) ISA=$(ISA) ramdisk
@ln -sf $(NAVY_HOME)/build/ramdisk.img $(RAMDISK_FILE)
@ln -sf $(NAVY_HOME)/build/ramdisk.h src/files.h
@ln -sf $(NAVY_HOME)/libs/libos/src/syscall.h src/syscall.h
.PHONY: update
endif