fpc/rtl/os2/Makefile.fpc
peter c1fabab00b * FPCDIR setting/detect
* lot of other updates to create .deb files correctly
2000-01-06 01:29:48 +00:00

144 lines
3.0 KiB
Makefile

#
# Makefile.fpc for Free Pascal OS/2 RTL
#
[targets]
loaders=prt0 prt1 code2 code3
units=$(SYSTEMUNIT) objpas strings \
os2def doscalls moncalls kbdcalls viocalls \
dos crt objects printer \
sysutils math typinfo \
cpu mmx getopts heaptrc
[require]
rtl=0
[defaults]
defaulttarget=os2
defaultcpu=i386
[install]
unitsubdir=rtl
[dirs]
fpcdir=.
incdir=$(INC) $(PROCINC)
targetdir=.
[presettings]
RTL=..
INC=$(RTL)/inc
PROCINC=$(RTL)/$(CPU_TARGET)
UNITPREFIX=rtl
# Paths
OBJPASDIR=$(RTL)/objpas
GRAPHDIR=$(INC)/graph
# Define Go32v2 Units
SYSTEMUNIT=sysos2
[postsettings]
SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
# 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)
[rules]
vpath %.pas $(INC) $(PROCINC)
vpath %.pp $(INC) $(PROCINC)
#
# Loaders
#
%$(OEXT) : %.as
as -o $*$(OEXT) $*.as
#
# Base Units (System, strings, os-dependent-base-unit)
#
$(SYSTEMPPU) : sysos2.pas $(SYSDEPS)
$(COMPILER) -Us -Sg sysos2.pas $(REDIR)
objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMPPU)
$(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
$(SYSTEMPPU)
#
# System Dependent Units
#
doscalls$(PPUEXT) : doscalls.pas strings$(PPUEXT) objects$(PPUEXT) $(SYSTEMPPU)
kbdcalls$(PPUEXT) : kbdcalls.pas $(SYSTEMPPU)
moncalls$(PPUEXT) : moncalls.pas strings$(PPUEXT) $(SYSTEMPPU)
#
# TP7 Compatible RTL Units
#
dos$(PPUEXT) : dos.pas $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
$(SYSTEMPPU)
crt$(PPUEXT) : crt.pas $(INC)/textrec.inc $(SYSTEMPPU)
objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
printer$(PPUEXT) : printer.pas $(INC)/textrec.inc $(SYSTEMPPU)
#graph$(PPUEXT) : graph.pp
#
# Delphi Compatible Units
#
sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
filutil.inc disk.inc objpas$(PPUEXT)
$(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/sysutils.pp $(REDIR)
typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
$(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
#
# Other system-independent RTL Units
#
cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
$(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
#
# Other system-dependent RTL Units
#