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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354
|
#
# $Id: Makefile,v 1.31 1999/08/04 11:30:05 michael Exp $
# This file is part of the Free Pascal run time library.
# Copyright (c) 1996-98 by Michael van Canneyt
#
# Makefile for the Free Pascal Linux Runtime Library
#
# See the file COPYING.FPC, included in this distribution,
# for details about the copyright.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Warning: this file contains TAB (#9) characters that are required for
# make. Make sure you use an editor that does not replace TABs with
# spaces, or the makefile won't work anymore after you save.
#####################################################################
# Makefile Defaults
#####################################################################
# Default place of the makefile.fpc
DEFAULTFPCDIR=../..
# set target and cpu which are required
override OS_TARGET=linux
override CPU=i386
# Where are the include files
RTL=..
INC=$(RTL)/inc
PROCINC=$(RTL)/$(CPU)
# Where to place the result files
TARGETDIR=.
# These units belong to the RTL
UNITPREFIX=rtl
# Default library name
LIBNAME=fprtl
#####################################################################
# Own defaults
#####################################################################
# Paths
OBJPASDIR=$(RTL)/objpas
# Define Go32v2 Units
SYSTEMUNIT=syslinux
# Define Loaders
ifdef AOUT
PRT=prt0
else
PRT=prt1
endif
LOADERAS=$(CPU)/$(PRT).as
GLOADERAS=$(CPU)/g$(PRT).as
LOADEROBJECTS=prt0 gprt0
ifndef AOUT
LOADEROBJECTS+=cprt0 cprt21 gprt21
endif
# Unit Objects
UNITOBJECTS=$(SYSTEMUNIT) objpas strings \
linux ports \
dos crt objects printer graph \
sysutils typinfo math \
cpu mmx getopts heaptrc \
errors sockets gpm ipc
# Unit Objects Which are placed in libfpc.so, this can't contain units
# that need to be linked with other libs like graph, gpm
SHAREDLIBUNITOBJECTS=$(SYSTEMUNIT) objpas strings \
linux ports \
dos crt objects printer \
sysutils typinfo math \
cpu mmx getopts heaptrc \
sockets ipc
#####################################################################
# Common targets
#####################################################################
.PHONY: all clean install info \
staticlib sharedlib libsclean \
staticinstall sharedinstall libinstall \
all: testfpcmake fpc_all
clean: testfpcmake fpc_clean
install: testfpcmake fpc_install
info: testfpcmake fpc_info
staticlib: testfpcmake fpc_staticlib
sharedlib: testfpcmake fpc_sharedlib
libsclean: testfpcmake fpc_libsclean
staticinstall: testfpcmake fpc_staticinstall
sharedinstall: testfpcmake fpc_sharedinstall
libinstall: testfpcmake fpc_libinstall
#####################################################################
# Include default makefile
#####################################################################
# test if FPCMAKE is still valid
ifdef FPCMAKE
ifeq ($(strip $(wildcard $(FPCMAKE))),)
FPCDIR=
FPCMAKE=
endif
endif
ifndef FPCDIR
ifdef DEFAULTFPCDIR
FPCDIR=$(DEFAULTFPCDIR)
endif
endif
ifndef FPCMAKE
ifdef FPCDIR
FPCMAKE=$(FPCDIR)/makefile.fpc
else
FPCMAKE=makefile.fpc
endif
endif
override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
ifeq ($(FPCMAKE),)
testfpcmake:
@echo makefile.fpc not found!
@echo Check the FPCMAKE and FPCDIR environment variables.
@exit
else
include $(FPCMAKE)
testfpcmake:
endif
#####################################################################
# Include system unit dependencies
#####################################################################
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)
#####################################################################
# Dependencies
#####################################################################
# Options needed
ifneq ("$(FPC_VERSION)","0.99.10")
ifndef BROWSER
NEEDOPT=-b-
endif
endif
vpath %$(PASEXT) $(INC) $(PROCINC)
#
# Loaders
#
prt0$(OEXT) : $(LOADERAS)
$(AS) -o prt0$(OEXT) $(LOADERAS)
gprt0$(OEXT) : $(GLOADERAS)
$(AS) -o gprt0$(OEXT) $(GLOADERAS)
ifndef AOUT
cprt0$(OEXT) : $(CPU)/cprt1.as
$(AS) -o cprt0$(OEXT) $(CPU)/cprt1.as
cprt21$(OEXT) : $(CPU)/cprt21.as
$(AS) -o cprt21$(OEXT) $(CPU)/cprt21.as
# still need to use gprt1, because gprt21 crashes
gprt21$(OEXT) : $(CPU)/gprt1.as
$(AS) -o gprt21$(OEXT) $(CPU)/gprt1.as
endif
#
# System Units (System, Objpas, Strings)
#
$(SYSTEMPPU) : syslinux.pp sysconst.inc systypes.inc syscalls.inc $(SYSDEPS)
$(COMPILER) -Us -Sg syslinux.pp $(REDIR)
objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMPPU)
$(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
$(SYSTEMPPU)
#
# System Dependent Units
#
linux$(PPUEXT) : linux.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
syscalls.inc systypes.inc sysconst.inc $(SYSTEMPPU)
ports$(PPUEXT) : ports.pp linux$(PPUEXT) objpas$(PPUEXT)
#
# TP7 Compatible RTL Units
#
dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
linux$(PPUEXT) $(SYSTEMPPU)
crt$(PPUEXT) : crt.pp $(INC)/textrec.inc linux$(PPUEXT) $(SYSTEMPPU)
objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
printer$(PPUEXT) : printer.pp $(INC)/textrec.inc linux$(PPUEXT) $(SYSTEMPPU)
graph$(PPUEXT) : graph.pp linux$(PPUEXT) objects$(PPUEXT)
#
# Delphi Compatible Units
#
sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
filutil.inc disk.inc objpas$(PPUEXT) linux$(PPUEXT)
$(COMPILER) -I$(OBJPASDIR) $(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)
gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/gettext.pp $(REDIR)
#
# Other system-independent RTL Units
#
cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
$(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
#
# Other system-dependent RTL Units
#
sockets$(PPUEXT) : sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
linux$(PPUEXT) $(SYSTEMPPU)
errors$(PPUEXT) : errors.pp strings$(PPUEXT) $(SYSTEMPPU)
ipc$(PPUEXT) : ipc.pp linux$(PPUEXT) $(SYSTEMPPU)
#
# $Log: Makefile,v $
# Revision 1.31 1999/08/04 11:30:05 michael
# * moved gettext to fcl
#
# Revision 1.30 1999/07/29 01:39:09 peter
# * shared lib units fixed
#
# Revision 1.29 1999/07/01 19:39:42 peter
# + gpm unit
#
# Revision 1.28 1999/06/03 09:36:32 peter
# * first things for sharedlib to work again
#
# Revision 1.27 1999/05/28 11:28:30 peter
# * ipc unit can be compiled with 0.99.10 again
#
# Revision 1.26 1999/05/28 11:21:06 peter
# * moved fpc_version check so it works correct
#
# Revision 1.25 1999/05/13 07:39:07 michael
# + Fix in heaptrc target: needs -Sg
#
# Revision 1.24 1999/05/05 22:24:08 peter
# * 0.99.10 check for browser
#
# Revision 1.23 1999/05/04 11:59:45 peter
# * browser off by default
#
# Revision 1.22 1999/05/03 23:30:28 peter
# * small update
# * uses gprt1 again for gprt21 becuase gprt21.as crashes
#
# Revision 1.21 1999/05/03 21:29:35 peter
# + glibc 2.1 support
#
# Revision 1.20 1999/04/22 10:56:32 peter
# * fixed sysutils dependencys
# * objpas files are agian in the main Makefile, makefile.op is obsolete
#
# Revision 1.19 1999/04/14 09:07:17 peter
# * fixed strings dependency
#
# Revision 1.18 1999/03/22 13:09:10 peter
# - ipc unit because it crashes on 0.99.10
#
# Revision 1.17 1999/03/16 00:47:09 peter
# * makefile.fpc targets start with fpc_
# * small updates for install scripts
#
# Revision 1.16 1999/03/12 21:07:51 michael
# + clean and libsclean added
#
# Revision 1.15 1999/03/09 01:35:55 peter
# * makefile.fpc updates and defaultfpcdir var
#
#
|