sdk/Build System: Added support for cross-compiling the tarball
[sdk] / ecere / Makefile.ecereCOM
index a44012b..59ff32f 100755 (executable)
@@ -25,9 +25,7 @@ ifdef DEBUG
 NOSTRIP := y
 endif
 
-ifdef EXECUTABLE_TARGET
 CONSOLE = -mwindows
-endif
 
 # INCLUDES
 
@@ -38,10 +36,10 @@ include $(_CF_DIR)include.mk
 
 # CUSTOM TOOLCHAIN / COMPILER CONFIG
 
-ECP := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecp$(E))
-ECC := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecc$(E))
-ECS := $(call psep,../compiler/bootstrap/obj/bin.$(PLATFORM)/ecs$(E))
-EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
+ECP := $(call psep,../compiler/bootstrap/obj/bin.$(HOST_PLATFORM)/ecp$(HOST_E))
+ECC := $(call psep,../compiler/bootstrap/obj/bin.$(HOST_PLATFORM)/ecc$(HOST_E))$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)
+ECS := $(call psep,../compiler/bootstrap/obj/bin.$(HOST_PLATFORM)/ecs$(HOST_E))$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)
+EAR := $(call psep,../obj/$(HOST_PLATFORM)/bin/ear$(HOST_E))
 
 # END OF CUSTOM TOOLCHAIN / COMPILER CONFIG
 
@@ -132,7 +130,7 @@ endif
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT)