Fri, 15 Dec 2017 00:04:55 +0100
1 files changed,
9 insertions(+),
4 deletions(-)
jump to
M
makefile
→
makefile
@@ -1,10 +1,10 @@
.RECIPEPREFIX = > -CURRENT_DIR = $(shell pwd) +CURRENT_DIR = $(shell pwd) BUILD_DIR = $(CURRENT_DIR)/build -GCC_PREFIX = $(HOME)/opt/cross/i686-elf-/bin/i686-elf- -GCC_OPTIONS = -O0 -std=c++0x -Wno-write-strings -Wall -Wextra -fno-exceptions -fno-rtti -ffreestanding +GCC_PREFIX = $(HOME)/opt/cross/i686-elf-/bin/i686-elf- +GCC_OPTIONS = -O0 -std=c++0x -Wno-write-strings -Wall -Wextra -fno-exceptions -fno-rtti -ffreestanding # OBJ_FILES = $(wildcard obj/asm/*.o) $(wildcard obj/cpp/*.o)@@ -14,11 +14,16 @@ >
.PHONY: clear clear: -> rm $(BUILD_DIR)/*.* +> @rm $(BUILD_DIR)/*.* 2> /dev/null; true .PHONY: run run: > ./run.sh + +.PHONY: rebuild +rebuild: +> make clear +> make build $(BUILD_DIR)/base.img: $(BUILD_DIR)/boot.o > $(GCC_PREFIX)ld -T link.txt -Map=mapfile.txt -o $(BUILD_DIR)/base.img --oformat binary