|
@@ -170,137 +170,19 @@ endif
|
|
|
# Pre Settings
|
|
|
#####################################################################
|
|
|
|
|
|
+
|
|
|
[usersettings]
|
|
|
#####################################################################
|
|
|
# User Settings
|
|
|
#####################################################################
|
|
|
|
|
|
+
|
|
|
[postsettings]
|
|
|
#####################################################################
|
|
|
# Post Settings
|
|
|
#####################################################################
|
|
|
|
|
|
|
|
|
-[dir_default]
|
|
|
-#####################################################################
|
|
|
-# Default Directories
|
|
|
-#####################################################################
|
|
|
-
|
|
|
-# set the prefix directory where to install everything
|
|
|
-ifndef PREFIXINSTALLDIR
|
|
|
-ifdef inlinux
|
|
|
-PREFIXINSTALLDIR=/usr
|
|
|
-else
|
|
|
-PREFIXINSTALLDIR=/pp
|
|
|
-endif
|
|
|
-endif
|
|
|
-export PREFIXINSTALLDIR
|
|
|
-
|
|
|
-
|
|
|
-[dir_install]
|
|
|
-#####################################################################
|
|
|
-# Install Directories
|
|
|
-#####################################################################
|
|
|
-
|
|
|
-# set the base directory where to install everything
|
|
|
-ifndef BASEINSTALLDIR
|
|
|
-ifdef inlinux
|
|
|
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
|
|
|
-else
|
|
|
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
|
|
|
-endif
|
|
|
-endif
|
|
|
-
|
|
|
-# set the directory where to install the binaries
|
|
|
-ifndef BININSTALLDIR
|
|
|
-ifdef inlinux
|
|
|
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
|
|
|
-else
|
|
|
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
|
|
|
-endif
|
|
|
-endif
|
|
|
-
|
|
|
-# set the directory where to install the units.
|
|
|
-ifndef UNITINSTALLDIR
|
|
|
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
|
|
|
-ifdef UNITSUBDIR
|
|
|
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
|
|
|
-endif
|
|
|
-endif
|
|
|
-
|
|
|
-# Where to install shared libraries
|
|
|
-ifndef LIBINSTALLDIR
|
|
|
-ifdef inlinux
|
|
|
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
|
|
|
-else
|
|
|
-LIBINSTALLDIR=$(UNITINSTALLDIR)
|
|
|
-endif
|
|
|
-endif
|
|
|
-
|
|
|
-# Where the source files will be stored
|
|
|
-ifndef SOURCEINSTALLDIR
|
|
|
-ifdef inlinux
|
|
|
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
|
|
|
-else
|
|
|
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
|
|
|
-endif
|
|
|
-endif
|
|
|
-
|
|
|
-# Where the doc files will be stored
|
|
|
-ifndef DOCINSTALLDIR
|
|
|
-ifdef inlinux
|
|
|
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
|
|
|
-else
|
|
|
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
|
|
|
-endif
|
|
|
-endif
|
|
|
-
|
|
|
-# Where the some extra (data)files will be stored
|
|
|
-ifndef DATAINSTALLDIR
|
|
|
-DATAINSTALLDIR=$(BASEINSTALLDIR)
|
|
|
-endif
|
|
|
-
|
|
|
-
|
|
|
-[dir_gcclib]
|
|
|
-# On linux, try to find where libgcc.a is.
|
|
|
-ifdef inlinux
|
|
|
-ifndef GCCLIBDIR
|
|
|
-GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
|
|
|
-endif
|
|
|
-endif
|
|
|
-export GCCLIBDIR
|
|
|
-
|
|
|
-
|
|
|
-[dir_otherlib]
|
|
|
-# Where to find other libraries
|
|
|
-ifdef inlinux
|
|
|
-ifndef OTHERLIBDIR
|
|
|
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
|
|
|
-endif
|
|
|
-endif
|
|
|
-export OTHERLIBDIR
|
|
|
-
|
|
|
-
|
|
|
-[redir]
|
|
|
-#####################################################################
|
|
|
-# Redirection
|
|
|
-#####################################################################
|
|
|
-
|
|
|
-# Release ? Then force OPT and don't use extra opts via commandline
|
|
|
-ifndef REDIRFILE
|
|
|
-REDIRFILE=log
|
|
|
-endif
|
|
|
-
|
|
|
-ifdef REDIR
|
|
|
-ifndef inlinux
|
|
|
-override FPC=redir -eo $(FPC)
|
|
|
-endif
|
|
|
-# set the verbosity to max
|
|
|
-override FPCOPT+=-va
|
|
|
-override REDIR:= >> $(REDIRFILE)
|
|
|
-endif
|
|
|
-
|
|
|
-
|
|
|
[shelltools]
|
|
|
#####################################################################
|
|
|
# Shell tools
|
|
@@ -376,240 +258,102 @@ endif
|
|
|
export ECHO COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
|
|
|
|
|
|
|
|
|
-[command_begin]
|
|
|
+[tool_default]
|
|
|
#####################################################################
|
|
|
-# Compiler Command Line
|
|
|
+# Default Tools
|
|
|
#####################################################################
|
|
|
|
|
|
-# Load commandline OPTDEF and add FPC_CPU define
|
|
|
-override FPCOPTDEF:=-d$(CPU_TARGET)
|
|
|
-
|
|
|
-# Load commandline OPT and add target and unit dir to be sure
|
|
|
-ifneq ($(OS_TARGET),$(OS_SOURCE))
|
|
|
-override FPCOPT+=-T$(OS_TARGET)
|
|
|
+# assembler, redefine it if cross compiling
|
|
|
+ifndef AS
|
|
|
+AS=as
|
|
|
endif
|
|
|
|
|
|
-[command_needopt]
|
|
|
-ifdef NEEDOPT
|
|
|
-override FPCOPT+=$(NEEDOPT)
|
|
|
+# linker, but probably not used
|
|
|
+ifndef LD
|
|
|
+LD=ld
|
|
|
endif
|
|
|
|
|
|
-
|
|
|
-[command_needunit]
|
|
|
-ifdef NEEDUNITDIR
|
|
|
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
|
|
|
+# ppas.bat / ppas.sh
|
|
|
+ifdef inlinux
|
|
|
+PPAS=ppas.sh
|
|
|
+else
|
|
|
+ifdef inOS2
|
|
|
+PPAS=ppas.cmd
|
|
|
+else
|
|
|
+PPAS=ppas.bat
|
|
|
endif
|
|
|
-
|
|
|
-
|
|
|
-[command_unitsdir]
|
|
|
-ifdef UNITSDIR
|
|
|
-override FPCOPT+=-Fu$(UNITSDIR)
|
|
|
endif
|
|
|
|
|
|
-
|
|
|
-[command_needlib]
|
|
|
-ifdef NEEDLIBDIR
|
|
|
-override FPCOPT+=$(addprefix -Fl,$(NEEDLIBDIR))
|
|
|
+# also call ppas if with command option -s
|
|
|
+ifeq (,$(findstring -s ,$(COMPILER)))
|
|
|
+EXECPPAS=
|
|
|
+else
|
|
|
+EXECPPAS:=@$(PPAS)
|
|
|
endif
|
|
|
|
|
|
-
|
|
|
-[command_needobj]
|
|
|
-ifdef NEEDOBJDIR
|
|
|
-override FPCOPT+=$(addprefix -Fo,$(NEEDOBJDIR))
|
|
|
+# ldconfig to rebuild .so cache
|
|
|
+ifdef inlinux
|
|
|
+LDCONFIG=ldconfig
|
|
|
+else
|
|
|
+LDCONFIG=
|
|
|
endif
|
|
|
|
|
|
-
|
|
|
-[command_needinc]
|
|
|
-ifdef NEEDINCDIR
|
|
|
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
|
|
|
+[tool_ppdep]
|
|
|
+# ppdep
|
|
|
+ifndef PPDEP
|
|
|
+PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
|
|
|
+ifeq ($(PPDEP),)
|
|
|
+PPDEP=
|
|
|
+else
|
|
|
+PPDEP:=$(firstword $(PPDEP))
|
|
|
endif
|
|
|
-
|
|
|
-[command_gcclib]
|
|
|
-# Add GCC lib path if asked
|
|
|
-ifdef GCCLIBDIR
|
|
|
-override FPCOPT+=-Fl$(GCCLIBDIR)
|
|
|
endif
|
|
|
+export PPDEP
|
|
|
|
|
|
-[command_otherlib]
|
|
|
-# Add Other dirs path if asked
|
|
|
-ifdef OTHERLIBDIR
|
|
|
-override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
|
|
|
+[tool_ppumove]
|
|
|
+# ppumove
|
|
|
+ifndef PPUMOVE
|
|
|
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
|
|
|
+ifeq ($(PPUMOVE),)
|
|
|
+PPUMOVE=
|
|
|
+else
|
|
|
+PPUMOVE:=$(firstword $(PPUMOVE))
|
|
|
endif
|
|
|
-
|
|
|
-[command_target]
|
|
|
-# Target dirs
|
|
|
-ifdef TARGETDIR
|
|
|
-override FPCOPT+=-FE$(TARGETDIR)
|
|
|
endif
|
|
|
+export PPUMOVE
|
|
|
|
|
|
-[command_unittarget]
|
|
|
-ifdef UNITTARGETDIR
|
|
|
-override FPCOPT+=-FU$(UNITTARGETDIR)
|
|
|
+[tool_ppufiles]
|
|
|
+# ppufiles
|
|
|
+ifndef PPUFILES
|
|
|
+PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
|
|
|
+ifeq ($(PPUFILES),)
|
|
|
+PPUFILES=
|
|
|
+else
|
|
|
+PPUFILES:=$(firstword $(PPUFILES))
|
|
|
endif
|
|
|
-
|
|
|
-[command_end]
|
|
|
-# Smartlinking
|
|
|
-ifdef SMARTLINK
|
|
|
-override FPCOPT+=-CX
|
|
|
endif
|
|
|
+export PPUFILES
|
|
|
|
|
|
-# Debug
|
|
|
-ifdef DEBUG
|
|
|
-override FPCOPT+=-g -dDEBUG
|
|
|
+[tool_data2inc]
|
|
|
+# data2inc
|
|
|
+ifndef DATA2INC
|
|
|
+DATA2INC:=$(strip $(wildcard $(addsuffix /data2inc$(EXEEXT),$(SEARCHPATH))))
|
|
|
+ifeq ($(DATA2INC),)
|
|
|
+DATA2INC=
|
|
|
+else
|
|
|
+DATA2INC:=$(firstword $(DATA2INC))
|
|
|
endif
|
|
|
-
|
|
|
-# Release mode (strip, optimize and don't load ppc386.cfg)
|
|
|
-ifdef RELEASE
|
|
|
-override FPCOPT+=-Xs -OG2p3 -n
|
|
|
endif
|
|
|
+export DATA2INC
|
|
|
|
|
|
-# Verbose settings (warning,note,info)
|
|
|
-ifdef VERBOSE
|
|
|
-override FPCOPT+=-vwni
|
|
|
-endif
|
|
|
-
|
|
|
-# Add commandline options
|
|
|
-ifdef OPT
|
|
|
-override FPCOPT+=$(OPT)
|
|
|
-endif
|
|
|
-ifdef UNITDIR
|
|
|
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
|
|
|
-endif
|
|
|
-ifdef LIBDIR
|
|
|
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
|
|
|
-endif
|
|
|
-ifdef OBJDIR
|
|
|
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
|
|
|
-endif
|
|
|
-ifdef INCDIR
|
|
|
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
|
|
|
-endif
|
|
|
-
|
|
|
-# Add defines from FPCOPTDEF to FPCOPT
|
|
|
-ifdef FPCOPTDEF
|
|
|
-override FPCOPT+=$(FPCOPTDEF)
|
|
|
-endif
|
|
|
-
|
|
|
-# Error file ?
|
|
|
-ifdef ERRORFILE
|
|
|
-override FPCOPT+=-Fr$(ERRORFILE)
|
|
|
-endif
|
|
|
-
|
|
|
-# Was a config file specified ?
|
|
|
-ifdef CFGFILE
|
|
|
-override FPCOPT+=@$(CFGFILE)
|
|
|
-endif
|
|
|
-
|
|
|
-# For win32 the options are passed using the file fpcext.cmd
|
|
|
-ifndef FPCEXTCMD
|
|
|
-FPCEXTCMD=fpcext.cmd
|
|
|
-endif
|
|
|
-ifeq ($(OS_SOURCE),win32)
|
|
|
-override TMPVAR:=$(shell "$(DEL) $(FPCEXTCMD)")
|
|
|
-override TMPVAR:=$(foreach A,$(FPCOPT),$(shell "$(ECHO) $(A) >> $(FPCEXTCMD)"))
|
|
|
-override FPCOPT:=@$(FPCEXTCMD)
|
|
|
-endif
|
|
|
-
|
|
|
-# Compiler commandline
|
|
|
-override COMPILER:=$(FPC) $(FPCOPT)
|
|
|
-
|
|
|
-
|
|
|
-[tool_default]
|
|
|
-#####################################################################
|
|
|
-# Default Tools
|
|
|
-#####################################################################
|
|
|
-
|
|
|
-# assembler, redefine it if cross compiling
|
|
|
-ifndef AS
|
|
|
-AS=as
|
|
|
-endif
|
|
|
-
|
|
|
-# linker, but probably not used
|
|
|
-ifndef LD
|
|
|
-LD=ld
|
|
|
-endif
|
|
|
-
|
|
|
-# ppas.bat / ppas.sh
|
|
|
-ifdef inlinux
|
|
|
-PPAS=ppas.sh
|
|
|
-else
|
|
|
-ifdef inOS2
|
|
|
-PPAS=ppas.cmd
|
|
|
-else
|
|
|
-PPAS=ppas.bat
|
|
|
-endif
|
|
|
-endif
|
|
|
-
|
|
|
-# also call ppas if with command option -s
|
|
|
-ifeq (,$(findstring -s ,$(COMPILER)))
|
|
|
-EXECPPAS=
|
|
|
-else
|
|
|
-EXECPPAS:=@$(PPAS)
|
|
|
-endif
|
|
|
-
|
|
|
-# ldconfig to rebuild .so cache
|
|
|
-ifdef inlinux
|
|
|
-LDCONFIG=ldconfig
|
|
|
-else
|
|
|
-LDCONFIG=
|
|
|
-endif
|
|
|
-
|
|
|
-[tool_ppdep]
|
|
|
-# ppdep
|
|
|
-ifndef PPDEP
|
|
|
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
|
|
|
-ifeq ($(PPDEP),)
|
|
|
-PPDEP=
|
|
|
-else
|
|
|
-PPDEP:=$(firstword $(PPDEP))
|
|
|
-endif
|
|
|
-endif
|
|
|
-export PPDEP
|
|
|
-
|
|
|
-[tool_ppumove]
|
|
|
-# ppumove
|
|
|
-ifndef PPUMOVE
|
|
|
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
|
|
|
-ifeq ($(PPUMOVE),)
|
|
|
-PPUMOVE=
|
|
|
-else
|
|
|
-PPUMOVE:=$(firstword $(PPUMOVE))
|
|
|
-endif
|
|
|
-endif
|
|
|
-export PPUMOVE
|
|
|
-
|
|
|
-[tool_ppufiles]
|
|
|
-# ppufiles
|
|
|
-ifndef PPUFILES
|
|
|
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
|
|
|
-ifeq ($(PPUFILES),)
|
|
|
-PPUFILES=
|
|
|
-else
|
|
|
-PPUFILES:=$(firstword $(PPUFILES))
|
|
|
-endif
|
|
|
-endif
|
|
|
-export PPUFILES
|
|
|
-
|
|
|
-[tool_data2inc]
|
|
|
-# data2inc
|
|
|
-ifndef DATA2INC
|
|
|
-DATA2INC:=$(strip $(wildcard $(addsuffix /data2inc$(EXEEXT),$(SEARCHPATH))))
|
|
|
-ifeq ($(DATA2INC),)
|
|
|
-DATA2INC=
|
|
|
-else
|
|
|
-DATA2INC:=$(firstword $(DATA2INC))
|
|
|
-endif
|
|
|
-endif
|
|
|
-export DATA2INC
|
|
|
-
|
|
|
-[tool_diff]
|
|
|
-# diff
|
|
|
-ifndef DIFF
|
|
|
-DIFF:=$(strip $(wildcard $(addsuffix /diff$(EXEEXT),$(SEARCHPATH))))
|
|
|
-ifeq ($(DIFF),)
|
|
|
-DIFF=
|
|
|
-else
|
|
|
-DIFF:=$(firstword $(DIFF))
|
|
|
+[tool_diff]
|
|
|
+# diff
|
|
|
+ifndef DIFF
|
|
|
+DIFF:=$(strip $(wildcard $(addsuffix /diff$(EXEEXT),$(SEARCHPATH))))
|
|
|
+ifeq ($(DIFF),)
|
|
|
+DIFF=
|
|
|
+else
|
|
|
+DIFF:=$(firstword $(DIFF))
|
|
|
endif
|
|
|
endif
|
|
|
export DIFF
|
|
@@ -790,6 +534,264 @@ PASEXT=.pas
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
+
|
|
|
+[dir_default]
|
|
|
+#####################################################################
|
|
|
+# Default Directories
|
|
|
+#####################################################################
|
|
|
+
|
|
|
+# set the prefix directory where to install everything
|
|
|
+ifndef PREFIXINSTALLDIR
|
|
|
+ifdef inlinux
|
|
|
+PREFIXINSTALLDIR=/usr
|
|
|
+else
|
|
|
+PREFIXINSTALLDIR=/pp
|
|
|
+endif
|
|
|
+endif
|
|
|
+export PREFIXINSTALLDIR
|
|
|
+
|
|
|
+
|
|
|
+[dir_install]
|
|
|
+#####################################################################
|
|
|
+# Install Directories
|
|
|
+#####################################################################
|
|
|
+
|
|
|
+# set the base directory where to install everything
|
|
|
+ifndef BASEINSTALLDIR
|
|
|
+ifdef inlinux
|
|
|
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
|
|
|
+else
|
|
|
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
|
|
|
+endif
|
|
|
+endif
|
|
|
+
|
|
|
+# set the directory where to install the binaries
|
|
|
+ifndef BININSTALLDIR
|
|
|
+ifdef inlinux
|
|
|
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
|
|
|
+else
|
|
|
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
|
|
|
+endif
|
|
|
+endif
|
|
|
+
|
|
|
+# set the directory where to install the units.
|
|
|
+ifndef UNITINSTALLDIR
|
|
|
+UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
|
|
|
+ifdef UNITSUBDIR
|
|
|
+UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
|
|
|
+endif
|
|
|
+endif
|
|
|
+
|
|
|
+# Where to install shared libraries
|
|
|
+ifndef LIBINSTALLDIR
|
|
|
+ifdef inlinux
|
|
|
+LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
|
|
|
+else
|
|
|
+LIBINSTALLDIR=$(UNITINSTALLDIR)
|
|
|
+endif
|
|
|
+endif
|
|
|
+
|
|
|
+# Where the source files will be stored
|
|
|
+ifndef SOURCEINSTALLDIR
|
|
|
+ifdef inlinux
|
|
|
+SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
|
|
|
+else
|
|
|
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
|
|
|
+endif
|
|
|
+endif
|
|
|
+
|
|
|
+# Where the doc files will be stored
|
|
|
+ifndef DOCINSTALLDIR
|
|
|
+ifdef inlinux
|
|
|
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
|
|
|
+else
|
|
|
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
|
|
|
+endif
|
|
|
+endif
|
|
|
+
|
|
|
+# Where the some extra (data)files will be stored
|
|
|
+ifndef DATAINSTALLDIR
|
|
|
+DATAINSTALLDIR=$(BASEINSTALLDIR)
|
|
|
+endif
|
|
|
+
|
|
|
+
|
|
|
+[dir_gcclib]
|
|
|
+# On linux, try to find where libgcc.a is.
|
|
|
+ifdef inlinux
|
|
|
+ifndef GCCLIBDIR
|
|
|
+GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
|
|
|
+endif
|
|
|
+endif
|
|
|
+export GCCLIBDIR
|
|
|
+
|
|
|
+
|
|
|
+[dir_otherlib]
|
|
|
+# Where to find other libraries
|
|
|
+ifdef inlinux
|
|
|
+ifndef OTHERLIBDIR
|
|
|
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
|
|
|
+endif
|
|
|
+endif
|
|
|
+export OTHERLIBDIR
|
|
|
+
|
|
|
+
|
|
|
+[redir]
|
|
|
+#####################################################################
|
|
|
+# Redirection
|
|
|
+#####################################################################
|
|
|
+
|
|
|
+# Release ? Then force OPT and don't use extra opts via commandline
|
|
|
+ifndef REDIRFILE
|
|
|
+REDIRFILE=log
|
|
|
+endif
|
|
|
+
|
|
|
+ifdef REDIR
|
|
|
+ifndef inlinux
|
|
|
+override FPC=redir -eo $(FPC)
|
|
|
+endif
|
|
|
+# set the verbosity to max
|
|
|
+override FPCOPT+=-va
|
|
|
+override REDIR:= >> $(REDIRFILE)
|
|
|
+endif
|
|
|
+
|
|
|
+[command_begin]
|
|
|
+#####################################################################
|
|
|
+# Compiler Command Line
|
|
|
+#####################################################################
|
|
|
+
|
|
|
+# Load commandline OPTDEF and add FPC_CPU define
|
|
|
+override FPCOPTDEF:=-d$(CPU_TARGET)
|
|
|
+
|
|
|
+# Load commandline OPT and add target and unit dir to be sure
|
|
|
+ifneq ($(OS_TARGET),$(OS_SOURCE))
|
|
|
+override FPCOPT+=-T$(OS_TARGET)
|
|
|
+endif
|
|
|
+
|
|
|
+[command_needopt]
|
|
|
+ifdef NEEDOPT
|
|
|
+override FPCOPT+=$(NEEDOPT)
|
|
|
+endif
|
|
|
+
|
|
|
+
|
|
|
+[command_needunit]
|
|
|
+ifdef NEEDUNITDIR
|
|
|
+override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
|
|
|
+endif
|
|
|
+
|
|
|
+
|
|
|
+[command_unitsdir]
|
|
|
+ifdef UNITSDIR
|
|
|
+override FPCOPT+=-Fu$(UNITSDIR)
|
|
|
+endif
|
|
|
+
|
|
|
+
|
|
|
+[command_needlib]
|
|
|
+ifdef NEEDLIBDIR
|
|
|
+override FPCOPT+=$(addprefix -Fl,$(NEEDLIBDIR))
|
|
|
+endif
|
|
|
+
|
|
|
+
|
|
|
+[command_needobj]
|
|
|
+ifdef NEEDOBJDIR
|
|
|
+override FPCOPT+=$(addprefix -Fo,$(NEEDOBJDIR))
|
|
|
+endif
|
|
|
+
|
|
|
+
|
|
|
+[command_needinc]
|
|
|
+ifdef NEEDINCDIR
|
|
|
+override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
|
|
|
+endif
|
|
|
+
|
|
|
+[command_gcclib]
|
|
|
+# Add GCC lib path if asked
|
|
|
+ifdef GCCLIBDIR
|
|
|
+override FPCOPT+=-Fl$(GCCLIBDIR)
|
|
|
+endif
|
|
|
+
|
|
|
+[command_otherlib]
|
|
|
+# Add Other dirs path if asked
|
|
|
+ifdef OTHERLIBDIR
|
|
|
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
|
|
|
+endif
|
|
|
+
|
|
|
+[command_target]
|
|
|
+# Target dirs
|
|
|
+ifdef TARGETDIR
|
|
|
+override FPCOPT+=-FE$(TARGETDIR)
|
|
|
+endif
|
|
|
+
|
|
|
+[command_unittarget]
|
|
|
+ifdef UNITTARGETDIR
|
|
|
+override FPCOPT+=-FU$(UNITTARGETDIR)
|
|
|
+endif
|
|
|
+
|
|
|
+[command_end]
|
|
|
+# Smartlinking
|
|
|
+ifdef SMARTLINK
|
|
|
+override FPCOPT+=-CX
|
|
|
+endif
|
|
|
+
|
|
|
+# Debug
|
|
|
+ifdef DEBUG
|
|
|
+override FPCOPT+=-g -dDEBUG
|
|
|
+endif
|
|
|
+
|
|
|
+# Release mode (strip, optimize and don't load ppc386.cfg)
|
|
|
+ifdef RELEASE
|
|
|
+override FPCOPT+=-Xs -OG2p3 -n
|
|
|
+endif
|
|
|
+
|
|
|
+# Verbose settings (warning,note,info)
|
|
|
+ifdef VERBOSE
|
|
|
+override FPCOPT+=-vwni
|
|
|
+endif
|
|
|
+
|
|
|
+# Add commandline options
|
|
|
+ifdef OPT
|
|
|
+override FPCOPT+=$(OPT)
|
|
|
+endif
|
|
|
+ifdef UNITDIR
|
|
|
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
|
|
|
+endif
|
|
|
+ifdef LIBDIR
|
|
|
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
|
|
|
+endif
|
|
|
+ifdef OBJDIR
|
|
|
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
|
|
|
+endif
|
|
|
+ifdef INCDIR
|
|
|
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
|
|
|
+endif
|
|
|
+
|
|
|
+# Add defines from FPCOPTDEF to FPCOPT
|
|
|
+ifdef FPCOPTDEF
|
|
|
+override FPCOPT+=$(FPCOPTDEF)
|
|
|
+endif
|
|
|
+
|
|
|
+# Error file ?
|
|
|
+ifdef ERRORFILE
|
|
|
+override FPCOPT+=-Fr$(ERRORFILE)
|
|
|
+endif
|
|
|
+
|
|
|
+# Was a config file specified ?
|
|
|
+ifdef CFGFILE
|
|
|
+override FPCOPT+=@$(CFGFILE)
|
|
|
+endif
|
|
|
+
|
|
|
+# For win32 the options are passed using the file fpcext.cmd
|
|
|
+ifndef FPCEXTCMD
|
|
|
+FPCEXTCMD=fpcext.cmd
|
|
|
+endif
|
|
|
+ifeq ($(OS_SOURCE),win32)
|
|
|
+override TMPVAR:=$(shell "$(DEL) $(FPCEXTCMD)")
|
|
|
+override TMPVAR:=$(foreach A,$(FPCOPT),$(shell "$(ECHO) $(A) >> $(FPCEXTCMD)"))
|
|
|
+override FPCOPT:=@$(FPCEXTCMD)
|
|
|
+endif
|
|
|
+
|
|
|
+# Compiler commandline
|
|
|
+override COMPILER:=$(FPC) $(FPCOPT)
|
|
|
+
|
|
|
+
|
|
|
[standardrules]
|
|
|
#####################################################################
|
|
|
# Standard rules
|
|
@@ -902,7 +904,7 @@ fpc_test: examples
|
|
|
$(FPCMADE): $(ALLTARGET)
|
|
|
@$(ECHO) Compiled > $(FPCMADE)
|
|
|
|
|
|
-fpc_packages: $(addsuffix _package,$(COMPILEPACKAGES))
|
|
|
+fpc_packages: $(COMPILEPACKAGES)
|
|
|
|
|
|
fpc_all: fpc_packages $(FPCMADE)
|
|
|
|
|
@@ -1046,7 +1048,7 @@ fpc_sourceinstall: clean
|
|
|
# Temporary path to pack a file
|
|
|
ifndef PACKDIR
|
|
|
ifndef inlinux
|
|
|
-PACKDIR=pack_tmp
|
|
|
+PACKDIR=$(BASEDIR)/pack_tmp
|
|
|
else
|
|
|
PACKDIR=/tmp/fpc-pack
|
|
|
endif
|