1# 2# Makefile.fpc for Free Pascal QNX RTL 3# 4 5[package] 6main=rtl 7 8[target] 9loaders=cprt0 crti crtn 10units=system uuchar dos objpas objects strings \ 11 sysutils typinfo math \ 12 cpu mmx getopts heaptrc lineinfo posix 13rsts=math typinfo 14 15[require] 16nortl=y 17 18[install] 19fpcpackage=y 20 21[default] 22fpcdir=../.. 23target=qnx 24cpu=i386 25 26[compiler] 27includedir=$(INC) $(PROCINC) $(POSIXINC) $(SYSCALLINC) 28sourcedir=$(INC) $(PROCINC) $(POSIXINC) $(SYSCALLINC) 29targetdir=. 30 31[prerules] 32RTL=.. 33INC=$(RTL)/inc 34PROCINC=$(RTL)/$(CPU_TARGET) 35POSIXINC=$(RTL)/posix 36SYSCALLINC=$(RTL)/qnx/$(CPU_TARGET) 37 38UNITPREFIX=rtl 39SYSTEMUNIT=system 40 41# Use new feature from 1.0.5 version 42# that generates release PPU files 43# which will not be recompiled 44ifdef RELEASE 45ifeq ($(findstring 1.0.2,$(FPC_VERSION)),) 46ifeq ($(findstring 1.0.4,$(FPC_VERSION)),) 47override FPCOPT+=-Ur 48endif 49endif 50endif 51 52# Paths 53OBJPASDIR=$(RTL)/objpas 54GRAPHDIR=$(INC)/graph 55 56[rules] 57# Get the system independent include file names. 58# This will set the following variables : 59# SYSINCNAMES 60include $(INC)/makefile.inc 61SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES)) 62 63# Get the processor dependent include file names. 64# This will set the following variables : 65# CPUINCNAMES 66include $(PROCINC)/makefile.cpu 67SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES)) 68 69# Put system unit dependencies together. 70SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS) 71 72 73# 74# Loaders 75# 76 77cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as 78 $(AS) -o cprt0$(OEXT) $(CPU_TARGET)/cprt0.as 79 80crti$(OEXT) : $(CPU_TARGET)/crti.s 81 $(AS) -o crti$(OEXT) $(CPU_TARGET)/crti.s 82 83crtn$(OEXT) : $(CPU_TARGET)/crtn.s 84 $(AS) -o crtn$(OEXT) $(CPU_TARGET)/crtn.s 85 86func$(OEXT) : $(CPU_TARGET)/func.as 87 $(AS) -o func$(OEXT) $(CPU_TARGET)/func.as 88 89dllprt$(OEXT) : $(CPU_TARGET)/dllprt.as 90 $(AS) -o dllprt$(OEXT) $(CPU_TARGET)/dllprt.as 91 92# 93# system Units (system, Objpas, Strings) 94# 95 96system$(PPUEXT) : system.pp $(SYSDEPS) 97 $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg system.pp 98 99uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp 100 101objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT) 102 $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp 103 104strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\ 105 $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\ 106 system$(PPUEXT) 107 108 109# 110# TP7 Compatible RTL Units 111# 112 113dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \ 114 posix$(PPUEXT) system$(PPUEXT) 115 $(COMPILER) $(POSIXINC)/dos.pp 116 117# 118# Delphi Compatible Units 119# 120 121sysutils$(PPUEXT) : $(POSIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \ 122 objpas$(PPUEXT) dos$(PPUEXT) 123 $(COMPILER) -I$(OBJPASDIR) $(POSIXINC)/sysutils.pp 124 125typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT) 126 $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp 127 128math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) 129 $(COMPILER) $(OBJPASDIR)/math.pp 130 131# 132# Other system-independent RTL Units 133# 134 135cpu$(PPUEXT) : $(PROCINC)/cpu.pp system$(PPUEXT) 136 137mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) system$(PPUEXT) 138 139getopts$(PPUEXT) : $(INC)/getopts.pp system$(PPUEXT) 140 141heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT) 142 $(COMPILER) -Sg $(INC)/heaptrc.pp 143 144lineinfo$(PPUEXT) : $(INC)/lineinfo.pp system$(PPUEXT) 145 146 147# 148# Other system-dependent RTL Units 149# 150 151posix$(PPUEXT) : posix.pp \ 152 errno.inc osposix.inc osposixh.inc signal.inc system$(PPUEXT) 153