mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-24 01:56:23 +02:00

* also made lnfodwrf dependent on lineinfo for all platforms, because both units implicitly depend on the exeinfo unit and if both are compiled at the same time they can fall over each other while writing its .ppu or .s file git-svn-id: trunk@33039 -
287 lines
8.8 KiB
Makefile
287 lines
8.8 KiB
Makefile
#
|
|
# Makefile.fpc for Free Pascal Darwin RTL
|
|
#
|
|
|
|
[package]
|
|
main=rtl
|
|
|
|
# disabled units: serial
|
|
[target]
|
|
loaders=
|
|
units=$(SYSTEMUNIT) uuchar unixtype ctypes objpas macpas iso7185 extpas \
|
|
strings sysctl baseunix unixutil \
|
|
unix initc cmem dynlibs $(CPU_UNITS) \
|
|
dos dl blockrtl \
|
|
sysutils typinfo fgl classes math types \
|
|
charset cpall character getopts heaptrc lineinfo lnfodwrf lnfogdb \
|
|
errors termio \
|
|
sysconst cthreads rtlconsts cwstring bsd fpwidestring \
|
|
fpintres fpextres objc objcbase unixcp
|
|
implicitunits=exeinfo \
|
|
cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
|
|
cp437 cp646 cp850 cp856 cp866 cp874 cp8859_1 cp8859_5 cp8859_2 cp852 \
|
|
unicodedata unicodenumtable
|
|
|
|
rsts=math typinfo classes sysconst rtlconsts
|
|
|
|
[require]
|
|
nortl=y
|
|
|
|
[install]
|
|
fpcpackage=y
|
|
|
|
[default]
|
|
fpcdir=../..
|
|
target=darwin
|
|
|
|
[compiler]
|
|
includedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(OSPROCINC)
|
|
sourcedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(COMMON)
|
|
|
|
|
|
[lib]
|
|
libname=libfprtl.so
|
|
libversion=2.0.0
|
|
libunits=$(SYSTEMUNIT) objpas strings \
|
|
unix \
|
|
dos crt objects \
|
|
sysutils typinfo math \
|
|
cpu mmx getopts heaptrc \
|
|
errors
|
|
|
|
[prerules]
|
|
ifeq ($(CPU_TARGET),i386)
|
|
CPU_UNITS=mmx cpu
|
|
endif
|
|
|
|
ifeq ($(ARCH),x86_64)
|
|
CPU_UNITS=cpu
|
|
endif
|
|
|
|
RTL=..
|
|
INC=$(RTL)/inc
|
|
COMMON=$(RTL)/common
|
|
PROCINC=$(RTL)/$(CPU_TARGET)
|
|
BSDINC=$(RTL)/bsd
|
|
BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
|
|
OSPROCINC=$(RTL)/darwin/$(CPU_TARGET)
|
|
UNIXINC=$(RTL)/unix
|
|
UNITPREFIX=rtl
|
|
|
|
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
|
|
SYSTEMUNIT=system
|
|
override FPCOPT+=-dNOMOUSE
|
|
else
|
|
SYSTEMUNIT="Error: Darwin is not supported for 1.0"
|
|
endif
|
|
|
|
# Use new feature from 1.0.5 version
|
|
# that generates release PPU files
|
|
# which will not be recompiled
|
|
ifdef RELEASE
|
|
override FPCOPT+=-Ur
|
|
endif
|
|
|
|
# Darwin requires libc, no syscalls
|
|
override FPCOPT+=-dFPC_USE_LIBC
|
|
|
|
# Paths
|
|
OBJPASDIR=$(RTL)/objpas
|
|
GRAPHDIR=$(INC)/graph
|
|
|
|
# Use new graph unit ?
|
|
# NEWGRAPH=YES
|
|
# Use LibGGI ?
|
|
# Use
|
|
#
|
|
ifndef USELIBGGI
|
|
USELIBGGI=NO
|
|
endif
|
|
|
|
|
|
[rules]
|
|
# Get the system independent include file names.
|
|
# This will set the following variables :
|
|
# SYSINCNAMES
|
|
include $(INC)/makefile.inc
|
|
SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
|
|
|
|
# Get the processor dependent include file names.
|
|
# This will set the following variables :
|
|
# CPUINCNAMES
|
|
include $(PROCINC)/makefile.cpu
|
|
SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
|
|
|
|
# Put system unit dependencies together.
|
|
SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
|
|
|
|
|
|
#
|
|
# System Units (System, Objpas, Strings)
|
|
#
|
|
|
|
$(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp $(SYSDEPS)
|
|
$(COMPILER) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp
|
|
|
|
uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
|
|
|
|
fpintres$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
fpextres$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) baseunix$(PPUEXT)
|
|
|
|
iso7185$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) $(INC)/iso7185.pp
|
|
|
|
extpas$(PPUEXT) : $(INC)/extpas.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) $(INC)/extpas.pp
|
|
|
|
objpas$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
|
|
|
|
strings$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/strings.pp $(INC)/stringsi.inc\
|
|
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
|
|
$(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
objc$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) ctypes$(PPUEXT) unixtype$(PPUEXT) $(INC)/objc.pp $(INC)/objc1.inc $(INC)/objcnf.inc
|
|
|
|
objcbase$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/objcbase.pp objc$(PPUEXT)
|
|
|
|
blockrtl$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) initc$(PPUEXT) ctypes$(PPUEXT) $(INC)/blockrtl.pp
|
|
|
|
#
|
|
# System Dependent Units
|
|
#
|
|
|
|
baseunix$(PPUEXT) : unixtype$(PPUEXT) sysctl$(PPUEXT) errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \
|
|
signal.inc $(UNIXINC)/bunxh.inc \
|
|
$(BSDINC)/bunxsysc.inc \
|
|
$(BSDINC)/ostypes.inc $(BSDINC)/osmacro.inc $(UNIXINC)/gensigset.inc \
|
|
$(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
unixtype$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(UNIXINC)/unixtype.pp ptypes.inc $(UNIXINC)/ctypes.inc $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
unix$(PPUEXT) : unixtype$(PPUEXT) baseunix$(PPUEXT) unixutil$(PPUEXT) strings$(PPUEXT) $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
|
|
unxconst.inc $(UNIXINC)/timezone.inc \
|
|
unxfunc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
unixutil$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
dynlibs$(PPUEXT) : dl$(PPUEXT) objpas$(PPUEXT) rtlconsts$(PPUEXT) sysutils$(PPUEXT) sysconst$(PPUEXT)
|
|
|
|
ctypes$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)
|
|
|
|
unixcp$(PPUEXT) : $(UNIXINC)/unixcp.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) baseunix$(PPUEXT)
|
|
$(COMPILER) $(UNIXINC)/unixcp.pp
|
|
|
|
#
|
|
# TP7 Compatible RTL Units
|
|
#
|
|
|
|
dos$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT) unix$(PPUEXT) $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
|
|
unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
|
|
#
|
|
# Graph
|
|
#
|
|
|
|
#
|
|
# Delphi Compatible Units
|
|
#
|
|
|
|
sysutils$(PPUEXT) : objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT) sysconst$(PPUEXT) $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
|
|
objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT) sysconst$(PPUEXT)
|
|
$(COMPILER) -Fi$(OBJPASDIR)/sysutils $(UNIXINC)/sysutils.pp
|
|
|
|
classes$(PPUEXT) : sysutils$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT) typinfo$(PPUEXT) unix$(PPUEXT) $(UNIXINC)/classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
|
|
sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT) fgl$(PPUEXT)
|
|
$(COMPILER) -Fi$(OBJPASDIR)/classes $(UNIXINC)/classes.pp
|
|
|
|
typinfo$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT) rtlconsts$(PPUEXT)
|
|
$(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
|
|
|
|
# let it depend on buildcollations to prevent simultaneous building of unicodedata
|
|
character$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/character.pas objpas$(PPUEXT) rtlconsts$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/character.pas
|
|
|
|
math$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/math.pp
|
|
|
|
gettext$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/gettext.pp
|
|
|
|
types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/types.pp
|
|
|
|
fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/fgl.pp
|
|
|
|
sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/sysconst.pp
|
|
|
|
rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/rtlconsts.pp
|
|
|
|
#
|
|
# Mac Pascal Model
|
|
#
|
|
|
|
macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
|
|
$(COMPILER) $(INC)/macpas.pp $(REDIR)
|
|
|
|
#
|
|
# Other system-independent RTL Units
|
|
#
|
|
|
|
ifneq ($(findstring $(ARCH),x86_64 i386),)
|
|
cpu$(PPUEXT) : $(PROCINC)/cpu.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT)
|
|
else
|
|
cpu$(PPUEXT) : $(PROCINC)/cpu.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
endif
|
|
|
|
mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) -Sg $(INC)/heaptrc.pp
|
|
|
|
lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT) $(INC)/exeinfo.pp sysutils$(PPUEXT)
|
|
|
|
lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT) $(INC)/exeinfo.pp lineinfo$(PPUEXT) sysutils$(PPUEXT)
|
|
|
|
lnfogdb$(PPUEXT) : $(UNIXINC)/lnfogdb.pp $(SYSTEMUNIT)$(PPUEXT) ctypes$(PPUEXT) baseunix$(PPUEXT) unix$(PPUEXT)
|
|
|
|
charset$(PPUEXT) : $(INC)/charset.pp objpas$(PPUEXT)
|
|
|
|
cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
|
|
$(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
|
|
|
|
fpwidestring$(PPUEXT): $(OBJPASDIR)/fpwidestring.pp character$(PPUEXT) unixcp$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/fpwidestring.pp
|
|
#
|
|
# Other system-dependent RTL Units
|
|
#
|
|
|
|
termio$(PPUEXT) : baseunix$(PPUEXT)
|
|
|
|
dl$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT) ctypes$(PPUEXT)
|
|
|
|
errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT)
|
|
|
|
cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)
|
|
|
|
cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp unix$(PPUEXT) sysutils$(PPUEXT)
|
|
|
|
initc$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) ctypes$(PPUEXT)
|
|
|
|
# console$(PPUEXT) : baseunix$(PPUEXT) termio$(PPUEXT)
|
|
|
|
ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
cwstring$(PPUEXT) : $(UNIXINC)/cwstring.pp $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT) baseunix$(PPUEXT) unix$(PPUEXT) unixtype$(PPUEXT) ctypes$(PPUEXT) dynlibs$(PPUEXT) unixcp$(PPUEXT)
|
|
|
|
bsd$(PPUEXT) : initc$(PPUEXT) unix$(PPUEXT)
|