fpc/rtl/aix/Makefile.fpc
Pierre Muller bdfd7a66eb * Adapt initc unit to DOTTED.
* Remove OS specific initc rules.
  * Set default directory for initc main source to
    UNIXINC variable value if is is set.
  * Replace initc references by INITCUNIT variable.
  * Add dpmiexcp dependency for initc on go32v2 system
    by setting INITC_DEPS_OS.
  * Add nwsys.inc dependency for initc on netware system.
2023-09-25 01:02:48 +02:00

203 lines
5.7 KiB
Makefile

#
# Makefile.fpc for Free Pascal AIX RTL
#
[package]
main=rtl
[target]
loaders=
units=$(SYSTEMUNIT) $(UUCHARUNIT) unixtype ctypes $(STRINGSUNIT) $(OBJPASUNIT) $(ISO7185UNIT) $(EXTPASUNIT) $(MACPASUNIT) \
$(HEAPTRCUNIT) \
baseunix unixutil \
$(TERMIOUNIT) unix $(INITCUNIT) $(CMEMUNIT) \
$(LNFOGDBUNIT) \
sysutils typinfo $(MATHUNIT) $(SORTBASEUNIT) $(FGLUNIT) classes \
$(CHARSETUNIT) $(CPALLUNIT) $(CHARACTERUNIT) $(UNIXCPUNIT) $(GETOPTSUNIT) \
$(ERRORSUNIT) \
# ipc
$(DLUNIT) $(DYNLIBSUNIT) \
types sysconst \
rtlconsts cthreads \
dos \
cwstring $(FPWIDESTRINGUNIT) $(FPINTRESUNIT) $(CPU_UNITS) \
$(SOFTFPUUNIT) $(SFPUX80UNIT) $(UFLOATX80UNIT) $(SFPU128UNIT) $(UFLOAT128UNIT)
implicitunits=$(CP_UNITS) $(UNICODEDATAUNIT)
rsts=$(MATHUNIT) typinfo classes sysconst rtlconst
[require]
nortl=y
[install]
fpcpackage=y
[default]
target=aix
[compiler]
includedir=$(INC) $(PROCINC) $(UNIXINC) # $(OSPROCINC)
sourcedir=$(INC) $(PROCINC) $(UNIXINC) $(COMMON)
[lib]
libname=libfprtl.so
libversion=2.0.0
libunits=$(SYSTEMUNIT) $(OBJPASUNIT) $(STRINGSUNIT) \
unix \
dos crt \
sysutils typinfo $(MATHUNIT) \
$(CPU_UNITS) $(GETOPTSUNIT) $(HEAPTRCUNIT) \
$(ERRORSUNIT) sockets
[prerules]
RTL=..
INC=$(RTL)/inc
COMMON=$(RTL)/common
PROCINC=$(RTL)/$(CPU_TARGET)
OSPROCINC=$(RTL)/aix/$(CPU_TARGET)
UNIXINC=$(RTL)/unix
UNITPREFIX=rtl
CPU_UNITS=
DYNLIBS_DEPS_OS=$(DLUNIT)$(PPUEXT)
DYNLIBSINCDIR=$(UNIXINC)
DL_DEPS_OS=$(DLUNIT)aix.inc
TERMIO_DEPS_OS=$(UNIXTYPEUNIT)$(PPUEXT) $(CTYPESUNIT)$(PPUEXT)
SYSTEMUNIT=system
ifeq ($(ARCH),i386)
CPU_UNITS=cpu $(MMXUNIT)
endif
ifeq ($(ARCH),x86_64)
CPU_UNITS=cpu
SYSINIT_UNITS= # si_prc si_c si_dll
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
# AIX requires libc, no syscalls
override FPCOPT+=-dFPC_USE_LIBC
# Paths
OBJPASDIR=$(RTL)/objpas
[rules]
.NOTPARALLEL:
# 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) : $(SYSTEMUNIT).pp $(SYSDEPS)
$(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg $(SYSTEMUNIT).pp
#
# System Dependent Units
#
baseunix$(PPUEXT) : unixtype$(PPUEXT) errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \
signal.inc $(UNIXINC)/bunxh.inc \
ostypes.inc osmacro.inc $(UNIXINC)/gensigset.inc \
$(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $(UNIXINC)/baseunix.pp
unixtype$(PPUEXT) : $(UNIXINC)/unixtype.pp ptypes.inc $(UNIXINC)/ctypes.inc $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $(UNIXINC)/unixtype.pp
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)
$(COMPILER) $(UNIXINC)/unix.pp
unixutil$(PPUEXT) : $(UNIXINC)/unixutil.pp baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $(UNIXINC)/unixutil.pp
#
# TP7 Compatible RTL Units
#
dos$(PPUEXT) : strings$(PPUEXT) unix$(PPUEXT) $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $(UNIXINC)/dos.pp
#
# Graph
#
#
# Delphi Compatible Units
#
sysutils$(PPUEXT) : $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
$(OBJPASUNIT)$(PPUEXT) unix$(PPUEXT) $(ERRORSUNIT)$(PPUEXT) sysconst$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) -Fi$(OBJPASDIR)/sysutils $(UNIXINC)/sysutils.pp
classes$(PPUEXT) : $(UNIXINC)/classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT) \
$(SYSTEMUNIT)$(PPUEXT) $(FGLUNIT)$(PPUEXT) sortbase$(PPUEXT)
$(COMPILER) -Fi$(OBJPASDIR)/classes $(UNIXINC)/classes.pp
typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp $(OBJPASUNIT)$(PPUEXT) sysutils$(PPUEXT) rtlconsts$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
types$(PPUEXT) : $(OBJPASDIR)/types.pp $(OBJPASUNIT)$(PPUEXT) $(MATHUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/types.pp
sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp $(OBJPASUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/sysconst.pp
rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp $(OBJPASUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/rtlconsts.pp
#
# Other system-independent RTL Units
#
ifeq ($(ARCH),x86_64)
cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT)
$(COMPILER) $(PROCINC)/cpu.pp
else
cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $(PROCINC)/cpu.pp
endif
#
# Other system-dependent RTL Units
#
cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp sysutils$(PPUEXT) baseunix$(PPUEXT) unixtype$(PPUEXT) unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
$(COMPILER) $(UNIXINC)/cthreads.pp
cwstring$(PPUEXT) : $(UNIXINC)/cwstring.pp $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT) baseunix$(PPUEXT) unix$(PPUEXT) unixtype$(PPUEXT) ctypes$(PPUEXT) $(DYNLIBSUNIT)$(PPUEXT)
$(COMPILER) $(UNIXINC)/cwstring.pp
gpm$(PPUEXT): gpm.pp unix$(PPUEXT) baseunix$(PPUEXT) sockets$(PPUEXT)
ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)
$(COMPILER) $(INC)/ctypes.pp