build: add support for building tools targeting host machine
This commit is contained in:
9
Makefile
9
Makefile
@@ -45,7 +45,7 @@ LDFLAGS := $(LDFLAGS) -g -Os
|
||||
ALL_KERNEL_OBJECT_FILES := $(KERNEL_OBJ) $(ARCH_OBJ) $(LIBC_OBJ)
|
||||
ALL_KERNEL_DEPS := $(ALL_KERNEL_OBJECT_FILES:.o=.d)
|
||||
|
||||
all: $(BUILD_DIR)/$(KERNEL_EXEC)
|
||||
all: $(BUILD_DIR)/$(KERNEL_EXEC) tools
|
||||
|
||||
-include $(ALL_KERNEL_DEPS)
|
||||
|
||||
@@ -69,7 +69,7 @@ clean:
|
||||
@rm -rf $(BUILD_DIR)
|
||||
|
||||
$(BUILD_DIR)/compile_commands.json:
|
||||
@$(MAKE) clean
|
||||
@$(MAKE) --no-print-directory clean
|
||||
|
||||
@printf " \033[1;93mGEN\033[0m Generating compiler database.\n"
|
||||
|
||||
@@ -77,8 +77,11 @@ $(BUILD_DIR)/compile_commands.json:
|
||||
|
||||
compile-db: $(BUILD_DIR)/compile_commands.json
|
||||
|
||||
tools:
|
||||
@$(MAKE) --no-print-directory -C tools
|
||||
|
||||
include arch/$(ARCH)/extra.mk
|
||||
|
||||
.PHONY: all compile-db
|
||||
.PHONY: all tools compile-db
|
||||
|
||||
.INTERMEDIATE: $(ARCH_TEMP_FILES)
|
||||
|
||||
Reference in New Issue
Block a user