aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarvin Borner2019-09-22 13:12:15 +0200
committerMarvin Borner2019-09-22 13:12:15 +0200
commitd62ea94750d6b2cd1eb1b754b40eada92c094e4e (patch)
tree0f598ba30c93a4a29eb3da15b423b10745cbf904 /Makefile
parent5bc3e8c3553b749d848169de7177b238f4396f9b (diff)
Improved build process
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
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); \