diff --git a/Makefile b/Makefile index ad587ee..d5fc73c 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,15 @@ SHELL = /usr/bin/env bash ROOT := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) +# Import config +ifeq ($(filter clean-all,$(MAKECMDGOALS)),) +ifneq ($(realpath $(ROOT)/config.mk), $(ROOT)/config.mk) +$(error ERROR: Please run the configure script before building) +endif + +include $(ROOT)/config.mk +endif + # # User settings # @@ -39,15 +48,6 @@ endif # End # -# Import config -ifeq ($(filter clean-all,$(MAKECMDGOALS)),) -ifneq ($(realpath $(ROOT)/config.mk), $(ROOT)/config.mk) -$(error ERROR: Please run the configure script before building) -endif - -include $(ROOT)/config.mk -endif - # Relocate vars BUILD_DIR := $(ROOT)/$(BUILD_DIR)/$(TARGET_HOST)