fpc/rtl/msdos/Makefile.fpc
nickysn 0236c2823a + added startup modules for compact, large and huge model that define the
memory model and include the common startup code prt0comn.asm (which is not
  yet adapted for the new models, but eventually will be)

git-svn-id: trunk@27262 -
2014-03-24 13:42:42 +00:00

230 lines
7.4 KiB
Makefile

#
# Makefile.fpc for MSDOS RTL
#
[package]
main=rtl
[target]
loaders=prt0s prt0t prt0m prt0c prt0l prt0h # exceptn fpu
units=system uuchar objpas strings dos heaptrc lineinfo sysconst sysutils \
math macpas iso7185 rtlconst typinfo types \
strutils getopts fgl classes \
msmouse ports \
printer charset cpall ctypes
# cmem
# initc profile dxetype dxeload emu387 \
# cpu mmx lnfodwrf \
# video mouse vesamode \
# rsts=math varutils typinfo classes variants dateutil 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
# cp932 cp936 cp949 cp950
[require]
nortl=y
[install]
fpcpackage=y
[default]
fpcdir=../..
target=msdos
cpu=i8086
[compiler]
includedir=$(INC) $(PROCINC)
sourcedir=$(INC) $(PROCINC) $(COMMON)
[prerules]
RTL=..
INC=../inc
COMMON=$(RTL)/common
PROCINC=../$(CPU_TARGET)
UNITPREFIX=rtl
SYSTEMUNIT=system
# Paths
OBJPASDIR=$(RTL)/objpas
# Insert exception handler in system unit
ifdef EXCEPTIONS_IN_SYSTEM
override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
endif
# Insert exception handler in system unit
ifdef NO_EXCEPTIONS_IN_SYSTEM
override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
endif
[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
#
prt0s$(OEXT) : prt0s.asm prt0comn.asm
$(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0s$(OEXT) prt0s.asm
prt0t$(OEXT) : prt0t.asm prt0comn.asm
$(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0t$(OEXT) prt0t.asm
prt0m$(OEXT) : prt0m.asm prt0comn.asm
$(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0m$(OEXT) prt0m.asm
prt0c$(OEXT) : prt0c.asm prt0comn.asm
$(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0c$(OEXT) prt0c.asm
prt0l$(OEXT) : prt0l.asm prt0comn.asm
$(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0l$(OEXT) prt0l.asm
prt0h$(OEXT) : prt0h.asm prt0comn.asm
$(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0h$(OEXT) prt0h.asm
#
# System Units (System, Objpas, Strings)
#
system$(PPUEXT) : system.pp $(SYSDEPS)
$(COMPILER) -Us -Sg system.pp
uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
$(COMPILER) $(INC)/uuchar.pp
objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
$(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
system$(PPUEXT)
$(COMPILER) $(INC)/strings.pp
iso7185$(PPUEXT) : $(INC)/iso7185.pp system$(PPUEXT)
$(COMPILER) $(INC)/iso7185.pp
#
# System Dependent Units
#
initc$(PPUEXT) : initc.pp system$(PPUEXT)
profile$(PPUEXT) : profile.pp dpmiexcp$(PPUEXT) go32$(PPUEXT)
dxetype$(PPUEXT) : dxetype.pp system$(PPUEXT)
dxeload$(PPUEXT) : dxeload.pp dxetype$(PPUEXT) system$(PPUEXT)
emu387$(PPUEXT) : emu387.pp fpu$(OEXT) strings$(PPUEXT) dxeload$(PPUEXT) \
dpmiexcp$(PPUEXT)
ports$(PPUEXT) : ports.pp objpas$(PPUEXT) system$(PPUEXT)
$(COMPILER) ports.pp
#
# TP7 Compatible RTL Units
#
dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
strings$(PPUEXT) system$(PPUEXT)
$(COMPILER) dos.pp
crt$(PPUEXT) : crt.pp $(INC)/textrec.inc dos$(PPUEXT) system$(PPUEXT)
$(COMPILER) crt.pp
objects$(PPUEXT) : $(INC)/objects.pp system$(PPUEXT)
$(COMPILER) $(INC)/objects.pp
printer$(PPUEXT) : printer.pp system$(PPUEXT)
$(COMPILER) printer.pp
#
# Delphi Compatible Units
#
sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT)
$(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT) types$(PPUEXT) fgl$(PPUEXT)
$(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/fgl.pp
math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/math.pp
typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT) rtlconst$(PPUEXT)
$(COMPILER) -Sg -Fi$(OBJPASDIR) $(OBJPASDIR)/typinfo.pp
varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
$(OBJPASDIR)/varutilh.inc varutils.pp sysutils$(PPUEXT)
$(COMPILER) -I$(OBJPASDIR) varutils.pp
variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT) sysutils$(PPUEXT) sysconst$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT)
$(COMPILER) -Fi$(INC) $(INC)/variants.pp
fmtbcd$(PPUEXT) : $(OBJPASDIR)/fmtbcd.pp objpas$(PPUEXT) sysutils$(PPUEXT) variants$(PPUEXT) classes$(PPUEXT) system$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/fmtbcd.pp
types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/types.pp
rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp
$(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/rtlconst.pp
sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/sysconst.pp
dateutil$(PPUEXT) : $(OBJPASDIR)/dateutil.pp
$(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/dateutil.pp
convutil$(PPUEXT) : $(OBJPASDIR)/convutil.pp
$(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/convutil.pp
strutils$(PPUEXT) : $(OBJPASDIR)/strutils.pp
$(COMPILER) $(OBJPASDIR)/strutils.pp
stdconvs$(PPUEXT) : $(OBJPASDIR)/stdconvs.pp objpas$(PPUEXT) system$(PPUEXT) \
sysutils$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/stdconvs.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 system$(PPUEXT)
$(COMPILER) (PROCINC)/cpu.pp $(REDIR)
mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) system$(PPUEXT)
$(COMPILER) (PROCINC)/mmx.pp $(REDIR)
getopts$(PPUEXT) : $(INC)/getopts.pp system$(PPUEXT)
$(COMPILER) $(INC)/getopts.pp $(REDIR)
heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
$(COMPILER) -Sg $(INC)/heaptrc.pp
lineinfo$(PPUEXT) : $(INC)/lineinfo.pp system$(PPUEXT)
$(COMPILER) $(INC)/lineinfo.pp
lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp system$(PPUEXT)
$(COMPILER) $(INC)/lnfodwrf.pp
charset$(PPUEXT) : $(INC)/charset.pp system$(PPUEXT)
$(COMPILER) $(INC)/charset.pp
cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
$(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
matrix$(PPUEXT) : $(INC)/matrix.pp system$(PPUEXT)
$(COMPILER) $(INC)/matrix.pp
ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) system$(PPUEXT)
$(COMPILER) $(INC)/ucomplex.pp $(REDIR)
#
# Other system-dependent RTL Units
#
msmouse$(PPUEXT) : msmouse.pp system$(PPUEXT)
$(COMPILER) msmouse.pp $(REDIR)
callspec$(PPUEXT) : $(INC)/callspec.pp system$(PPUEXT)
$(COMPILER) $(INC)/callspec.pp $(REDIR)
ctypes$(PPUEXT) : $(INC)/ctypes.pp system$(PPUEXT)
$(COMPILER) $(INC)/ctypes.pp $(REDIR)