[TOOLCHAIN] Hosted toolchain with musl libc
This commit is contained in:
14
Makefile
14
Makefile
@@ -4,14 +4,14 @@ ifeq ($(MITTOS64),)
|
||||
$(error Build environment is not activated. Please source activate)
|
||||
endif
|
||||
|
||||
.PHONY: all clean kernel
|
||||
.PHONY: all clean kernel libc
|
||||
SHELL := bash
|
||||
|
||||
CC=$(TARGET)-gcc
|
||||
FLAGS_TO_PASS:= \
|
||||
CC=$(CC)
|
||||
|
||||
all: kernel
|
||||
all: kernel libc
|
||||
|
||||
# A trick to only build phony target if necessary
|
||||
kernel:
|
||||
@@ -20,9 +20,19 @@ ifeq ($(shell make -sqC kernel || echo 1), 1)
|
||||
$(MAKE) -C kernel install $(FLAGS_TO_PASS)
|
||||
endif
|
||||
|
||||
libc:
|
||||
ifeq ($(shell make -sqC libc || echo 1), 1)
|
||||
@(. util/helpers.sh; print_info "Building c library")
|
||||
$(MAKE) -C libc install $(FLAGS_TO_PASS)
|
||||
endif
|
||||
|
||||
tags:
|
||||
ctags -R kernel
|
||||
|
||||
clean:
|
||||
@(. util/helpers.sh; print_info "Cleaning up")
|
||||
$(MAKE) -C kernel clean
|
||||
rm -f mittos64.iso
|
||||
$(MAKE) -C libc clean
|
||||
rm -f qemu-error.log
|
||||
rm -f serial.log
|
||||
|
||||
Reference in New Issue
Block a user