-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
34 lines (27 loc) · 858 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#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