ide/Makefiles: Updated tarball makefiles to use FORCE_32BIT; Disabled forcing -m32...
authorJerome St-Louis <jerome@ecere.com>
Wed, 24 Oct 2012 08:41:58 +0000 (04:41 -0400)
committerJerome St-Louis <jerome@ecere.com>
Wed, 24 Oct 2012 08:41:58 +0000 (04:41 -0400)
28 files changed:
compiler/bootstrap/ecc/Makefile
compiler/bootstrap/ecere/Makefile
compiler/bootstrap/ecp/Makefile
compiler/bootstrap/ecs/Makefile
compiler/bootstrap/libec/Makefile
compiler/ecc/Makefile
compiler/ecp/Makefile
compiler/ecs/Makefile
compiler/libec/Makefile
crossplatform.mk
deps/freetype-2.3.12/Makefile
deps/jpeg-6b/Makefile
deps/libpng-1.4.0/Makefile
deps/libungif-4.1.1/Makefile
deps/zlib/Makefile
documentor/Makefile
ear/cmd/Makefile
ear/extract/Makefile
ecere/Makefile
ecere/Makefile.ecereCOM
ecere/Makefile.vanilla
eda/drivers/sqlite/Makefile
eda/drivers/sqliteCipher/Makefile
eda/libeda/Makefile
epj2make/Makefile
ide/Makefile
ide/src/project/Project.ec
include.mk

index 8fcabd3..a7d4ea5 100644 (file)
@@ -35,14 +35,14 @@ include ../../../include.mk
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w \
         -DECERE_STATIC
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../ecere/obj/bootstrap.$(PLATFORM) \
         -L../libec/obj/bootstrap.$(PLATFORM)
 
index a79ab46..6404b8e 100644 (file)
@@ -81,7 +81,7 @@ include ../../../include.mk
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w \
         -DBUILDING_ECERE_COM -DECERE_STATIC -DECERE_BOOTSTRAP
 
 CECFLAGS =
index ae15d35..f33719f 100644 (file)
@@ -35,14 +35,14 @@ include ../../../include.mk
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w \
         -DECERE_STATIC
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../ecere/obj/bootstrap.$(PLATFORM) \
         -L../libec/obj/bootstrap.$(PLATFORM)
 
index 9e6976c..df9c927 100644 (file)
@@ -35,14 +35,14 @@ include ../../../include.mk
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w \
         -DECERE_STATIC
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../ecere/obj/bootstrap.$(PLATFORM) \
         -L../libec/obj/bootstrap.$(PLATFORM)
 
index e9f3d04..5707e88 100644 (file)
@@ -71,7 +71,7 @@ include ../../../include.mk
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w \
         -DYYTOKENTYPE -DECERE_STATIC
 
 CECFLAGS =
