Top level makefile. Also make clean
This commit is contained in:
parent
39b43d825a
commit
a8fbcd9e03
17
Makefile
Normal file
17
Makefile
Normal file
@ -0,0 +1,17 @@
|
||||
ifeq ($(MITTOS64),)
|
||||
$(error Unsupported environment! See README)
|
||||
endif
|
||||
|
||||
.PHONY: kernel clean
|
||||
|
||||
all: kernel
|
||||
|
||||
kernel:
|
||||
ifeq ($(shell make -sqC src/kernel || echo 1), 1)
|
||||
$(MAKE) -C src/kernel install
|
||||
endif
|
||||
|
||||
clean:
|
||||
$(MAKE) -C src/kernel clean
|
||||
rm -rf sysroot
|
||||
|
@ -15,5 +15,16 @@ all: kernel
|
||||
kernel: LDFLAGS += -n -nostdlib -T Link.ld
|
||||
kernel: $(OBJ)
|
||||
$(LINK.c) $^ -o $@
|
||||
|
||||
|
||||
# Copy kernel to sysroot
|
||||
/opt/sysroot/kernel: kernel
|
||||
mkdir -p /opt/sysroot
|
||||
cp kernel /opt/sysroot/kernel
|
||||
|
||||
install: /opt/sysroot/kernel
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJ) kernel
|
||||
|
||||
.PHONY: install
|
||||
|
Loading…
x
Reference in New Issue
Block a user