1#
2#   Makefile.fpc for Free Pascal MorphOS RTL
3#
4
5[package]
6main=rtl
7
8[target]
9#loaders=prt0
10units=$(SYSTEMUNIT)  heaptrc lineinfo uuchar objpas macpas iso7185 extpas buildrtl cpall
11
12#      fpintres dos heaptrc ctypes \
13#      sysutils classes fgl math typinfo \
14#      charset cpall getopts \
15#      types rtlconsts sysconst \
16#      character athreads
17
18implicitunits=$(SYSINITUNITS) athreads dos sysutils \
19      ctypes strings rtlconsts sysconst math types \
20      typinfo fgl classes charset character getopts \
21      fpintres exeinfo \
22      cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
23      cp437 cp646 cp737 cp775 cp850 cp852 cp855 cp856 cp857 cp860 cp861 cp862 \
24      cp863 cp864 cp865 cp866 cp869 cp874 cp3021 cp8859_1 cp8859_2 cp8859_3 cp8859_4 \
25      cp8859_5 cp8859_6 cp8859_7 cp8859_8 cp8859_9 cp8859_10 cp8859_11 \
26      cp8859_13 cp8859_14 cp8859_15 cp8859_16 cpkoi8_r cpkoi8_u \
27      unicodedata unicodenumtable
28
29rsts=math rtlconsts typinfo classes sysconst
30
31[require]
32nortl=y
33
34[install]
35fpcpackage=y
36buildunit=buildrtl
37
38[default]
39fpcdir=../..
40target=morphos
41cpu=powerpc
42
43[compiler]
44includedir=$(INC) $(PROCINC) $(AMIINC)
45sourcedir=$(INC) $(PROCINC) $(AMIINC) $(COMMON)
46
47
48[prerules]
49RTL=..
50INC=$(RTL)/inc
51COMMON=$(RTL)/common
52PROCINC=$(RTL)/$(CPU_TARGET)
53AMIINC=$(RTL)/amicommon
54UNITPREFIX=rtl
55SYSTEMUNIT=system
56SYSINITUNITS=si_prc
57
58# Use new feature from 1.0.5 version
59# that generates release PPU files
60# which will not be recompiled
61ifdef RELEASE
62override FPCOPT+=-Ur
63endif
64
65# Paths
66OBJPASDIR=$(RTL)/objpas
67
68[rules]
69.NOTPARALLEL:
70# Get the system independent include file names.
71# This will set the following variables :
72# SYSINCNAMES
73include $(INC)/makefile.inc
74SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
75
76# Get the processor dependent include file names.
77# This will set the following variables :
78# CPUINCNAMES
79include $(PROCINC)/makefile.cpu
80SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
81
82# Put system unit dependencies together.
83SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
84
85
86#
87# Loaders
88#
89
90%$(OEXT) : %.as
91        $(AS) -o $(UNITTARGETDIRPREFIX)$*$(OEXT) $*.as
92
93#
94# Base Units (System, strings, os-dependent-base-unit)
95#
96
97$(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS)
98        $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
99
100heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
101        $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
102
103lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
104
105uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp heaptrc$(PPUEXT)
106        $(COMPILER) $(INC)/uuchar.pp
107
108objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
109        $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
110
111macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) buildrtl$(PPUEXT) heaptrc$(PPUEXT)
112        $(COMPILER) $(INC)/macpas.pp
113
114iso7185$(PPUEXT) : $(INC)/iso7185.pp buildrtl$(PPUEXT) heaptrc$(PPUEXT)
115        $(COMPILER) $(INC)/iso7185.pp
116
117extpas$(PPUEXT) : $(INC)/extpas.pp buildrtl$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) heaptrc$(PPUEXT)
118        $(COMPILER) $(INC)/extpas.pp
119
120buildrtl$(PPUEXT): buildrtl.pp system$(PPUEXT) objpas$(PPUEXT) heaptrc$(PPUEXT)
121        $(COMPILER) -Fi$(OBJPASDIR)/sysutils -Fi$(OBJPASDIR)/classes -Fu$(PROCINC) -Fu$(AMIINC) -I$(INC) -Fu$(INC) -Fu$(OBJPASDIR) buildrtl
122
123cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) objpas$(PPUEXT) heaptrc$(PPUEXT)
124        $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
125