|
|
@@ -7,6 +7,11 @@
|
|
|
ROOTPATH := $(shell git rev-parse --show-toplevel)
|
|
|
COMMANDLINE := $(shell ps -o args= $$PPID)
|
|
|
|
|
|
+# ---------- Base Includes ----------
|
|
|
+
|
|
|
+-include $(ROOTPATH)/Makefile.conf
|
|
|
+-include $(ROOTPATH)/Makefiles/Makefile.conf.base
|
|
|
+
|
|
|
# ---------- Architectures ----------
|
|
|
|
|
|
ARCHS := $(shell ls $(ROOTPATH)/Makefiles/Makefile.conf.* | grep -v base | sed 's/.*Makefile\.conf\.//g')
|
|
|
@@ -16,6 +21,16 @@ ARCHS += any
|
|
|
|
|
|
ARCHS := $(filter-out any,$(ARCHS))
|
|
|
|
|
|
+ifeq ($(ARCH),)
|
|
|
+ ifneq ($(DEFAULTARCH),)
|
|
|
+ ARCH := $(DEFAULTARCH)
|
|
|
+ else
|
|
|
+ ARCH := x86_64
|
|
|
+ endif
|
|
|
+endif
|
|
|
+
|
|
|
+-include $(ROOTPATH)/Makefiles/Makefile.conf.$(ARCH)
|
|
|
+
|
|
|
ifeq (,$(findstring -S,$(COMMANDLINE)))
|
|
|
ifneq ($(ARCH),)
|
|
|
$(info ARCH: $(ARCH))
|
|
|
@@ -51,9 +66,6 @@ REALOBJECTS := $(SOURCES:.cpp=.o.$(ARCH))
|
|
|
DEPENDS = $(REALOBJECTS:.o.$(ARCH)=.d.$(ARCH))
|
|
|
OBJECTS := Makefile.conf
|
|
|
OBJECTS += $(REALOBJECTS)
|
|
|
-LIBRARIES =
|
|
|
-LIBFILES =
|
|
|
-TARGETS =
|
|
|
|
|
|
# ---------- Recursive Targets ----------
|
|
|
|
|
|
@@ -66,12 +78,6 @@ artifacts: $(LOCALOBJECTS)
|
|
|
|
|
|
.DEFAULT_GOAL := artifacts
|
|
|
|
|
|
-# ---------- Includes ----------
|
|
|
-
|
|
|
--include $(ROOTPATH)/Makefiles/Makefile.conf.$(ARCH)
|
|
|
--include $(ROOTPATH)/Makefiles/Makefile.conf.base
|
|
|
--include $(ROOTPATH)/Makefile.conf
|
|
|
-
|
|
|
# ---------- Libraries ----------
|
|
|
|
|
|
define build_target_library_arch
|