summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoryury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-02-21 14:54:57 +0000
committeryury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-02-21 14:54:57 +0000
commite6ac072f5f2d06c62f86462061a844e64912baf2 (patch)
tree2a6d3ccbce2bede3ffcc1c64a819a2827f3d7508 /Makefile
parent819ef1c02777401735647443c4302f6f80407960 (diff)
downloadfpc-e6ac072f5f2d06c62f86462061a844e64912baf2.tar.gz
* Top level makefile: Fixed and simplified cross-building. It is now possible to perform cross builds when having only bootstrap compiler executable.
- Always use fresh native fpcmake executable. - Build fresh native fpcmake executable when cross-compiling. - Explicitly specify a compiler which is used to bootstrap fpmake and fpcmake. Always use fresh native compiler for that. * New bootstrap target for fpcmake to build native fpcmake regardless of CPU/OS settings. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@23641 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 27 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index d194b530a0..f5e098d12f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2013/01/16]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2013/02/20]
#
default: help
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-android m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian arm-android powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux jvm-java jvm-android
@@ -268,6 +268,19 @@ ifdef CROSSCOMPILE
ifndef DARWIN2DARWIN
ifneq ($(CPU_TARGET),jvm)
BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+ifeq ($(OS_TARGET),android)
+ifeq ($(CPU_TARGET),arm)
+BINUTILSPREFIX=arm-linux-androideabi-
+else
+ifeq ($(CPU_TARGET),i386)
+BINUTILSPREFIX=i686-linux-android-
+else
+ifeq ($(CPU_TARGET),mips)
+BINUTILSPREFIX=mipsel-linux-android-
+endif
+endif
+endif
+endif
endif
endif
endif
@@ -360,6 +373,13 @@ PPPRE=ppc
endif
PPNEW=$(BASEDIR)/compiler/$(PPPRE)$(PPSUF)$(SRCEXEEXT)
endif
+ifndef FPCFPMAKENEW
+ifdef CROSSCOMPILE
+FPCFPMAKENEW=$(BASEDIR)/compiler/ppc$(SRCEXEEXT)
+else
+FPCFPMAKENEW=$(PPNEW)
+endif
+endif
ifneq ($(wildcard install),)
CVSINSTALL=install
else
@@ -407,17 +427,11 @@ ifndef DIST_DESTDIR
export DIST_DESTDIR:=$(BASEDIR)
endif
BASEPACKDIR=$(BASEDIR)/basepack
-ifndef FPCMAKE
-ifeq ($(FULL_SOURCE),$(FULL_TARGET))
-FPCMAKENEW=$(BASEDIR)/utils/fpcm/fpcmake$(EXEEXT)
-else
-FPCMAKENEW=fpcmake
-endif
-else
-FPCMAKENEW=$(FPCMAKE)
+ifndef FPCMAKENEW
+FPCMAKENEW=$(BASEDIR)/utils/fpcm/fpcmake$(SRCEXEEXT)
endif
CLEANOPTS=FPC=$(PPNEW)
-BUILDOPTS=FPC=$(PPNEW) RELEASE=1
+BUILDOPTS=FPC=$(PPNEW) FPCFPMAKE=$(FPCFPMAKENEW) RELEASE=1
INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
ifndef CROSSCOMPILE
ifneq ($(wildcard ide),)
@@ -2676,6 +2690,9 @@ distclean: clean
build: $(BUILDSTAMP)
$(BUILDSTAMP):
$(MAKE) compiler_cycle RELEASE=1
+ifdef CROSSCOMPILE
+ $(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS)
+endif
$(MAKE) rtl_clean $(CLEANOPTS)
$(MAKE) packages_clean $(CLEANOPTS)
ifdef UTILS