mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 22:26:00 +02:00
* cross compile updates
This commit is contained in:
parent
94ab3f4457
commit
da906ff008
126
Makefile
126
Makefile
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2004/03/20]
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2004/03/21]
|
||||
#
|
||||
default: help
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom
|
||||
@ -208,7 +208,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
|
||||
endif
|
||||
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
|
||||
override PACKAGE_NAME=fpc
|
||||
override PACKAGE_VERSION=1.9.2
|
||||
override PACKAGE_VERSION=1.9.4
|
||||
ifndef inOS2
|
||||
override FPCDIR:=$(BASEDIR)
|
||||
export FPCDIR
|
||||
@ -229,15 +229,11 @@ endif
|
||||
ifeq ($(CPU_TARGET),arm)
|
||||
PPSUF=arm
|
||||
endif
|
||||
ifneq ($(OS_TARGET),$(OS_SOURCE))
|
||||
PPPRE=ppcross
|
||||
else
|
||||
ifneq ($(CPU_TARGET),$(CPU_SOURCE))
|
||||
ifdef CROSSCOMPILE
|
||||
PPPRE=ppcross
|
||||
else
|
||||
PPPRE=ppc
|
||||
endif
|
||||
endif
|
||||
PPNEW=$(BASEDIR)/compiler/$(PPPRE)$(PPSUF)$(SRCEXEEXT)
|
||||
endif
|
||||
ifneq ($(wildcard install),)
|
||||
@ -254,55 +250,26 @@ ifdef SNAPSHOT
|
||||
ALLTARGET=all
|
||||
else
|
||||
ifndef ALLTARGET
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ifeq ($(OS_TARGET),go32v2)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ifeq ($(OS_TARGET),linux)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ifeq ($(OS_TARGET),freebsd)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ifeq ($(OS_TARGET),netbsd)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ifeq ($(OS_TARGET),openbsd)
|
||||
SMARTTARGETS=win32 go32v2 linux freebsd netbsd openbsd
|
||||
ifneq ($(findstring $(OS_TARGET),$(SMARTTARGETS)),)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ALLTARGET=all
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifdef SNAPSHOT
|
||||
NOSTOP=-
|
||||
else
|
||||
NOSTOP=
|
||||
endif
|
||||
ifeq ($(OS_TARGET),linux)
|
||||
PKGPRE=units
|
||||
PKGUNITSPRELONGTARGETS=linux freebsd netbsd openbsd
|
||||
ifneq ($(findstring $(OS_TARGET),$(PKGUNITSPRELONGTARGETS)),)
|
||||
PKGUNITSPRE=units
|
||||
else
|
||||
ifeq ($(OS_TARGET),freebsd)
|
||||
PKGPRE=units
|
||||
else
|
||||
ifeq ($(OS_TARGET),netbsd)
|
||||
PKGPRE=units
|
||||
else
|
||||
ifeq ($(OS_TARGET),openbsd)
|
||||
PKGPRE=units
|
||||
else
|
||||
PKGPRE=u
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
PKGUNITSPRE=u
|
||||
endif
|
||||
PKGPRE=
|
||||
override RELEASE=1
|
||||
export RELEASE
|
||||
ifndef DIST_DESTDIR
|
||||
@ -320,25 +287,13 @@ FPCMAKENEW=$(TEMPMAKENEW)
|
||||
CLEANOPTS=FPC=$(PPNEW)
|
||||
BUILDOPTS=FPC=$(PPNEW) RELEASE=1
|
||||
INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
|
||||
ifndef CROSSCOMPILE
|
||||
ifneq ($(wildcard ide),)
|
||||
ifneq ($(wildcard fv),)
|
||||
ifeq ($(OS_TARGET),go32v2)
|
||||
IDETARGETS=go32v2 win32 linux freebsd os2 emx
|
||||
ifneq ($(findstring $(OS_TARGET),$(IDETARGETS)),)
|
||||
IDE=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
IDE=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),linux)
|
||||
IDE=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),freebsd)
|
||||
IDE=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),os2)
|
||||
IDE=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),emx)
|
||||
IDE=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@ -2106,12 +2061,12 @@ ifdef IDE
|
||||
$(NOSTOP)$(MAKE) ide_$(INSTALLTARGET) $(BUILDOPTS)
|
||||
endif
|
||||
zipinstall: build-stamp.$(OS_TARGET)
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=installbase ZIPNAME=base$(ZIPSUFFIX) $(INSTALLOPTS)
|
||||
$(MAKE) packages_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGPRE)
|
||||
$(MAKE) fcl_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGPRE)
|
||||
$(MAKE) utils_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPNAME=util$(ZIPSUFFIX)
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=installbase ZIPNAME=$(PKGPRE)base$(ZIPSUFFIX) $(INSTALLOPTS)
|
||||
$(MAKE) packages_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGPRE)$(PKGUNITSPRE)
|
||||
$(MAKE) fcl_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGPRE)$(PKGUNITSPRE)
|
||||
$(MAKE) utils_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPNAME=$(PKGPRE)util$(ZIPSUFFIX)
|
||||
ifdef IDE
|
||||
$(NOSTOP)$(MAKE) ide_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPNAME=ide$(ZIPSUFFIX)
|
||||
$(NOSTOP)$(MAKE) ide_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPNAME=$(PKGPRE)ide$(ZIPSUFFIX)
|
||||
endif
|
||||
.PHONY: docspdf docs docsrcinstall docsrc
|
||||
DOCSOURCEDIR=$(INSTALL_SOURCEDIR)/../docs
|
||||
@ -2154,54 +2109,21 @@ sourcezip:
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=sourcebase ZIPNAME=basesrc
|
||||
$(MAKE) compiler_zipsourceinstall
|
||||
$(MAKE) rtl_zipsourceinstall
|
||||
$(MAKE) packages_zipsourceinstall ZIPPREFIX=$(PKGPRE)
|
||||
$(MAKE) packages_zipsourceinstall ZIPPREFIX=$(PKGUNITSPRE)
|
||||
$(MAKE) fcl_zipsourceinstall
|
||||
$(MAKE) utils_zipsourceinstall
|
||||
$(MAKE) ide_zipsourceinstall
|
||||
$(MAKE) installer_zipsourceinstall
|
||||
BUILDTARGETS=go32v2 win32 linux freebsd netbsd openbsd os2 emx sunos qnx beos
|
||||
.PHONY: go32v2 win32 linux freebsd os2 emx netbsd openbsd go32v2zip win32zip linuxzip freebsdzip os2zip emxzip netbsdzip openbsdzip
|
||||
go32v2: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=go32v2
|
||||
win32: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=win32
|
||||
linux: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=linux
|
||||
freebsd: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=freebsd
|
||||
netbsd: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=netbsd
|
||||
openbsd: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=openbsd
|
||||
os2: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=os2
|
||||
emx: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=emx
|
||||
sunos: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=sunos
|
||||
go32v2zip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=go32v2
|
||||
win32zip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=win32
|
||||
linuxzip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=linux
|
||||
freebsdzip : checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=freebsd
|
||||
netbsdzip : checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=netbsd
|
||||
openbsdzip : checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=openbsd
|
||||
$(BUILDTARGETS): checkfpcdir
|
||||
$(MAKE) install OS_TARGET=$@
|
||||
$(addsuffix zip,$(filter-out beos sunos,$(BUILDTARGETS))): checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=$(subst zip,,$@)
|
||||
beoszip : checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=beos USEZIP=1
|
||||
os2zip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=os2
|
||||
emxzip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=emx
|
||||
sunoszip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=sunos TARPROG=gtar
|
||||
qnxzip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=qnx
|
||||
amigazip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=amiga
|
||||
.PHONY: renametoshort shortsrc shortbin shortnames
|
||||
renametoshort:
|
||||
-mv compiler$(ZIPSUFFIX).zip comp$(ZIPSUFFIX).zip
|
||||
|
149
Makefile.fpc
149
Makefile.fpc
@ -4,7 +4,7 @@
|
||||
|
||||
[package]
|
||||
name=fpc
|
||||
version=1.9.2
|
||||
version=1.9.4
|
||||
|
||||
[target]
|
||||
dirs=compiler rtl utils fcl fv packages ide installer
|
||||
@ -42,15 +42,11 @@ PPSUF=arm
|
||||
endif
|
||||
|
||||
# cross compilers uses full cpu_target, not just ppc-suffix.
|
||||
ifneq ($(OS_TARGET),$(OS_SOURCE))
|
||||
PPPRE=ppcross
|
||||
else
|
||||
ifneq ($(CPU_TARGET),$(CPU_SOURCE))
|
||||
ifdef CROSSCOMPILE
|
||||
PPPRE=ppcross
|
||||
else
|
||||
PPPRE=ppc
|
||||
endif
|
||||
endif
|
||||
|
||||
PPNEW=$(BASEDIR)/compiler/$(PPPRE)$(PPSUF)$(SRCEXEEXT)
|
||||
endif
|
||||
@ -74,33 +70,14 @@ ifdef SNAPSHOT
|
||||
ALLTARGET=all
|
||||
else
|
||||
ifndef ALLTARGET
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ifeq ($(OS_TARGET),go32v2)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ifeq ($(OS_TARGET),linux)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ifeq ($(OS_TARGET),freebsd)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ifeq ($(OS_TARGET),netbsd)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ifeq ($(OS_TARGET),openbsd)
|
||||
SMARTTARGETS=win32 go32v2 linux freebsd netbsd openbsd
|
||||
ifneq ($(findstring $(OS_TARGET),$(SMARTTARGETS)),)
|
||||
ALLTARGET=smart
|
||||
else
|
||||
ALLTARGET=all
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Stop with an error?
|
||||
ifdef SNAPSHOT
|
||||
@ -110,24 +87,20 @@ NOSTOP=
|
||||
endif
|
||||
|
||||
# Prefix for units
|
||||
ifeq ($(OS_TARGET),linux)
|
||||
PKGPRE=units
|
||||
PKGUNITSPRELONGTARGETS=linux freebsd netbsd openbsd
|
||||
ifneq ($(findstring $(OS_TARGET),$(PKGUNITSPRELONGTARGETS)),)
|
||||
PKGUNITSPRE=units
|
||||
else
|
||||
ifeq ($(OS_TARGET),freebsd)
|
||||
PKGPRE=units
|
||||
else
|
||||
ifeq ($(OS_TARGET),netbsd)
|
||||
PKGPRE=units
|
||||
else
|
||||
ifeq ($(OS_TARGET),openbsd)
|
||||
PKGPRE=units
|
||||
else
|
||||
PKGPRE=u
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
PKGUNITSPRE=u
|
||||
endif
|
||||
|
||||
# Cross compile needs a prefix to not conflict with original packages
|
||||
#ifdef CROSSCOMPILE
|
||||
#PKGPRE=$(FULL_TARGET)-
|
||||
#else
|
||||
PKGPRE=
|
||||
#endif
|
||||
|
||||
# Always compile for release
|
||||
override RELEASE=1
|
||||
export RELEASE
|
||||
@ -156,26 +129,14 @@ BUILDOPTS=FPC=$(PPNEW) RELEASE=1
|
||||
INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
|
||||
|
||||
# Compile also IDE (check for ide and fv dir)
|
||||
# Skipped by default for cross compiles, because it depends on libc
|
||||
ifndef CROSSCOMPILE
|
||||
ifneq ($(wildcard ide),)
|
||||
ifneq ($(wildcard fv),)
|
||||
ifeq ($(OS_TARGET),go32v2)
|
||||
IDETARGETS=go32v2 win32 linux freebsd os2 emx
|
||||
ifneq ($(findstring $(OS_TARGET),$(IDETARGETS)),)
|
||||
IDE=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
IDE=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),linux)
|
||||
IDE=1
|
||||
endif
|
||||
# is now doable too.
|
||||
ifeq ($(OS_TARGET),freebsd)
|
||||
IDE=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),os2)
|
||||
IDE=1
|
||||
endif
|
||||
ifeq ($(OS_TARGET),emx)
|
||||
IDE=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@ -356,12 +317,12 @@ ifdef IDE
|
||||
endif
|
||||
|
||||
zipinstall: build-stamp.$(OS_TARGET)
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=installbase ZIPNAME=base$(ZIPSUFFIX) $(INSTALLOPTS)
|
||||
$(MAKE) packages_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGPRE)
|
||||
$(MAKE) fcl_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGPRE)
|
||||
$(MAKE) utils_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPNAME=util$(ZIPSUFFIX)
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=installbase ZIPNAME=$(PKGPRE)base$(ZIPSUFFIX) $(INSTALLOPTS)
|
||||
$(MAKE) packages_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGPRE)$(PKGUNITSPRE)
|
||||
$(MAKE) fcl_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGPRE)$(PKGUNITSPRE)
|
||||
$(MAKE) utils_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPNAME=$(PKGPRE)util$(ZIPSUFFIX)
|
||||
ifdef IDE
|
||||
$(NOSTOP)$(MAKE) ide_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPNAME=ide$(ZIPSUFFIX)
|
||||
$(NOSTOP)$(MAKE) ide_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPNAME=$(PKGPRE)ide$(ZIPSUFFIX)
|
||||
endif
|
||||
|
||||
|
||||
@ -437,7 +398,7 @@ sourcezip:
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=sourcebase ZIPNAME=basesrc
|
||||
$(MAKE) compiler_zipsourceinstall
|
||||
$(MAKE) rtl_zipsourceinstall
|
||||
$(MAKE) packages_zipsourceinstall ZIPPREFIX=$(PKGPRE)
|
||||
$(MAKE) packages_zipsourceinstall ZIPPREFIX=$(PKGUNITSPRE)
|
||||
$(MAKE) fcl_zipsourceinstall
|
||||
$(MAKE) utils_zipsourceinstall
|
||||
$(MAKE) ide_zipsourceinstall
|
||||
@ -448,70 +409,22 @@ sourcezip:
|
||||
# OS targets
|
||||
##########################################################################
|
||||
|
||||
BUILDTARGETS=go32v2 win32 linux freebsd netbsd openbsd os2 emx sunos qnx beos
|
||||
|
||||
.PHONY: go32v2 win32 linux freebsd os2 emx netbsd openbsd go32v2zip win32zip linuxzip freebsdzip os2zip emxzip netbsdzip openbsdzip
|
||||
|
||||
go32v2: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=go32v2
|
||||
$(BUILDTARGETS): checkfpcdir
|
||||
$(MAKE) install OS_TARGET=$@
|
||||
|
||||
win32: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=win32
|
||||
|
||||
linux: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=linux
|
||||
|
||||
freebsd: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=freebsd
|
||||
|
||||
netbsd: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=netbsd
|
||||
|
||||
openbsd: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=openbsd
|
||||
|
||||
os2: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=os2
|
||||
|
||||
emx: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=emx
|
||||
|
||||
sunos: checkfpcdir
|
||||
$(MAKE) install OS_TARGET=sunos
|
||||
|
||||
go32v2zip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=go32v2
|
||||
|
||||
win32zip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=win32
|
||||
|
||||
linuxzip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=linux
|
||||
|
||||
freebsdzip : checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=freebsd
|
||||
|
||||
netbsdzip : checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=netbsd
|
||||
|
||||
openbsdzip : checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=openbsd
|
||||
$(addsuffix zip,$(filter-out beos sunos,$(BUILDTARGETS))): checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=$(subst zip,,$@)
|
||||
|
||||
beoszip : checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=beos USEZIP=1
|
||||
|
||||
os2zip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=os2
|
||||
|
||||
emxzip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=emx
|
||||
|
||||
sunoszip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=sunos TARPROG=gtar
|
||||
|
||||
qnxzip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=qnx
|
||||
|
||||
amigazip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=amiga
|
||||
|
||||
##########################################################################
|
||||
# Dos, OS/2 Short 8.3 Names
|
||||
|
Loading…
Reference in New Issue
Block a user