From d62ea94750d6b2cd1eb1b754b40eada92c094e4e Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 22 Sep 2019 13:12:15 +0200 Subject: Improved build process --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a6fc13b..39f168c 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,17 @@ +.DEFAULT_GOAL := build +.SILENT: cross build test + DIR := $(shell pwd)/cross export PREFIX := $(DIR)/opt export TARGET := i686-elf export PATH := $(PREFIX)/bin:$(PATH) clean: - @-rm -rf build + @-rm -rf ./build ./iso @echo Cleaned build directory -build: +build: clean set -e; \ - rm -rf ./build/ ./iso/; \ mkdir ./build/; \ # Assemble ASM files @@ -43,6 +45,7 @@ build: cross: set -e; \ + [ -d "./cross/" ] && echo "Please remove cross/ and try again" && exit; \ mkdir cross || exit; \ cd cross || exit; \ DIR=$$(pwd); \ -- cgit v1.2.3