mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 09:39:25 +02:00

+ automatically loaded helper unit * Makefiles adapted * mode switch * mode switches reorganized + TimeStamp support git-svn-id: trunk@32330 -
222 lines
6.2 KiB
Makefile
222 lines
6.2 KiB
Makefile
#
|
|
# Makefile.fpc for Free Pascal EMX RTL
|
|
#
|
|
|
|
[package]
|
|
main=rtl
|
|
|
|
[target]
|
|
loaders=prt0 prt1
|
|
units=$(SYSTEMUNIT) uuchar objpas macpas iso7185 extpas strings \
|
|
ports os2def doscalls doscall2 moncalls kbdcalls moucalls viocalls \
|
|
pmbitmap pmwin pmgpi pmstddlg pmhelp pmdev pmspl pmshl pmwp pmwsock pmbidi \
|
|
dos \
|
|
sysutils classes fgl math typinfo \
|
|
charset cpall cpu mmx getopts heaptrc lnfodwrf lineinfo dynlibs \
|
|
types rtlconst sysconst \
|
|
ctypes
|
|
rsts=math typinfo pmhelp classes sysconst
|
|
implicitunits=exeinfo \
|
|
cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
|
|
cp437 cp646 cp850 cp856 cp866 cp874 cp8859_1 cp8859_5 cp8859_2 cp852
|
|
|
|
[require]
|
|
nortl=y
|
|
|
|
[install]
|
|
fpcpackage=y
|
|
|
|
[default]
|
|
fpcdir=../..
|
|
target=emx
|
|
cpu=i386
|
|
|
|
[compiler]
|
|
includedir=$(INC) $(PROCINC) $(OS2INC)
|
|
sourcedir=$(INC) $(PROCINC) $(OS2INC)
|
|
|
|
|
|
[prerules]
|
|
RTL=..
|
|
INC=$(RTL)/inc
|
|
PROCINC=$(RTL)/$(CPU_TARGET)
|
|
OS2INC=$(RTL)/os2
|
|
|
|
UNITPREFIX=rtl
|
|
|
|
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
|
|
SYSTEMUNIT=system
|
|
else
|
|
SYSTEMUNIT=sysemx
|
|
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
|
|
|
|
# Paths
|
|
OBJPASDIR=$(RTL)/objpas
|
|
GRAPHDIR=$(INC)/graph
|
|
|
|
[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)
|
|
|
|
|
|
#
|
|
# Loaders
|
|
#
|
|
|
|
%$(OEXT) : %.as
|
|
$(AS) -o $(UNITTARGETDIRPREFIX)$*$(OEXT) $*.as
|
|
|
|
#
|
|
# Base Units (System, strings, os-dependent-base-unit)
|
|
#
|
|
|
|
$(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pas $(SYSDEPS)
|
|
$(COMPILER) -Us -Sg $(SYSTEMUNIT).pas
|
|
|
|
uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
|
|
|
|
objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
|
|
|
|
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
|
|
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
|
|
$(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
#
|
|
# System Dependent Units
|
|
#
|
|
|
|
ports$(PPUEXT) : ports.pas objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
doscalls$(PPUEXT) : $(OS2INC)/doscalls.pas strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
kbdcalls$(PPUEXT) : $(OS2INC)/kbdcalls.pas $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
moucalls$(PPUEXT) : $(OS2INC)/moucalls.pas $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
moncalls$(PPUEXT) : $(OS2INC)/moncalls.pas strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
os2def$(PPUEXT) : $(OS2INC)/os2def.pas $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
doscall2$(PPUEXT) : $(OS2INC)/doscall2.pas doscalls$(PPUEXT) os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
pmwin$(PPUEXT) : $(OS2INC)/pmwin.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
pmbitmap$(PPUEXT) : $(OS2INC)/pmbitmap.pas $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
pmgpi$(PPUEXT) : $(OS2INC)/pmgpi.pas pmbitmap$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
pmstddlg$(PPUEXT) : $(OS2INC)/pmstddlg.pas os2def$(PPUEXT) doscalls$(PPUEXT) pmwin$(PPUEXT) pmgpi$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
pmhelp$(PPUEXT) : $(OS2INC)/pmhelp.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
pmdev$(PPUEXT) : $(OS2INC)/pmdev.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
pmspl$(PPUEXT) : $(OS2INC)/pmspl.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
pmshl$(PPUEXT) : $(OS2INC)/pmshl.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
pmwp$(PPUEXT) : $(OS2INC)/pmwp.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
pmwsock$(PPUEXT) : $(OS2INC)/pmwsock.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
pmbidi$(PPUEXT) : $(OS2INC)/pmbidi.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
dynlibs$(PPUEXT) : $(INC)/dynlibs.pas doscalls$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
#
|
|
# TP7 Compatible RTL Units
|
|
#
|
|
|
|
dos$(PPUEXT) : dos.pas $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
|
|
doscalls$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
|
|
#graph$(PPUEXT) : graph.pp
|
|
|
|
#
|
|
# Delphi Compatible Units
|
|
#
|
|
|
|
sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
|
|
objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
|
|
|
|
classes$(PPUEXT) : $(OS2INC)/classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
|
|
sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT) types$(PPUEXT) \
|
|
objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) fgl$(PPUEXT)
|
|
$(COMPILER) -Fi$(OBJPASDIR)/classes $(OS2INC)/classes.pp
|
|
|
|
math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/math.pp
|
|
|
|
typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT) rtlconst$(PPUEXT)
|
|
$(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
|
|
|
|
types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/types.pp
|
|
|
|
fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/fgl.pp
|
|
|
|
rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/rtlconst.pp
|
|
|
|
sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/sysconst.pp
|
|
|
|
|
|
#
|
|
# Mac Pascal Model
|
|
#
|
|
|
|
macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
|
|
$(COMPILER) $(INC)/macpas.pp $(REDIR)
|
|
|
|
#
|
|
# Other system-independent RTL Units
|
|
#
|
|
|
|
cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
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)
|
|
|
|
lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
|
|
$(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
|
|
|
|
ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
#
|
|
# Other system-dependent RTL Units
|