summaryrefslogtreecommitdiff
path: root/fpcsrc/rtl/qnx/Makefile.fpc
blob: 53c7c60a3e7118f7a6d606822d75da9a8f313914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#
#   Makefile.fpc for Free Pascal QNX RTL
#

[package]
main=rtl

[target]
loaders=cprt0 crti crtn
units=system dos objpas objects strings \
      sysutils typinfo math \
      cpu mmx getopts heaptrc lineinfo posix
rsts=math typinfo

[require]
nortl=y

[install]
fpcpackage=y

[default]
fpcdir=../..
target=qnx
cpu=i386

[compiler]
includedir=$(INC) $(PROCINC) $(POSIXINC) $(SYSCALLINC)
sourcedir=$(INC) $(PROCINC) $(POSIXINC) $(SYSCALLINC)
targetdir=.

[prerules]
RTL=..
INC=$(RTL)/inc
PROCINC=$(RTL)/$(CPU_TARGET)
POSIXINC=$(RTL)/posix
SYSCALLINC=$(RTL)/qnx/$(CPU_TARGET)

UNITPREFIX=rtl

# Use new feature from 1.0.5 version
# that generates release PPU files
# which will not be recompiled
ifdef RELEASE
ifeq ($(findstring 1.0.2,$(FPC_VERSION)),)
ifeq ($(findstring 1.0.4,$(FPC_VERSION)),)
override FPCOPT+=-Ur
endif
endif
endif

# Paths
OBJPASDIR=$(RTL)/objpas
GRAPHDIR=$(INC)/graph

[rules]
# 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
#

cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
        $(AS) -o cprt0$(OEXT) $(CPU_TARGET)/cprt0.as

crti$(OEXT) : $(CPU_TARGET)/crti.s
        $(AS) -o crti$(OEXT) $(CPU_TARGET)/crti.s

crtn$(OEXT) : $(CPU_TARGET)/crtn.s
        $(AS) -o crtn$(OEXT) $(CPU_TARGET)/crtn.s

func$(OEXT) : $(CPU_TARGET)/func.as
        $(AS) -o func$(OEXT) $(CPU_TARGET)/func.as

dllprt$(OEXT) : $(CPU_TARGET)/dllprt.as
        $(AS) -o dllprt$(OEXT) $(CPU_TARGET)/dllprt.as

#
# system Units (system, Objpas, Strings)
#

system$(PPUEXT) : system.pp $(SYSDEPS)
        $(COMPILER) -Us -Sg system.pp

objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
        $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp

strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
                   $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
                   system$(PPUEXT)


#
# TP7 Compatible RTL Units
#

dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
               posix$(PPUEXT) system$(PPUEXT)
        $(COMPILER) $(POSIXINC)/dos.pp

objects$(PPUEXT) : $(INC)/objects.pp $(POSIXINC)/objinc.inc system$(PPUEXT)
        $(COMPILER) $(INC)/objects.pp

#
# Delphi Compatible Units
#

sysutils$(PPUEXT) : $(POSIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
                    objpas$(PPUEXT) dos$(PPUEXT)
        $(COMPILER) -I$(OBJPASDIR) $(POSIXINC)/sysutils.pp

typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
        $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp

math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
        $(COMPILER) $(OBJPASDIR)/math.pp

gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
        $(COMPILER) $(OBJPASDIR)/gettext.pp

#varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
#                    $(OBJPASDIR)/varutilh.inc varutils.pp
#        $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp

#
# Other system-independent RTL Units
#

cpu$(PPUEXT) : $(PROCINC)/cpu.pp system$(PPUEXT)

mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) system$(PPUEXT)

getopts$(PPUEXT) : $(INC)/getopts.pp system$(PPUEXT)

heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
        $(COMPILER) -Sg $(INC)/heaptrc.pp

lineinfo$(PPUEXT) : $(INC)/lineinfo.pp system$(PPUEXT)


#
# Other system-dependent RTL Units
#

posix$(PPUEXT) : posix.pp \
		 errno.inc osposix.inc osposixh.inc signal.inc system$(PPUEXT)