mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-29 12:03:47 +02:00
188 lines
4.5 KiB
Makefile
188 lines
4.5 KiB
Makefile
#
|
|
# Makefile.fpc for Free Pascal Win32 RTL
|
|
#
|
|
|
|
[targets]
|
|
loaders=wprt0 wdllprt0
|
|
units=$(SYSTEMUNIT) objpas strings \
|
|
windows ole2 opengl32 os_types winsock initc \
|
|
dos crt objects graph \
|
|
sysutils typinfo math varutils \
|
|
cpu mmx getopts heaptrc lineinfo \
|
|
wincrt winmouse sockets printer dynlibs
|
|
rst=math varutils
|
|
|
|
[require]
|
|
rtl=0
|
|
|
|
[defaults]
|
|
defaulttarget=win32
|
|
defaultcpu=i386
|
|
|
|
[install]
|
|
unitsubdir=rtl
|
|
|
|
[dirs]
|
|
fpcdir=.
|
|
incdir=$(INC) $(PROCINC)
|
|
targetdir=.
|
|
|
|
|
|
[presettings]
|
|
RTL=..
|
|
INC=$(RTL)/inc
|
|
PROCINC=$(RTL)/$(CPU_TARGET)
|
|
WININC=wininc
|
|
|
|
UNITPREFIX=rtl
|
|
|
|
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
|
|
SYSTEMUNIT=system
|
|
else
|
|
SYSTEMUNIT=syswin32
|
|
endif
|
|
|
|
# Paths
|
|
OBJPASDIR=$(RTL)/objpas
|
|
GRAPHDIR=$(INC)/graph
|
|
|
|
# Files used by windows.pp
|
|
include $(WININC)/makefile.inc
|
|
|
|
WINDOWS_SOURCE_FILES=$(addprefix $(WININC)/,$(addsuffix .inc,$(WINDOWS_FILES)))
|
|
|
|
|
|
[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 %$(PASEXT) $(INC) $(PROCINC)
|
|
|
|
#
|
|
# Loaders
|
|
#
|
|
|
|
override AS=asw
|
|
|
|
wprt0$(OEXT) : wprt0.as
|
|
$(AS) -o wprt0$(OEXT) wprt0.as
|
|
|
|
wdllprt0$(OEXT) : wdllprt0.as
|
|
$(AS) -o wdllprt0$(OEXT) wdllprt0.as
|
|
|
|
|
|
#
|
|
# System Units (System, Objpas, Strings)
|
|
#
|
|
|
|
$(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp win32.inc $(SYSDEPS)
|
|
$(COMPILER) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
|
|
|
|
objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
|
|
|
|
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
|
|
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
|
|
$(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
#
|
|
# System Dependent Units
|
|
#
|
|
|
|
windows$(PPUEXT) : windows.pp $(WINDOWS_SOURCE_FILES) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) -I$(WININC) windows.pp $(REDIR)
|
|
|
|
ole2$(PPUEXT) : ole2.pp windows$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
opengl32$(PPUEXT) : opengl32.pp windows$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
os_types$(PPUEXT) : $(INC)/os_types.pp
|
|
|
|
winsock$(PPUEXT) : winsock.pp windows$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) os_types$(PPUEXT)
|
|
|
|
sockets$(PPUEXT) : sockets.pp windows$(PPUEXT) winsock$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
|
|
$(INC)/sockets.inc $(INC)/socketsh.inc
|
|
|
|
initc$(PPUEXT) : initc.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
wincrt$(PPUEXT) : wincrt.pp $(SYSTEMUNIT)$(PPUEXT) windows$(PPUEXT) graph$(PPUEXT)
|
|
|
|
winmouse$(PPUEXT) : winmouse.pp $(SYSTEMUNIT)$(PPUEXT) windows$(PPUEXT) graph$(PPUEXT)
|
|
|
|
dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT)
|
|
|
|
#
|
|
# TP7 Compatible RTL Units
|
|
#
|
|
|
|
dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT)
|
|
|
|
objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
#
|
|
# Graph
|
|
#
|
|
|
|
include $(GRAPHDIR)/makefile.inc
|
|
GRAPHINCDEPS=$(addprefix $(GRAPHDIR)/,$(GRAPHINCNAMES))
|
|
|
|
graph$(PPUEXT) : graph.pp strings$(PPUEXT) windows$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
|
|
$(GRAPHINCDEPS)
|
|
$(COMPILER) -I$(GRAPHDIR) graph.pp $(REDIR)
|
|
|
|
|
|
#
|
|
# Delphi Compatible Units
|
|
#
|
|
|
|
sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
|
|
objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT)
|
|
$(COMPILER) -I$(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)
|
|
|
|
varutils$(PPUEXT) : varutils.pp $(OBJPASDIR)/cvarutil.inc \
|
|
$(OBJPASDIR)/varutilh.inc
|
|
$(COMPILER) -I$(OBJPASDIR) varutils.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 $(REDIR)
|
|
|
|
lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
#
|
|
# Other system-dependent RTL Units
|
|
#
|