index d1e2235..9f153a6 100644 (file)
@@ -56,13 +56,13 @@ EAR := $(call psep,../../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../../obj/$(PLATFORM)/bin \
         -L../../obj/$(PLATFORM)/lib
 
index 298e71a..3fbda7c 100644 (file)
@@ -56,13 +56,13 @@ EAR := $(call psep,../../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../../obj/$(PLATFORM)/bin \
         -L../../obj/$(PLATFORM)/lib
 
index 88c43c7..f79f262 100644 (file)
@@ -56,13 +56,13 @@ EAR := $(call psep,../../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../../obj/$(PLATFORM)/bin \
         -L../../obj/$(PLATFORM)/lib
 
index 8a054c1..f67d847 100644 (file)
@@ -158,15 +158,15 @@ EAR := $(call psep,../../obj/$(PLATFORM)/bin/ear)
 # FLAGS
 
 # BSL CFLAGS
-BSL_CFLAGS = -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
+BSL_CFLAGS = -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w -I../bootstrap/include
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w -I../bootstrap/include
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../../obj/$(PLATFORM)/bin \
         -L../../obj/$(PLATFORM)/lib
 
index 6f0c371..6416a82 100644 (file)
@@ -18,6 +18,19 @@ else
    LINUX_HOST := defined
 endif
 endif
+
+UNAME_P := $(shell uname -p)
+ifeq ($(UNAME_P),x86_64)
+  HOST_ARCH = X64
+else
+ifneq ($(filter %86,$(UNAME_P)),)
+  HOST_ARCH = X86
+else
+ifneq ($(filter arm%,$(UNAME_P)),)
+  HOST_ARCH = ARM
+endif
+endif
+endif
 endif
 
 # TARGET_PLATFORM
index 552bff5..e3ca14e 100644 (file)
@@ -126,7 +126,7 @@ include ../../include.mk
 # FLAGS
 
 # Warning: Compiling with -O2 gives 0 font height with MinGW!!
-CFLAGS += -fmessage-length=0 -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 $(FORCE_32_BIT) $(FPIC) -w \
         -DFT2_BUILD_LIBRARY -DFT_OPTION_AUTOFIT2 \
         -I../zlib \
         -Iinclude \
index b3e1fbc..6087cc8 100644 (file)
@@ -135,7 +135,7 @@ include ../../include.mk
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w
 
 LIBS = $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
 
index c3405fb..c0433bc 100644 (file)
@@ -67,7 +67,7 @@ include ../../include.mk
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w \
         -I. \
         -I../zlib
 
index 473c7f0..969622d 100644 (file)
@@ -43,7 +43,7 @@ include ../../include.mk
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w
 
 LIBS = $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
 
index e6a3943..46979ba 100644 (file)
@@ -61,7 +61,7 @@ include ../../include.mk
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w
 
 LIBS = $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
 
index c854a4b..d1fd2f9 100644 (file)
@@ -96,13 +96,13 @@ EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../obj/$(PLATFORM)/bin \
         -L../obj/$(PLATFORM)/lib
 
index 909ac8e..2cc30b0 100644 (file)
@@ -56,13 +56,13 @@ EAR := $(call psep,../../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../../obj/$(PLATFORM)/bin \
         -L../../obj/$(PLATFORM)/lib
 
index 0ca2a5b..02dffcd 100644 (file)
@@ -83,14 +83,14 @@ EAR := $(call psep,../../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -Os -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -Os $(FORCE_32_BIT) $(FPIC) -w \
         -DECERE_STATIC
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../../ecere/obj/vanilla.$(PLATFORM) \
         -L../../deps/zlib/obj/release.$(PLATFORM)
 
index bb06f10..17937e3 100644 (file)
@@ -846,7 +846,7 @@ EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w \
         -DBUILDING_ECERE_COM \
         -Isrc/gfx/drivers/harfbuzz
 
@@ -854,7 +854,7 @@ CECFLAGS =
 
 ECFLAGS = -nolinenumbers -defaultns ecere
 
-OFLAGS += -m32
+OFLAGS += $(FORCE_32_BIT)
 
 LIBS = -ljpeg -lpng -lz -lfreetype $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
 
index ae4bf43..f29a048 100644 (file)
@@ -133,14 +133,14 @@ EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w \
         -DECERE_COM_MODULE -DBUILDING_ECERE_COM -DECERE_NOFILE
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers -defaultns ecere
 
-OFLAGS += -m32
+OFLAGS += $(FORCE_32_BIT)
 
 LIBS = $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
 
index 4b1811b..43a7395 100644 (file)
@@ -662,7 +662,7 @@ EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -Os -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -Os $(FORCE_32_BIT) $(FPIC) -w \
         -DBUILDING_ECERE_COM -DECERE_STATIC -DECERE_VANILLA -DNOBLENDING \
         -Isrc/gfx/drivers/harfbuzz
 
index bcd6af5..b4dd907 100644 (file)
@@ -62,13 +62,13 @@ EAR := $(call psep,../../../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -m32 $(FPIC) -w
+CFLAGS += -fmessage-length=0 -O2 $(FORCE_32_BIT) $(FPIC) -w
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../../../obj/$(PLATFORM)/bin \
         -L../../../obj/$(PLATFORM)/lib
 
index bc8b9e1..5ac081c 100644 (file)
@@ -66,14 +66,14 @@ EAR := $(call psep,../../../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -O2 $(FORCE_32_BIT) $(FPIC) -w \
         -DSQLITE_HAS_CODEC
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../../../obj/$(PLATFORM)/bin \
         -L../../../obj/$(PLATFORM)/lib
 
index f6e6ff5..5a9342b 100644 (file)
@@ -94,13 +94,13 @@ EAR := $(call psep,../../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers -defaultns eda
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../../obj/$(PLATFORM)/bin \
         -L../../obj/$(PLATFORM)/lib
 
index 9998b4d..3d649cf 100644 (file)
@@ -85,14 +85,14 @@ EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w \
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w \
         -DMAKEFILE_GENERATOR
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../obj/$(PLATFORM)/bin \
         -L../obj/$(PLATFORM)/lib
 
index 83dd0ff..e33cac1 100644 (file)
@@ -329,13 +329,13 @@ EAR := $(call psep,../obj/$(PLATFORM)/bin/ear)
 
 # FLAGS
 
-CFLAGS += -fmessage-length=0 -O2 -ffast-math -m32 $(FPIC) -w
+CFLAGS += -fmessage-length=0 -O2 -ffast-math $(FORCE_32_BIT) $(FPIC) -w
 
 CECFLAGS =
 
 ECFLAGS = -nolinenumbers
 
-OFLAGS += -m32 \
+OFLAGS += $(FORCE_32_BIT) \
         -L../obj/$(PLATFORM)/bin \
         -L../obj/$(PLATFORM)/lib
 
index 019072b..8448a66 100644 (file)
@@ -2563,7 +2563,7 @@ private:
          f.Printf("ifneq \"$(TARGET_TYPE)\" \"%s\"\n", TargetTypeToMakefileVariable(staticLibrary));
          f.Printf("OFLAGS +=");
          if(forceBitDepth)
-            f.Printf((!options || !options.buildBitDepth || options.buildBitDepth == bits32) ? " -m32" : " -m64 \\\n");
+            f.Printf((!options || !options.buildBitDepth || options.buildBitDepth == bits32) ? " $(FORCE_32_BIT)" : " $(FORCE_64_BIT) \\\n");
 
          if(GetProfile(config))
             f.Printf(" -pg");
index a4340a4..98e1dbb 100644 (file)
@@ -20,3 +20,11 @@ ifdef DEBIAN_PACKAGE
 CFLAGS += $(CPPFLAGS)
 OFLAGS += $(LDFLAGS)
 endif
+
+ifeq "$(HOST_ARCH)" "ARM"
+FORCE_64_BIT =
+FORCE_32_BIT =
+else
+FORCE_64_BIT = -m64
+FORCE_32_BIT = -m32
+endif