Initial revision
[AROS-Contrib.git] / development / compilers / freepascal / rtl / go32v2 / Makefile.fpc
blobe826cd490e1b93a65c883cf8cbe049bb51d9613d
2 #   Makefile.fpc for Go32v2 RTL
5 [targets]
6 loaders=prt0 exceptn fpu
7 units=$(SYSTEMUNIT) objpas strings \
8       go32 dpmiexcp initc ports profile dxeload emu387 \
9       dos crt objects printer graph \
10       sysutils math typinfo \
11       cpu mmx getopts heaptrc lineinfo \
12       msmouse
13 rst=math
15 [require]
16 rtl=0
18 [defaults]
19 defaulttarget=go32v2
20 defaultcpu=i386
22 [install]
23 unitsubdir=rtl
25 [dirs]
26 fpcdir=.
27 incdir=$(INC) $(PROCINC)
28 targetdir=.
31 [presettings]
32 RTL=..
33 INC=../inc
34 PROCINC=../$(CPU_TARGET)
36 UNITPREFIX=rtl
38 # Paths
39 OBJPASDIR=$(RTL)/objpas
40 GRAPHDIR=$(INC)/graph
42 # Define Go32v2 Units
43 SYSTEMUNIT=system
45 # Insert exception handler in system unit
46 ifdef EXCEPTIONS_IN_SYSTEM
47 override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
48 endif
50 # Insert exception handler in system unit
51 ifdef NO_EXCEPTIONS_IN_SYSTEM
52 override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
53 endif
55 [postsettings]
56 SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
58 # Get the system independent include file names.
59 # This will set the following variables :
60 # SYSINCNAMES
61 include $(INC)/makefile.inc
62 SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
64 # Get the processor dependent include file names.
65 # This will set the following variables :
66 # CPUINCNAMES
67 include $(PROCINC)/makefile.cpu
68 SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
70 # Put system unit dependencies together.
71 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
74 [rules]
75 vpath %$(PASEXT) $(INC) $(PROCINC)
78 # Loaders
81 prt0$(OEXT) : v2prt0.as
82         $(AS) -o prt0$(OEXT) v2prt0.as
85 # System Units (System, Objpas, Strings)
88 $(SYSTEMPPU) : system.pp $(SYSDEPS)
89         $(COMPILER) -Us -Sg system.pp $(REDIR)
91 objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMPPU)
92         $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
94 strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
95                    $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
96                    $(SYSTEMPPU)
99 # System Dependent Units
102 go32$(PPUEXT) : go32.pp $(SYSTEMPPU)
104 dpmiexcp$(PPUEXT) : dpmiexcp.pp exceptn$(OEXT) $(SYSTEMPPU)
105         $(COMPILER) -Sg dpmiexcp.pp $(REDIR)
107 initc$(PPUEXT) : initc.pp $(SYSTEMPPU)
109 profile$(PPUEXT) : profile.pp dpmiexcp$(PPUEXT) go32$(PPUEXT)
111 dxeload$(PPUEXT) : dxeload.pp $(SYSTEMPPU)
113 emu387$(PPUEXT) : emu387.pp fpu$(OEXT) strings$(PPUEXT) dxeload$(PPUEXT) \
114                   dpmiexcp$(PPUEXT)
116 ports$(PPUEXT) : ports.pp objpas$(PPUEXT) $(SYSTEMPPU)
119 # TP7 Compatible RTL Units
122 dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
123                go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
125 crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
127 objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
129 printer$(PPUEXT) : printer.pp $(SYSTEMPPU)
132 # Graph
135 include $(GRAPHDIR)/makefile.inc
136 GRAPHINCDEPS=$(addprefix $(GRAPHDIR)/,$(GRAPHINCNAMES))
138 graph$(PPUEXT) : graph.pp go32$(PPUEXT) ports$(PPUEXT) $(SYSTEMPPU) \
139                  $(GRAPHINCDEPS) vesa.inc vesah.inc dpmi.inc
140         $(COMPILER) -I$(GRAPHDIR) graph.pp $(REDIR)
143 # Delphi Compatible Units
146 sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
147                     objpas$(PPUEXT) dos$(PPUEXT) go32$(PPUEXT)
148         $(COMPILER) -I$(OBJPASDIR) sysutils.pp $(REDIR)
150 typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
151         $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
153 math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
154         $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
157 # Other system-independent RTL Units
160 cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
162 mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
164 getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
166 heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
167         $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
169 lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMPPU)
173 # Other system-dependent RTL Units
176 msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)