mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 12:09:06 +02:00
* new makefile layout, much more structure and more uniformity
This commit is contained in:
parent
cbbfd69395
commit
ff6ca07f9f
@ -1,7 +1,18 @@
|
|||||||
# Makefile for the DOS Go32v1 Run-time library.
|
|
||||||
# we need the stupid copies and del because the old FPK Pascal doesn't handle
|
|
||||||
# ppc386 ..\crt correct..
|
|
||||||
#
|
#
|
||||||
|
# $Id$
|
||||||
|
# This file is part of the Free Pascal run time library.
|
||||||
|
# Copyright (c) 1996-98 by Michael van Canneyt
|
||||||
|
#
|
||||||
|
# Makefile for the Free Pascal Go32v1 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.
|
||||||
|
#
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Start of configurable section.
|
# Start of configurable section.
|
||||||
# Please note that all these must be set in the main makefile, and
|
# Please note that all these must be set in the main makefile, and
|
||||||
@ -12,7 +23,7 @@
|
|||||||
|
|
||||||
# set the directory where to install the units.
|
# set the directory where to install the units.
|
||||||
ifndef UNITINSTALLDIR
|
ifndef UNITINSTALLDIR
|
||||||
UNITINSTALLDIR=c:\lib\ppc
|
UNITINSTALLDIR=c:\lib\ppc\go32v1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# set the directory where to install libraries
|
# set the directory where to install libraries
|
||||||
@ -30,6 +41,12 @@ ifndef OS_TARGET
|
|||||||
OS_TARGET=GO32V1
|
OS_TARGET=GO32V1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# What is the target processor :
|
||||||
|
ifndef CPU
|
||||||
|
CPU=i386
|
||||||
|
#CPU=m68k
|
||||||
|
endif
|
||||||
|
|
||||||
# What compiler to use ?
|
# What compiler to use ?
|
||||||
# I think ppc386 is better (it's mostly in path) (FK)
|
# I think ppc386 is better (it's mostly in path) (FK)
|
||||||
ifndef PP
|
ifndef PP
|
||||||
@ -54,46 +71,48 @@ endif
|
|||||||
|
|
||||||
# Where are the include files
|
# Where are the include files
|
||||||
INC=../../inc
|
INC=../../inc
|
||||||
|
|
||||||
ifndef CPU
|
|
||||||
CPU=i386
|
|
||||||
endif
|
|
||||||
|
|
||||||
PROCINC=../../$(CPU)
|
PROCINC=../../$(CPU)
|
||||||
|
OBJPASDIR=../../objpas
|
||||||
# Where are the .ppi files.
|
# Where are the .ppi files.
|
||||||
PPI=../ppi
|
PPI=../ppi
|
||||||
|
|
||||||
ifeq ($(OS_TARGET),$(OS_SRC))
|
|
||||||
CROSSCOMPILE=NO
|
|
||||||
else
|
|
||||||
CROSSCOMPILE=YES
|
|
||||||
endif
|
|
||||||
|
|
||||||
# To copy pograms
|
# To copy pograms
|
||||||
ifndef COPY
|
ifndef COPY
|
||||||
|
ifeq ($(DOS),YES)
|
||||||
|
COPY=copy
|
||||||
|
else
|
||||||
COPY=cp -p
|
COPY=cp -p
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# To delete programs
|
# Check delete program
|
||||||
ifndef DEL
|
ifndef DEL
|
||||||
ifeq ($(DOS),YES)
|
ifeq ($(DOS),YES)
|
||||||
DEL=del
|
DEL=del
|
||||||
else
|
else
|
||||||
DEL=rm
|
DEL=rm -f
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# To install programs
|
# To install files
|
||||||
ifndef INSTALL
|
ifndef INSTALL
|
||||||
ifeq ($(DOS),YES)
|
ifeq ($(DOS),YES)
|
||||||
INSTALL=cp
|
INSTALL=copy
|
||||||
else
|
else
|
||||||
INSTALL=install -m 644
|
INSTALL=install -m 644
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# To install programs
|
||||||
|
ifndef INSTALLEXE
|
||||||
|
ifeq ($(DOS),YES)
|
||||||
|
INSTALLEXE=copy
|
||||||
|
else
|
||||||
|
INSTALLEXE=install -m 755
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# To make a directory.
|
||||||
ifndef MKDIR
|
ifndef MKDIR
|
||||||
ifeq ($(DOS),YES)
|
ifeq ($(DOS),YES)
|
||||||
MKDIR=mkdir
|
MKDIR=mkdir
|
||||||
@ -102,20 +121,6 @@ MKDIR=install -m 755 -d
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Check for crosscompile
|
|
||||||
ifeq ($(CROSSCOMPILE),YES)
|
|
||||||
OPT:=$(OPT) -dCROSSCOMPILE -T$(OS_TARGET)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# check config file
|
|
||||||
ifdef CFGFILE
|
|
||||||
OPT:=$(OPT) @$(CFGFILE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# to be sure to be able to compile with an older
|
|
||||||
# compiler version
|
|
||||||
OPT:=$(OPT) -dFPC
|
|
||||||
|
|
||||||
# diff program
|
# diff program
|
||||||
ifndef REFPATH
|
ifndef REFPATH
|
||||||
REFPATH=/usr/local/fpk/work/new/rtl
|
REFPATH=/usr/local/fpk/work/new/rtl
|
||||||
@ -127,40 +132,183 @@ ifndef DIFFOPTS
|
|||||||
DIFFOPTS=-b -c
|
DIFFOPTS=-b -c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# os independent depends
|
#
|
||||||
SYSTEMDEPS=$(INC)/system.inc $(INC)/systemh.inc $(INC)/mathh.inc $(INC)/real2str.inc \
|
# System independent Commandline Options
|
||||||
$(INC)/heaph.inc $(INC)/innr.inc $(INC)/sstrings.inc $(INC)/file.inc \
|
#
|
||||||
$(INC)/text.inc $(INC)/typefile.inc $(INC)/version.inc $(INC)/filerec.inc \
|
|
||||||
$(INC)/textrec.inc \
|
|
||||||
$(PROCINC)/math.inc $(PROCINC)/set.inc $(PROCINC)/heap.inc $(PROCINC)/$(CPU).inc
|
|
||||||
|
|
||||||
|
# Cross compiling ?
|
||||||
|
ifeq ($(OS_TARGET),$(OS_SRC))
|
||||||
|
CROSSCOMPILE=NO
|
||||||
|
else
|
||||||
|
CROSSCOMPILE=YES
|
||||||
|
endif
|
||||||
|
|
||||||
|
# add required options... (-dFPC is required for older versions)
|
||||||
|
override OPT:= $(OPT) -dFPC -d$(CPU)
|
||||||
|
|
||||||
|
# Was a config file specified ?
|
||||||
|
ifdef CFGFILE
|
||||||
|
override OPT:=$(OPT) @$(CFGFILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Check for crosscompile
|
||||||
|
ifeq ($(CROSSCOMPILE),YES)
|
||||||
|
override OPT:= $(OPT) -dCROSSCOMPILE -T$(OS_TARGET)
|
||||||
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# System dependent Commandline Options
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# System dependent
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
# Determine needed extensions
|
||||||
PPUEXT=.pp1
|
PPUEXT=.pp1
|
||||||
PPLEXT=.ppl
|
PPLEXT=.ppl
|
||||||
# At this moment only static libs under go32v2. When shared libs are made then
|
|
||||||
# we should ask what kind of lib user wants, and then set the correct
|
|
||||||
# extension... (see linux makefile for example)
|
|
||||||
LIBEXT=.a1
|
|
||||||
OEXT=.o1
|
OEXT=.o1
|
||||||
|
ASMEXT=.s1
|
||||||
|
LIBEXT=.a1
|
||||||
|
|
||||||
.PHONY: all clean install diffs diffclean
|
# Define Linux Units
|
||||||
|
SYSTEMPPU=system$(PPUEXT)
|
||||||
|
OBJECTS=strings go32 objpas \
|
||||||
|
dos crt objects printer \
|
||||||
|
cpu mmx mouse getopts graph \
|
||||||
|
|
||||||
all : system$(PPUEXT) prt0$(OEXT) go32$(PPUEXT) strings$(PPUEXT) \
|
LOADERS=prt0
|
||||||
objpas$(PPUEXT) \
|
|
||||||
dos$(PPUEXT) crt$(PPUEXT) printer$(PPUEXT) objects$(PPUEXT) \
|
|
||||||
mmx$(PPUEXT) cpu$(PPUEXT) \
|
|
||||||
mouse$(PPUEXT) getopts$(PPUEXT) graph$(PPUEXT) \
|
|
||||||
|
|
||||||
printer$(PPUEXT) : ../printer.pp system$(PPUEXT)
|
#####################################################################
|
||||||
|
# System independent Makefile
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
# OS Independent Depends
|
||||||
|
SYSTEMDEPS=system.inc systemh.inc mathh.inc real2str.inc \
|
||||||
|
heaph.inc innr.inc sstrings.inc file.inc \
|
||||||
|
text.inc typefile.inc version.inc filerec.inc \
|
||||||
|
textrec.inc
|
||||||
|
|
||||||
|
# Processor Dependent Depends
|
||||||
|
SYSPROCDEPS=math.inc set.inc heap.inc $(CPU).inc
|
||||||
|
|
||||||
|
# Add Prefix and Suffixes
|
||||||
|
OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
|
||||||
|
PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
|
||||||
|
DSYSTEMDEPS=$(addprefix $(INC)/, $(SYSTEMDEPS))
|
||||||
|
DSYSPROCDEPS=$(addprefix $(PROCINC)/, $(SYSPROCDEPS))
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY : all install clean \
|
||||||
|
libs libsclean \
|
||||||
|
diffs diffclean \
|
||||||
|
|
||||||
|
all : $(OBJLOADERS) $(PPUOBJECTS)
|
||||||
|
|
||||||
|
install : all
|
||||||
|
$(MKDIR) $(UNITINSTALLDIR)
|
||||||
|
$(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
|
||||||
|
|
||||||
|
clean :
|
||||||
|
-$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *.PPS log
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# Files
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Loaders
|
||||||
|
#
|
||||||
|
|
||||||
|
prt0$(OEXT) : prt0.as
|
||||||
|
as -D -o prt0$(OEXT) prt0.as
|
||||||
|
|
||||||
|
#
|
||||||
|
# Base Units (System, strings, os-dependent-base-unit)
|
||||||
|
#
|
||||||
|
|
||||||
|
$(SYSTEMPPU) : system.pp $(DSYSTEMDEPS) $(DSYSPROCDEPS)
|
||||||
|
$(COPY) $(DSYSTEMDEPS) .
|
||||||
|
$(COPY) $(DSYSPROCDEPS) .
|
||||||
|
$(PP) $(OPT) -Us -Sg system.pp $(REDIR)
|
||||||
|
$(DEL) $(SYSTEMDEPS)
|
||||||
|
$(DEL) $(SYSPROCDEPS)
|
||||||
|
|
||||||
|
strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) $(PROCINC)/strings.pp .
|
||||||
|
$(PP) $(OPT) strings.pp $(REDIR)
|
||||||
|
$(DEL) strings.pp
|
||||||
|
|
||||||
|
go32$(PPUEXT) : ../go32.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) ../go32.pp .
|
||||||
|
$(PP) $(OPT) go32.pp $(REDIR)
|
||||||
|
$(DEL) go32.pp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Delphi Object Model
|
||||||
|
#
|
||||||
|
|
||||||
|
objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) $(OBJPASDIR)/objpas.pp .
|
||||||
|
$(PP) $(OPT) objpas $(REDIR)
|
||||||
|
$(DEL) objpas.pp
|
||||||
|
|
||||||
|
#
|
||||||
|
# System Dependent Units
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# TP7 Compatible RTL Units
|
||||||
|
#
|
||||||
|
|
||||||
|
dos$(PPUEXT) : ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
|
||||||
|
go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
|
||||||
|
$(COPY) ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc .
|
||||||
|
$(PP) $(OPT) dos $(REDIR)
|
||||||
|
$(DEL) dos.pp filerec.inc textrec.inc
|
||||||
|
|
||||||
|
crt$(PPUEXT) : ../crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
|
||||||
|
$(COPY) ../crt.pp $(INC)/textrec.inc .
|
||||||
|
$(PP) $(OPT) crt $(REDIR)
|
||||||
|
$(DEL) crt.pp textrec.inc
|
||||||
|
|
||||||
|
objects$(PPUEXT) : ../objects.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) ../objects.pp .
|
||||||
|
$(PP) $(OPT) objects.pp $(REDIR)
|
||||||
|
$(DEL) objects.pp
|
||||||
|
|
||||||
|
printer$(PPUEXT) : ../printer.pp $(SYSTEMPPU)
|
||||||
$(COPY) ../printer.pp .
|
$(COPY) ../printer.pp .
|
||||||
$(PP) $(OPT) printer.pp $(REDIR)
|
$(PP) $(OPT) printer.pp $(REDIR)
|
||||||
$(DEL) printer.pp
|
$(DEL) printer.pp
|
||||||
|
|
||||||
getopts$(PPUEXT) : $(PROCINC)/getopts.pp system$(PPUEXT)
|
#
|
||||||
|
# Other RTL Units
|
||||||
|
#
|
||||||
|
|
||||||
|
cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) $(PROCINC)/cpu.pp .
|
||||||
|
$(PP) $(OPT) cpu.pp $(REDIR)
|
||||||
|
$(DEL) cpu.pp
|
||||||
|
|
||||||
|
mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
|
||||||
|
$(COPY) $(PROCINC)/mmx.pp .
|
||||||
|
$(PP) $(OPT) mmx.pp $(REDIR)
|
||||||
|
$(DEL) mmx.pp
|
||||||
|
|
||||||
|
mouse$(PPUEXT) : ../mouse.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) ../mouse.pp .
|
||||||
|
$(PP) $(OPT) mouse.pp $(REDIR)
|
||||||
|
$(DEL) mouse.pp
|
||||||
|
|
||||||
|
getopts$(PPUEXT) : $(PROCINC)/getopts.pp $(SYSTEMPPU)
|
||||||
$(COPY) $(PROCINC)/getopts.pp .
|
$(COPY) $(PROCINC)/getopts.pp .
|
||||||
$(PP) $(OPT) getopts.pp $(REDIR)
|
$(PP) $(OPT) getopts.pp $(REDIR)
|
||||||
$(DEL) getopts.pp
|
$(DEL) getopts.pp
|
||||||
|
|
||||||
graph$(PPUEXT) : ../graph.pp go32$(PPUEXT) system$(PPUEXT) mmx$(PPUEXT) \
|
graph$(PPUEXT) : ../graph.pp go32$(PPUEXT) $(SYSTEMPPU) mmx$(PPUEXT) \
|
||||||
$(PPI)/arc.ppi $(PPI)/colors.ppi $(PPI)/dpmi2raw.ppi $(PPI)/ellipse.ppi \
|
$(PPI)/arc.ppi $(PPI)/colors.ppi $(PPI)/dpmi2raw.ppi $(PPI)/ellipse.ppi \
|
||||||
$(PPI)/fill.ppi $(PPI)/font.ppi $(PPI)/global.ppi $(PPI)/ibm.ppi \
|
$(PPI)/fill.ppi $(PPI)/font.ppi $(PPI)/global.ppi $(PPI)/ibm.ppi \
|
||||||
$(PPI)/image.ppi $(PPI)/line.ppi $(PPI)/modes.ppi $(PPI)/move.ppi \
|
$(PPI)/image.ppi $(PPI)/line.ppi $(PPI)/modes.ppi $(PPI)/move.ppi \
|
||||||
@ -170,76 +318,19 @@ graph$(PPUEXT) : ../graph.pp go32$(PPUEXT) system$(PPUEXT) mmx$(PPUEXT) \
|
|||||||
$(PP) $(OPT) graph $(REDIR)
|
$(PP) $(OPT) graph $(REDIR)
|
||||||
$(DEL) graph.pp *.ppi
|
$(DEL) graph.pp *.ppi
|
||||||
|
|
||||||
mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) system$(PPUEXT)
|
|
||||||
$(COPY) $(PROCINC)/mmx.pp .
|
|
||||||
$(PP) $(OPT) mmx.pp $(REDIR)
|
|
||||||
$(DEL) mmx.pp
|
|
||||||
|
|
||||||
cpu$(PPUEXT) : ../../i386/cpu.pp system$(PPUEXT)
|
#####################################################################
|
||||||
$(COPY) ../../i386/cpu.pp .
|
# Libs
|
||||||
$(PP) $(OPT) cpu $(REDIR)
|
#####################################################################
|
||||||
$(DEL) cpu.pp
|
|
||||||
|
|
||||||
strings$(PPUEXT) : $(PROCINC)/strings.pp system$(PPUEXT)
|
libs: all
|
||||||
$(COPY) $(PROCINC)/strings.pp .
|
|
||||||
$(PP) $(OPT) strings.pp $(REDIR)
|
|
||||||
$(DEL) strings.pp
|
|
||||||
|
|
||||||
dos$(PPUEXT) : ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
|
libsclean : clean
|
||||||
go32$(PPUEXT) system$(PPUEXT) strings$(PPUEXT)
|
-$(DEL) *.$(LIBEXT) *$(PPLEXT)
|
||||||
$(COPY) ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc .
|
|
||||||
$(PP) $(OPT) dos $(REDIR)
|
|
||||||
$(DEL) dos.pp filerec.inc textrec.inc
|
|
||||||
|
|
||||||
system$(PPUEXT) : system.pp $(SYSTEMDEPS)
|
#####################################################################
|
||||||
$(COPY) $(INC)/*.inc $(PROCINC)/*.inc .
|
# Diffs
|
||||||
$(PP) $(OPT) -Us -Sg system $(REDIR)
|
#####################################################################
|
||||||
$(DEL) systemh.inc system.inc real2str.inc version.inc $(CPU).inc sstrings.inc
|
|
||||||
$(DEL) mathh.inc math.inc set.inc innr.inc heap.inc heaph.inc
|
|
||||||
$(DEL) filerec.inc textrec.inc file.inc typefile.inc text.inc
|
|
||||||
|
|
||||||
prt0$(OEXT) : prt0.as
|
|
||||||
as -D -o prt0$(OEXT) prt0.as
|
|
||||||
|
|
||||||
crt$(PPUEXT) : ../crt.pp $(INC)/textrec.inc go32$(PPUEXT) system$(PPUEXT)
|
|
||||||
$(COPY) ../crt.pp $(INC)/textrec.inc .
|
|
||||||
$(PP) $(OPT) crt $(REDIR)
|
|
||||||
$(DEL) crt.pp textrec.inc
|
|
||||||
|
|
||||||
go32$(PPUEXT) : ../go32.pp system$(PPUEXT)
|
|
||||||
$(COPY) ../go32.pp .
|
|
||||||
$(PP) $(OPT) go32.pp $(REDIR)
|
|
||||||
$(DEL) go32.pp
|
|
||||||
|
|
||||||
objects$(PPUEXT) : ../objects.pp system$(PPUEXT)
|
|
||||||
$(COPY) ../objects.pp .
|
|
||||||
$(PP) $(OPT) objects.pp $(REDIR)
|
|
||||||
$(DEL) objects.pp
|
|
||||||
|
|
||||||
objpas$(PPUEXT) : ../../objpas/objpas.pp system$(PPUEXT)
|
|
||||||
$(COPY) ../../objpas/objpas.pp .
|
|
||||||
$(PP) $(OPT) objpas $(REDIR)
|
|
||||||
$(DEL) objpas.pp
|
|
||||||
|
|
||||||
mouse$(PPUEXT) : ../mouse.pp system$(PPUEXT)
|
|
||||||
$(COPY) ../mouse.pp .
|
|
||||||
$(PP) $(OPT) mouse.pp $(REDIR)
|
|
||||||
$(DEL) mouse.pp
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-$(DEL) *$(OEXT)
|
|
||||||
-$(DEL) *$(PPUEXT)
|
|
||||||
-$(DEL) *.dif
|
|
||||||
-$(DEL) log
|
|
||||||
-$(DEL) *$(ASMEXT)
|
|
||||||
|
|
||||||
diffclean:
|
|
||||||
-$(DEL) *.dif
|
|
||||||
|
|
||||||
install: all
|
|
||||||
-$(MKDIR) $(LIBINSTALLDIR)/dosunits
|
|
||||||
$(INSTALL) *$(OEXT) $(LIBINSTALLDIR)/dosunits
|
|
||||||
$(INSTALL) *$(PPUEXT) $(LIBINSTALLDIR)/dosunits
|
|
||||||
|
|
||||||
%.dif : %.pp
|
%.dif : %.pp
|
||||||
-$(DIFF) $(DIFFOPTS) $*.pp $(REFPATH)/dos/go32v1/$*.pp > $*.dif
|
-$(DIFF) $(DIFFOPTS) $*.pp $(REFPATH)/dos/go32v1/$*.pp > $*.dif
|
||||||
@ -250,7 +341,17 @@ install: all
|
|||||||
%.dif : %.as
|
%.dif : %.as
|
||||||
-$(DIFF) $(DIFFOPTS) $*.as $(REFPATH)/dos/go32v1/$*.as > $*.dif
|
-$(DIFF) $(DIFFOPTS) $*.as $(REFPATH)/dos/go32v1/$*.as > $*.dif
|
||||||
|
|
||||||
|
diffclean:
|
||||||
|
-$(DEL) *.dif
|
||||||
|
|
||||||
makefile.dif : makefile
|
makefile.dif : makefile
|
||||||
-$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/dos/go32v1/makefile > makefile.dif
|
-$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/dos/go32v1/makefile > makefile.dif
|
||||||
|
|
||||||
diffs: system.dif os.dif makefile.dif prt0.dif
|
diffs: system.dif os.dif makefile.dif prt0.dif
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# Distribution
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
distclean : clean libsclean diffclean
|
||||||
|
|
||||||
|
@ -1,7 +1,18 @@
|
|||||||
# Makefile for the DOS Go32v2 Run-time library.
|
|
||||||
# we need the stupid copies and del because the old FPK Pascal doesn't handle
|
|
||||||
# ppc386 ..\crt correct..
|
|
||||||
#
|
#
|
||||||
|
# $Id$
|
||||||
|
# This file is part of the Free Pascal run time library.
|
||||||
|
# Copyright (c) 1996-98 by Michael van Canneyt
|
||||||
|
#
|
||||||
|
# Makefile for the Free Pascal Go32v2 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.
|
||||||
|
#
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Start of configurable section.
|
# Start of configurable section.
|
||||||
# Please note that all these must be set in the main makefile, and
|
# Please note that all these must be set in the main makefile, and
|
||||||
@ -12,7 +23,7 @@
|
|||||||
|
|
||||||
# set the directory where to install the units.
|
# set the directory where to install the units.
|
||||||
ifndef UNITINSTALLDIR
|
ifndef UNITINSTALLDIR
|
||||||
UNITINSTALLDIR=c:\lib\ppc
|
UNITINSTALLDIR=c:\lib\ppc\go32v2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# set the directory where to install libraries
|
# set the directory where to install libraries
|
||||||
@ -30,6 +41,12 @@ ifndef OS_TARGET
|
|||||||
OS_TARGET=GO32V2
|
OS_TARGET=GO32V2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# What is the target processor :
|
||||||
|
ifndef CPU
|
||||||
|
CPU=i386
|
||||||
|
#CPU=m68k
|
||||||
|
endif
|
||||||
|
|
||||||
# What compiler to use ?
|
# What compiler to use ?
|
||||||
# I think ppc386 is better (it's mostly in path) (FK)
|
# I think ppc386 is better (it's mostly in path) (FK)
|
||||||
ifndef PP
|
ifndef PP
|
||||||
@ -54,46 +71,48 @@ endif
|
|||||||
|
|
||||||
# Where are the include files
|
# Where are the include files
|
||||||
INC=../../inc
|
INC=../../inc
|
||||||
|
|
||||||
ifndef CPU
|
|
||||||
CPU=i386
|
|
||||||
endif
|
|
||||||
|
|
||||||
PROCINC=../../$(CPU)
|
PROCINC=../../$(CPU)
|
||||||
|
OBJPASDIR=../../objpas
|
||||||
# Where are the .ppi files.
|
# Where are the .ppi files.
|
||||||
PPI=../ppi
|
PPI=../ppi
|
||||||
|
|
||||||
ifeq ($(OS_TARGET),$(OS_SRC))
|
|
||||||
CROSSCOMPILE=NO
|
|
||||||
else
|
|
||||||
CROSSCOMPILE=YES
|
|
||||||
endif
|
|
||||||
|
|
||||||
# To copy pograms
|
# To copy pograms
|
||||||
ifndef COPY
|
ifndef COPY
|
||||||
|
ifeq ($(DOS),YES)
|
||||||
|
COPY=copy
|
||||||
|
else
|
||||||
COPY=cp -p
|
COPY=cp -p
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# To delete programs
|
# Check delete program
|
||||||
ifndef DEL
|
ifndef DEL
|
||||||
ifeq ($(DOS),YES)
|
ifeq ($(DOS),YES)
|
||||||
DEL=del
|
DEL=del
|
||||||
else
|
else
|
||||||
DEL=rm
|
DEL=rm -f
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# To install programs
|
# To install files
|
||||||
ifndef INSTALL
|
ifndef INSTALL
|
||||||
ifeq ($(DOS),YES)
|
ifeq ($(DOS),YES)
|
||||||
INSTALL=cp
|
INSTALL=copy
|
||||||
else
|
else
|
||||||
INSTALL=install -m 644
|
INSTALL=install -m 644
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# To install programs
|
||||||
|
ifndef INSTALLEXE
|
||||||
|
ifeq ($(DOS),YES)
|
||||||
|
INSTALLEXE=copy
|
||||||
|
else
|
||||||
|
INSTALLEXE=install -m 755
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# To make a directory.
|
||||||
ifndef MKDIR
|
ifndef MKDIR
|
||||||
ifeq ($(DOS),YES)
|
ifeq ($(DOS),YES)
|
||||||
MKDIR=mkdir
|
MKDIR=mkdir
|
||||||
@ -102,23 +121,9 @@ MKDIR=install -m 755 -d
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Check for crosscompile
|
|
||||||
ifeq ($(CROSSCOMPILE),YES)
|
|
||||||
OPT:=$(OPT) -dCROSSCOMPILE -T$(OS_TARGET)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# check config file
|
|
||||||
ifdef CFGFILE
|
|
||||||
OPT:=$(OPT) @$(CFGFILE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# to be sure to be able to compile with an older
|
|
||||||
# compiler version
|
|
||||||
OPT:=$(OPT) -dFPC
|
|
||||||
|
|
||||||
# diff program
|
# diff program
|
||||||
ifndef REFPATH
|
ifndef REFPATH
|
||||||
REFPATH=h:/cvs/rtl
|
REFPATH=/usr/local/fpk/work/new/rtl
|
||||||
endif
|
endif
|
||||||
ifndef DIFF
|
ifndef DIFF
|
||||||
DIFF=diff
|
DIFF=diff
|
||||||
@ -127,51 +132,201 @@ ifndef DIFFOPTS
|
|||||||
DIFFOPTS=-b -c
|
DIFFOPTS=-b -c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# os independent depends
|
#
|
||||||
SYSTEMDEPS=$(INC)/system.inc $(INC)/systemh.inc $(INC)/mathh.inc $(INC)/real2str.inc \
|
# System independent Commandline Options
|
||||||
$(INC)/heaph.inc $(INC)/innr.inc $(INC)/sstrings.inc $(INC)/file.inc \
|
#
|
||||||
$(INC)/text.inc $(INC)/typefile.inc $(INC)/version.inc $(INC)/filerec.inc \
|
|
||||||
$(INC)/textrec.inc \
|
|
||||||
$(PROCINC)/math.inc $(PROCINC)/set.inc $(PROCINC)/heap.inc $(PROCINC)/$(CPU).inc
|
|
||||||
|
|
||||||
|
# Cross compiling ?
|
||||||
|
ifeq ($(OS_TARGET),$(OS_SRC))
|
||||||
|
CROSSCOMPILE=NO
|
||||||
|
else
|
||||||
|
CROSSCOMPILE=YES
|
||||||
|
endif
|
||||||
|
|
||||||
|
# add required options... (-dFPC is required for older versions)
|
||||||
|
override OPT:= $(OPT) -dFPC -d$(CPU)
|
||||||
|
|
||||||
|
# Was a config file specified ?
|
||||||
|
ifdef CFGFILE
|
||||||
|
override OPT:=$(OPT) @$(CFGFILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Check for crosscompile
|
||||||
|
ifeq ($(CROSSCOMPILE),YES)
|
||||||
|
override OPT:= $(OPT) -dCROSSCOMPILE -T$(OS_TARGET)
|
||||||
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# System dependent Commandline Options
|
||||||
|
#
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# System dependent
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
# Determine needed extensions
|
||||||
PPUEXT=.ppu
|
PPUEXT=.ppu
|
||||||
PPLEXT=.ppl
|
PPLEXT=.ppl
|
||||||
# At this moment only static libs under go32v2. When shared libs are made then
|
|
||||||
# we should ask what kind of lib user wants, and then set the correct
|
|
||||||
# extension... (see linux makefile for example)
|
|
||||||
LIBEXT=.a
|
|
||||||
OEXT=.o
|
OEXT=.o
|
||||||
|
ASMEXT=.s
|
||||||
|
LIBEXT=.a
|
||||||
|
|
||||||
.PHONY: all clean install diffs diffclean
|
# Define Linux Units
|
||||||
|
SYSTEMPPU=system$(PPUEXT)
|
||||||
|
OBJECTS=strings go32 objpas \
|
||||||
|
dpmiexcp profile dxeload emu387 \
|
||||||
|
dos crt objects printer \
|
||||||
|
cpu mmx mouse getopts graph \
|
||||||
|
|
||||||
all : system$(PPUEXT) prt0$(OEXT) go32$(PPUEXT) strings$(PPUEXT) \
|
LOADERS=prt0 exceptn fpu
|
||||||
objpas$(PPUEXT) dpmiexcp$(PPUEXT) exceptn$(OEXT) profile$(PPUEXT) \
|
|
||||||
dxeload$(PPUEXT) fpu$(OEXT) emu387$(PPUEXT) \
|
#####################################################################
|
||||||
dos$(PPUEXT) crt$(PPUEXT) printer$(PPUEXT) objects$(PPUEXT) \
|
# System independent Makefile
|
||||||
mmx$(PPUEXT) cpu$(PPUEXT) \
|
#####################################################################
|
||||||
mouse$(PPUEXT) getopts$(PPUEXT) graph$(PPUEXT) \
|
|
||||||
|
# OS Independent Depends
|
||||||
|
SYSTEMDEPS=system.inc systemh.inc mathh.inc real2str.inc \
|
||||||
|
heaph.inc innr.inc sstrings.inc file.inc \
|
||||||
|
text.inc typefile.inc version.inc filerec.inc \
|
||||||
|
textrec.inc
|
||||||
|
|
||||||
|
# Processor Dependent Depends
|
||||||
|
SYSPROCDEPS=math.inc set.inc heap.inc $(CPU).inc
|
||||||
|
|
||||||
|
# Add Prefix and Suffixes
|
||||||
|
OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
|
||||||
|
PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
|
||||||
|
DSYSTEMDEPS=$(addprefix $(INC)/, $(SYSTEMDEPS))
|
||||||
|
DSYSPROCDEPS=$(addprefix $(PROCINC)/, $(SYSPROCDEPS))
|
||||||
|
|
||||||
|
|
||||||
dxeload$(PPUEXT) : system$(PPUEXT)
|
.PHONY : all install clean \
|
||||||
$(PP) $(OPT) dxeload $(REDIR)
|
libs libsclean \
|
||||||
|
diffs diffclean \
|
||||||
|
|
||||||
emu387$(PPUEXT) : system$(PPUEXT) fpu$(OEXT) strings$(PPUEXT) dxeload$(PPUEXT) dpmiexcp$(PPUEXT)
|
all : $(OBJLOADERS) $(PPUOBJECTS)
|
||||||
$(PP) $(OPT) emu387 $(REDIR)
|
|
||||||
|
install : all
|
||||||
|
$(MKDIR) $(UNITINSTALLDIR)
|
||||||
|
$(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
|
||||||
|
|
||||||
|
clean :
|
||||||
|
-$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *.PPS log
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# Files
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Loaders
|
||||||
|
#
|
||||||
|
|
||||||
|
prt0$(OEXT) : v2prt0.as
|
||||||
|
as -o prt0$(OEXT) v2prt0.as
|
||||||
|
|
||||||
|
exceptn$(OEXT) : exceptn.as
|
||||||
|
as -o exceptn$(OEXT) exceptn.as
|
||||||
|
|
||||||
fpu$(OEXT) : fpu.as
|
fpu$(OEXT) : fpu.as
|
||||||
as -o fpu$(OEXT) fpu.as
|
as -o fpu$(OEXT) fpu.as
|
||||||
|
|
||||||
printer$(PPUEXT) : ../printer.pp system$(PPUEXT)
|
#
|
||||||
|
# Base Units (System, strings, os-dependent-base-unit)
|
||||||
|
#
|
||||||
|
|
||||||
|
$(SYSTEMPPU) : system.pp $(DSYSTEMDEPS) $(DSYSPROCDEPS)
|
||||||
|
$(COPY) $(DSYSTEMDEPS) .
|
||||||
|
$(COPY) $(DSYSPROCDEPS) .
|
||||||
|
$(PP) $(OPT) -Us -Sg system.pp $(REDIR)
|
||||||
|
$(DEL) $(SYSTEMDEPS)
|
||||||
|
$(DEL) $(SYSPROCDEPS)
|
||||||
|
|
||||||
|
strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) $(PROCINC)/strings.pp .
|
||||||
|
$(PP) $(OPT) strings.pp $(REDIR)
|
||||||
|
$(DEL) strings.pp
|
||||||
|
|
||||||
|
go32$(PPUEXT) : ../go32.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) ../go32.pp .
|
||||||
|
$(PP) $(OPT) go32.pp $(REDIR)
|
||||||
|
$(DEL) go32.pp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Delphi Object Model
|
||||||
|
#
|
||||||
|
|
||||||
|
objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) $(OBJPASDIR)/objpas.pp .
|
||||||
|
$(PP) $(OPT) objpas.pp $(REDIR)
|
||||||
|
$(DEL) objpas.pp
|
||||||
|
|
||||||
|
#
|
||||||
|
# System Dependent Units
|
||||||
|
#
|
||||||
|
|
||||||
|
dpmiexcp$(PPUEXT) : dpmiexcp.pp exceptn$(OEXT) $(SYSTEMPPU)
|
||||||
|
$(PP) $(OPT) -Sg dpmiexcp.pp $(REDIR)
|
||||||
|
|
||||||
|
profile$(PPUEXT) : profile.pp dpmiexcp$(PPUEXT) go32$(PPUEXT) $(SYSTEMPPU)
|
||||||
|
$(PP) $(OPT) profile.pp $(REDIR)
|
||||||
|
|
||||||
|
dxeload$(PPUEXT) : $(SYSTEMPPU)
|
||||||
|
$(PP) $(OPT) dxeload.pp $(REDIR)
|
||||||
|
|
||||||
|
emu387$(PPUEXT) : emu387.pp fpu$(OEXT) strings$(PPUEXT) dxeload$(PPUEXT) \
|
||||||
|
dpmiexcp$(PPUEXT) $(SYSTEMPPU)
|
||||||
|
$(PP) $(OPT) emu387.pp $(REDIR)
|
||||||
|
|
||||||
|
#
|
||||||
|
# TP7 Compatible RTL Units
|
||||||
|
#
|
||||||
|
|
||||||
|
dos$(PPUEXT) : ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
|
||||||
|
go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
|
||||||
|
$(COPY) ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc .
|
||||||
|
$(PP) $(OPT) dos $(REDIR)
|
||||||
|
$(DEL) dos.pp filerec.inc textrec.inc
|
||||||
|
|
||||||
|
crt$(PPUEXT) : ../crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
|
||||||
|
$(COPY) ../crt.pp $(INC)/textrec.inc .
|
||||||
|
$(PP) $(OPT) crt $(REDIR)
|
||||||
|
$(DEL) crt.pp textrec.inc
|
||||||
|
|
||||||
|
objects$(PPUEXT) : ../objects.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) ../objects.pp .
|
||||||
|
$(PP) $(OPT) objects.pp $(REDIR)
|
||||||
|
$(DEL) objects.pp
|
||||||
|
|
||||||
|
printer$(PPUEXT) : ../printer.pp $(SYSTEMPPU)
|
||||||
$(COPY) ../printer.pp .
|
$(COPY) ../printer.pp .
|
||||||
$(PP) $(OPT) printer $(REDIR)
|
$(PP) $(OPT) printer.pp $(REDIR)
|
||||||
$(DEL) printer.pp
|
$(DEL) printer.pp
|
||||||
|
|
||||||
getopts$(PPUEXT) : $(PROCINC)/getopts.pp system$(PPUEXT)
|
#
|
||||||
|
# Other RTL Units
|
||||||
|
#
|
||||||
|
|
||||||
|
cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) $(PROCINC)/cpu.pp .
|
||||||
|
$(PP) $(OPT) cpu.pp $(REDIR)
|
||||||
|
$(DEL) cpu.pp
|
||||||
|
|
||||||
|
mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
|
||||||
|
$(COPY) $(PROCINC)/mmx.pp .
|
||||||
|
$(PP) $(OPT) mmx.pp $(REDIR)
|
||||||
|
$(DEL) mmx.pp
|
||||||
|
|
||||||
|
mouse$(PPUEXT) : ../mouse.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) ../mouse.pp .
|
||||||
|
$(PP) $(OPT) mouse.pp $(REDIR)
|
||||||
|
$(DEL) mouse.pp
|
||||||
|
|
||||||
|
getopts$(PPUEXT) : $(PROCINC)/getopts.pp $(SYSTEMPPU)
|
||||||
$(COPY) $(PROCINC)/getopts.pp .
|
$(COPY) $(PROCINC)/getopts.pp .
|
||||||
$(PP) $(OPT) getopts $(REDIR)
|
$(PP) $(OPT) getopts.pp $(REDIR)
|
||||||
$(DEL) getopts.pp
|
$(DEL) getopts.pp
|
||||||
|
|
||||||
graph$(PPUEXT) : ../graph.pp mmx$(PPUEXT) go32$(PPUEXT) system$(PPUEXT) \
|
graph$(PPUEXT) : ../graph.pp go32$(PPUEXT) $(SYSTEMPPU) mmx$(PPUEXT) \
|
||||||
$(PPI)/arc.ppi $(PPI)/colors.ppi $(PPI)/dpmi2raw.ppi $(PPI)/ellipse.ppi \
|
$(PPI)/arc.ppi $(PPI)/colors.ppi $(PPI)/dpmi2raw.ppi $(PPI)/ellipse.ppi \
|
||||||
$(PPI)/fill.ppi $(PPI)/font.ppi $(PPI)/global.ppi $(PPI)/ibm.ppi \
|
$(PPI)/fill.ppi $(PPI)/font.ppi $(PPI)/global.ppi $(PPI)/ibm.ppi \
|
||||||
$(PPI)/image.ppi $(PPI)/line.ppi $(PPI)/modes.ppi $(PPI)/move.ppi \
|
$(PPI)/image.ppi $(PPI)/line.ppi $(PPI)/modes.ppi $(PPI)/move.ppi \
|
||||||
@ -181,111 +336,49 @@ graph$(PPUEXT) : ../graph.pp mmx$(PPUEXT) go32$(PPUEXT) system$(PPUEXT) \
|
|||||||
$(PP) $(OPT) graph $(REDIR)
|
$(PP) $(OPT) graph $(REDIR)
|
||||||
$(DEL) graph.pp *.ppi
|
$(DEL) graph.pp *.ppi
|
||||||
|
|
||||||
strings$(PPUEXT) : $(PROCINC)/strings.pp system$(PPUEXT)
|
#####################################################################
|
||||||
$(COPY) $(PROCINC)/strings.pp .
|
# Libs
|
||||||
$(PP) $(OPT) strings $(REDIR)
|
#####################################################################
|
||||||
$(DEL) strings.pp
|
|
||||||
|
|
||||||
dos$(PPUEXT) : ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
|
libs: all libfpc$(LIBEXT)
|
||||||
go32$(PPUEXT) system$(PPUEXT) strings$(PPUEXT)
|
|
||||||
$(COPY) ../dos.pp $(INC)/filerec.inc $(INC)/textrec.inc .
|
|
||||||
$(PP) $(OPT) dos $(REDIR)
|
|
||||||
$(DEL) dos.pp filerec.inc textrec.inc
|
|
||||||
|
|
||||||
exceptn$(OEXT) : exceptn.as
|
libfpc.a:
|
||||||
as -o exceptn$(OEXT) exceptn.as
|
|
||||||
# gcc not need anymore
|
|
||||||
# gcc -c -x assembler-with-cpp -o exceptn$(OEXT) exceptn.AS
|
|
||||||
|
|
||||||
dpmiexcp$(PPUEXT) : dpmiexcp.pp exceptn$(OEXT)
|
|
||||||
$(PP) $(OPT) -Sg dpmiexcp $(REDIR)
|
|
||||||
|
|
||||||
profile$(PPUEXT) : profile.pp dpmiexcp$(PPUEXT) go32$(PPUEXT)
|
|
||||||
$(PP) $(OPT) profile $(REDIR)
|
|
||||||
|
|
||||||
system$(PPUEXT) : system.pp $(SYSTEMDEPS)
|
|
||||||
$(COPY) $(INC)/*.inc $(PROCINC)/*.inc .
|
|
||||||
$(PP) $(OPT) -dI386 -Us -Sg system $(REDIR)
|
|
||||||
$(DEL) systemh.inc system.inc real2str.inc version.inc $(CPU).inc sstrings.inc
|
|
||||||
$(DEL) mathh.inc math.inc set.inc innr.inc heap.inc heaph.inc
|
|
||||||
$(DEL) filerec.inc textrec.inc file.inc typefile.inc text.inc
|
|
||||||
|
|
||||||
prt0$(OEXT) : v2prt0.as
|
|
||||||
as -o prt0$(OEXT) v2prt0.as
|
|
||||||
# gcc not need anymore
|
|
||||||
# gcc -c -x assembler-with-cpp -o prt0$(OEXT) v2prt0.AS
|
|
||||||
|
|
||||||
crt$(PPUEXT) : ../crt.pp $(INC)/textrec.inc go32$(PPUEXT) system$(PPUEXT)
|
|
||||||
$(COPY) ../crt.pp $(INC)/textrec.inc .
|
|
||||||
$(PP) $(OPT) crt $(REDIR)
|
|
||||||
$(DEL) crt.pp textrec.inc
|
|
||||||
|
|
||||||
go32$(PPUEXT) : ../go32.pp system$(PPUEXT)
|
|
||||||
$(COPY) ../go32.pp .
|
|
||||||
$(PP) $(OPT) go32 $(REDIR)
|
|
||||||
$(DEL) go32.pp
|
|
||||||
|
|
||||||
mmx$(PPUEXT) : ../../i386/mmx.pp cpu$(PPUEXT) system$(PPUEXT)
|
|
||||||
$(COPY) ../../i386/mmx.pp .
|
|
||||||
$(PP) $(OPT) mmx $(REDIR)
|
|
||||||
$(DEL) mmx.pp
|
|
||||||
|
|
||||||
cpu$(PPUEXT) : ../../i386/cpu.pp system$(PPUEXT)
|
|
||||||
$(COPY) ../../i386/cpu.pp .
|
|
||||||
$(PP) $(OPT) cpu $(REDIR)
|
|
||||||
$(DEL) cpu.pp
|
|
||||||
|
|
||||||
objpas$(PPUEXT) : ../../objpas/objpas.pp system$(PPUEXT)
|
|
||||||
$(COPY) ../../objpas/objpas.pp .
|
|
||||||
$(PP) $(OPT) objpas $(REDIR)
|
|
||||||
$(DEL) objpas.pp
|
|
||||||
|
|
||||||
objects$(PPUEXT) : ../objects.pp system$(PPUEXT)
|
|
||||||
$(COPY) ../objects.pp .
|
|
||||||
$(PP) $(OPT) objects $(REDIR)
|
|
||||||
$(DEL) objects.pp
|
|
||||||
|
|
||||||
mouse$(PPUEXT) : ../mouse.pp system$(PPUEXT)
|
|
||||||
$(COPY) ../mouse.pp .
|
|
||||||
$(PP) $(OPT) mouse $(REDIR)
|
|
||||||
$(DEL) mouse.pp
|
|
||||||
|
|
||||||
libs: libfpc$(LIBEXT)
|
|
||||||
|
|
||||||
libfpc.a: all
|
|
||||||
$(PPUMOVE) -s -o fpc *.ppu
|
$(PPUMOVE) -s -o fpc *.ppu
|
||||||
|
|
||||||
clean:
|
libsclean : clean
|
||||||
-$(DEL) *$(OEXT) *$(PPUEXT) *.dif log *.s
|
-$(DEL) *.$(LIBEXT) *$(PPLEXT)
|
||||||
|
|
||||||
diffclean:
|
|
||||||
-$(DEL) *.dif
|
|
||||||
|
|
||||||
install: all
|
|
||||||
-$(MKDIR) $(UNITINSTALLDIR)/go32unit
|
|
||||||
$(INSTALL) *$(PPUEXT) $(UNITINSTALLDIR)/go32unit
|
|
||||||
$(INSTALL) *$(OEXT) $(UNITINSTALLDIR)/go32unit
|
|
||||||
|
|
||||||
libinstall: libs
|
libinstall: libs
|
||||||
$(INSTALL) libfpc$(LIBEXT) $(LIBINSTALLDIR)
|
$(INSTALL) libfpc$(LIBEXT) $(LIBINSTALLDIR)
|
||||||
$(INSTALL) *$(PPLEXT) $(UNITINSTALLDIR)
|
$(INSTALL) *$(PPLEXT) $(UNITINSTALLDIR)
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# Diffs
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
%.dif : %.pp
|
%.dif : %.pp
|
||||||
-$(DIFF) $(DIFFOPTS) $*.pp $(REFPATH)/dos/go32v2/$*.pp > $*.dif
|
-$(DIFF) $(DIFFOPTS) $*.pp $(REFPATH)/dos/go32v2/$*.pp > $*.dif
|
||||||
|
|
||||||
%.dif : %.inc
|
%.dif : %.inc
|
||||||
-$(DIFF) $(DIFFOPTS) $*.inc $(REFPATH)/dos/go32v2/$*.inc > $*.dif
|
-$(DIFF) $(DIFFOPTS) $*.inc $(REFPATH)/dos/go32v2/$*.inc > $*.dif
|
||||||
|
|
||||||
# these must have the lowest priority
|
|
||||||
|
|
||||||
%.dif : %.as
|
%.dif : %.as
|
||||||
-$(DIFF) $(DIFFOPTS) $*.as $(REFPATH)/dos/go32v2/$*.as > $*.dif
|
-$(DIFF) $(DIFFOPTS) $*.as $(REFPATH)/dos/go32v2/$*.as > $*.dif
|
||||||
|
|
||||||
%.dif : %.asm
|
%.dif : %.asm
|
||||||
-$(DIFF) $(DIFFOPTS) $*.asm $(REFPATH)/dos/go32v2/$*.asm > $*.dif
|
-$(DIFF) $(DIFFOPTS) $*.asm $(REFPATH)/dos/go32v2/$*.asm > $*.dif
|
||||||
|
|
||||||
|
diffclean:
|
||||||
|
-$(DEL) *.dif
|
||||||
|
|
||||||
makefile.dif : makefile
|
makefile.dif : makefile
|
||||||
-$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/dos/go32v2/makefile > makefile.dif
|
-$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/dos/go32v2/makefile > makefile.dif
|
||||||
|
|
||||||
diffs: system.dif v2prt0.dif dpmiexcp.dif exceptn.dif profile.dif os.dif \
|
diffs: system.dif v2prt0.dif dpmiexcp.dif exceptn.dif profile.dif os.dif \
|
||||||
sbrk16.dif exit16.dif makefile.dif
|
sbrk16.dif exit16.dif makefile.dif
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# Distribution
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
distclean : clean libsclean diffclean
|
||||||
|
@ -1,6 +1,17 @@
|
|||||||
# makes the SYSTEM-Unit for Linux
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 1996 by Michael Van Canneyt
|
# $Id$
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Start of configurable section.
|
# Start of configurable section.
|
||||||
@ -10,13 +21,9 @@
|
|||||||
# with the main makefile.
|
# with the main makefile.
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
# AOUT should be defined in main makefile.
|
|
||||||
# But you can set it here too.
|
|
||||||
# AOUT = -DAOUT
|
|
||||||
|
|
||||||
# set the directory where to install the units.
|
# set the directory where to install the units.
|
||||||
ifndef UNITINSTALLDIR
|
ifndef UNITINSTALLDIR
|
||||||
UNITINSTALLDIR=/usr/lib/ppc/0.99.0
|
UNITINSTALLDIR=/usr/lib/ppc/0.99.0/linuxunits
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# set the directory where to install the libs (must exist)
|
# set the directory where to install the libs (must exist)
|
||||||
@ -24,12 +31,6 @@ ifndef LIBINSTALLDIR
|
|||||||
LIBINSTALLDIR=/usr/lib
|
LIBINSTALLDIR=/usr/lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Do you want to link to the C library ?
|
|
||||||
# Standard it is NO. You can set it to YES to link in th C library.
|
|
||||||
ifndef LINK_TO_C
|
|
||||||
LINK_TO_C=NO
|
|
||||||
endif
|
|
||||||
|
|
||||||
# What is the Operating System ?
|
# What is the Operating System ?
|
||||||
ifndef OS_SRC
|
ifndef OS_SRC
|
||||||
OS_SRC=linux
|
OS_SRC=linux
|
||||||
@ -65,6 +66,16 @@ endif
|
|||||||
# Set this to 'shared' or 'static'
|
# Set this to 'shared' or 'static'
|
||||||
LIBTYPE=shared
|
LIBTYPE=shared
|
||||||
|
|
||||||
|
# AOUT should be defined in main makefile.
|
||||||
|
# But you can set it here too.
|
||||||
|
# AOUT = -DAOUT
|
||||||
|
|
||||||
|
# Do you want to link to the C library ?
|
||||||
|
# Standard it is NO. You can set it to YES to link in th C library.
|
||||||
|
ifndef LINK_TO_C
|
||||||
|
LINK_TO_C=NO
|
||||||
|
endif
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# End of configurable section.
|
# End of configurable section.
|
||||||
# Do not edit after this line.
|
# Do not edit after this line.
|
||||||
@ -75,15 +86,6 @@ INC=../inc
|
|||||||
PROCINC=../$(CPU)
|
PROCINC=../$(CPU)
|
||||||
OBJPASDIR=../objpas
|
OBJPASDIR=../objpas
|
||||||
|
|
||||||
# add required options...
|
|
||||||
override OPT:= $(OPT) -d$(CPU)
|
|
||||||
|
|
||||||
ifeq ($(OS_TARGET),$(OS_SRC))
|
|
||||||
CROSSCOMPILE=NO
|
|
||||||
else
|
|
||||||
CROSSCOMPILE=YES
|
|
||||||
endif
|
|
||||||
|
|
||||||
# To copy pograms
|
# To copy pograms
|
||||||
ifndef COPY
|
ifndef COPY
|
||||||
ifeq ($(DOS),YES)
|
ifeq ($(DOS),YES)
|
||||||
@ -102,12 +104,21 @@ DEL=rm -f
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# To install programs
|
# To install files
|
||||||
ifndef INSTALL
|
ifndef INSTALL
|
||||||
ifeq ($(DOS),YES)
|
ifeq ($(DOS),YES)
|
||||||
INSTALL=copy
|
INSTALL=copy
|
||||||
else
|
else
|
||||||
INSTALL=install
|
INSTALL=install -m 644
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# To install programs
|
||||||
|
ifndef INSTALLEXE
|
||||||
|
ifeq ($(DOS),YES)
|
||||||
|
INSTALLEXE=copy
|
||||||
|
else
|
||||||
|
INSTALLEXE=install -m 755
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -131,21 +142,43 @@ ifndef DIFFOPTS
|
|||||||
DIFFOPTS=-b -c
|
DIFFOPTS=-b -c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# System independent Commandline Options
|
||||||
|
#
|
||||||
|
|
||||||
|
# Cross compiling ?
|
||||||
|
ifeq ($(OS_TARGET),$(OS_SRC))
|
||||||
|
CROSSCOMPILE=NO
|
||||||
|
else
|
||||||
|
CROSSCOMPILE=YES
|
||||||
|
endif
|
||||||
|
|
||||||
|
# add required options... (-dFPC is required for older versions)
|
||||||
|
override OPT:= $(OPT) -dFPC -d$(CPU)
|
||||||
|
|
||||||
# Was a config file specified ?
|
# Was a config file specified ?
|
||||||
ifdef CFGFILE
|
ifdef CFGFILE
|
||||||
override OPT:=$(OPT) @$(CONFIG)
|
override OPT:=$(OPT) @$(CFGFILE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Check for crosscompile
|
# Check for crosscompile
|
||||||
ifeq ($(CROSSCOMPILE),YES)
|
ifeq ($(CROSSCOMPILE),YES)
|
||||||
override OPT:= $(OPT) -dCROSSCOMPILE -TLINUX
|
override OPT:= $(OPT) -dCROSSCOMPILE -T$(OS_TARGET)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# System dependent Commandline Options
|
||||||
|
#
|
||||||
|
|
||||||
# Check if we need C library.
|
# Check if we need C library.
|
||||||
ifeq ($(LINK_TO_C),YES)
|
ifeq ($(LINK_TO_C),YES)
|
||||||
override OPT:=$(OPT) -dCRTLIB
|
override OPT:=$(OPT) -dCRTLIB
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# System dependent
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
# check whether we make shared or static libs
|
# check whether we make shared or static libs
|
||||||
ifndef LIBTYPE
|
ifndef LIBTYPE
|
||||||
LIBTYPE=shared
|
LIBTYPE=shared
|
||||||
@ -158,41 +191,27 @@ else
|
|||||||
LIBEXT=.so
|
LIBEXT=.so
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# determine needed extensions.
|
# Determine needed extensions
|
||||||
PPUEXT=.ppu
|
PPUEXT=.ppu
|
||||||
PPLEXT=.ppl
|
PPLEXT=.ppl
|
||||||
OEXT=.o
|
OEXT=.o
|
||||||
|
ASMEXT=.s
|
||||||
|
|
||||||
OBJECTS=syslinux strings dos objects linux crt printer getopts errors sockets\
|
# Define Linux Units
|
||||||
objpas
|
SYSTEMPPU=syslinux$(PPUEXT)
|
||||||
|
OBJECTS=strings linux objpas \
|
||||||
PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
|
dos crt objects printer \
|
||||||
|
getopts errors sockets \
|
||||||
ifeq ($(LINK_TO_C),NO)
|
|
||||||
PPUOBJECTS:= prt0$(OEXT) gprt0$(OEXT) $(PPUOBJECTS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# os independent depends
|
|
||||||
SYSTEMDEPS=system.inc systemh.inc mathh.inc real2str.inc \
|
|
||||||
heaph.inc innr.inc sstrings.inc file.inc \
|
|
||||||
text.inc typefile.inc version.inc filerec.inc \
|
|
||||||
textrec.inc
|
|
||||||
|
|
||||||
DSYSTEMDEPS=$(addprefix $(INC)/, $(SYSTEMDEPS))
|
|
||||||
|
|
||||||
|
# Extra Syslinux Depends
|
||||||
ifeq ($(LINK_TO_C),YES)
|
ifeq ($(LINK_TO_C),YES)
|
||||||
SYSLINUXDEPS=lprt$(OEXT)
|
SYSLINUXDEPS=lprt$(OEXT)
|
||||||
else
|
else
|
||||||
SYSLINUXDEPS=sysconst.inc systypes.inc syscalls.inc
|
SYSLINUXDEPS=sysconst.inc systypes.inc syscalls.inc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SYSPROCDEPS=math.inc set.inc heap.inc $(CPU).inc
|
|
||||||
|
|
||||||
DSYSPROCDEPS=$(addprefix $(PROCINC)/, $(SYSPROCDEPS))
|
|
||||||
|
|
||||||
|
|
||||||
# Determine on what dos unit should depend.
|
# Determine on what dos unit should depend.
|
||||||
DOSDEPS = dos.pp $(INC)/filerec.inc syslinux$(PPUEXT) strings$(PPUEXT)
|
DOSDEPS = dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT)
|
||||||
ifeq ($(LINK_TO_C),YES)
|
ifeq ($(LINK_TO_C),YES)
|
||||||
DOSDEPS:=$(DOSDEPS) lprt$(OEXT)
|
DOSDEPS:=$(DOSDEPS) lprt$(OEXT)
|
||||||
else
|
else
|
||||||
@ -206,61 +225,53 @@ else
|
|||||||
PRT=prt1.as
|
PRT=prt1.as
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Define Loaders
|
||||||
|
ifeq ($(LINK_TO_C),NO)
|
||||||
|
LOADERS=prt0 gprt0
|
||||||
|
else
|
||||||
|
LOADERS=lprt
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY : all clean diffs install diffclean libs libsclean realclean
|
#####################################################################
|
||||||
|
# System independent Makefile
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
all : $(PPUOBJECTS)
|
# OS Independent Depends
|
||||||
|
SYSTEMDEPS=system.inc systemh.inc mathh.inc real2str.inc \
|
||||||
|
heaph.inc innr.inc sstrings.inc file.inc \
|
||||||
|
text.inc typefile.inc version.inc filerec.inc \
|
||||||
|
textrec.inc
|
||||||
|
|
||||||
syslinux$(PPUEXT) : syslinux.pp $(SYSLINUXDEPS) $(DSYSTEMDEPS) $(DSYSPROCDEPS)
|
# Processor Dependent Depends
|
||||||
$(COPY) $(DSYSTEMDEPS) $(DSYSPROCDEPS) .
|
SYSPROCDEPS=math.inc set.inc heap.inc $(CPU).inc
|
||||||
$(PP) $(OPT) -Us -Sg syslinux $(REDIR)
|
|
||||||
$(DEL) $(SYSTEMDEPS) $(SYSPROCDEPS)
|
|
||||||
|
|
||||||
dos$(PPUEXT) : $(DOSDEPS)
|
# Add Prefix and Suffixes
|
||||||
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
|
||||||
$(PP) $(OPT) dos $(REDIR)
|
PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
|
||||||
$(DEL) filerec.inc textrec.inc
|
DSYSTEMDEPS=$(addprefix $(INC)/, $(SYSTEMDEPS))
|
||||||
|
DSYSPROCDEPS=$(addprefix $(PROCINC)/, $(SYSPROCDEPS))
|
||||||
|
|
||||||
crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(INC)/filerec.inc linux$(PPUEXT)\
|
|
||||||
syslinux$(PPUEXT)
|
|
||||||
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
|
||||||
$(PP) $(OPT) crt $(REDIR)
|
|
||||||
$(DEL) filerec.inc textrec.inc
|
|
||||||
|
|
||||||
lprt$(OEXT) : lprt.c
|
.PHONY : all install clean \
|
||||||
gcc $(AOUT) -c lprt.c -o lprt$(OEXT)
|
libs libsclean \
|
||||||
|
diffs diffclean \
|
||||||
|
|
||||||
getopts$(PPUEXT) : $(PROCINC)/getopts.pp syslinux$(PPUEXT)
|
all : $(OBJLOADERS) $(PPUOBJECTS)
|
||||||
$(COPY) $(PROCINC)/getopts.pp .
|
|
||||||
$(PP) $(OPT) getopts $(REDIR)
|
|
||||||
$(DEL) getopts.pp
|
|
||||||
|
|
||||||
strings$(PPUEXT) : $(PROCINC)/strings.pp syslinux$(PPUEXT)
|
install : all
|
||||||
$(COPY) $(PROCINC)/strings.pp .
|
$(MKDIR) $(UNITINSTALLDIR)
|
||||||
$(PP) $(OPT) strings $(REDIR)
|
$(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
|
||||||
$(DEL) strings.pp
|
|
||||||
|
|
||||||
objects$(PPUEXT) : objects.pp syslinux$(PPUEXT)
|
clean :
|
||||||
$(PP) $(OPT) objects $(REDIR)
|
-$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *.PPS log
|
||||||
|
|
||||||
printer$(PPUEXT) : printer.pp $(INC)/textrec.inc linux$(PPUEXT) syslinux$(PPUEXT)
|
#####################################################################
|
||||||
$(COPY) $(INC)/textrec.inc .
|
# Files
|
||||||
$(PP) $(OPT) printer $(REDIR)
|
#####################################################################
|
||||||
$(DEL) textrec.inc
|
|
||||||
|
|
||||||
linux$(PPUEXT) : linux.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc\
|
#
|
||||||
syscalls.inc systypes.inc sysconst.inc syslinux$(PPUEXT)
|
# Loaders
|
||||||
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
#
|
||||||
$(PP) $(OPT) linux.pp $(REDIR)
|
|
||||||
$(DEL) filerec.inc textrec.inc
|
|
||||||
|
|
||||||
sockets$(PPUEXT) : sockets.pp linux.ppu $(INC)/textrec.inc $(INC)/filerec.inc
|
|
||||||
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
|
||||||
$(PP) $(OPT) sockets.pp $(REDIR)
|
|
||||||
$(DEL) filerec.inc textrec.inc
|
|
||||||
|
|
||||||
errors$(PPUEXT) : errors.pp strings.ppu
|
|
||||||
$(PP) $(OPT) errors.pp $(REDIR)
|
|
||||||
|
|
||||||
prt0$(OEXT) : $(PRT)
|
prt0$(OEXT) : $(PRT)
|
||||||
-as $(PRT) -o prt0$(OEXT)
|
-as $(PRT) -o prt0$(OEXT)
|
||||||
@ -268,11 +279,87 @@ prt0$(OEXT) : $(PRT)
|
|||||||
gprt0$(OEXT) : gprt1.as
|
gprt0$(OEXT) : gprt1.as
|
||||||
-as gprt1.as -o gprt0$(OEXT)
|
-as gprt1.as -o gprt0$(OEXT)
|
||||||
|
|
||||||
objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp syslinux$(PPUEXT)
|
lprt$(OEXT) : lprt.c
|
||||||
|
gcc $(AOUT) -c lprt.c -o lprt$(OEXT)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Base Units (System, strings, os-dependent-base-unit)
|
||||||
|
#
|
||||||
|
|
||||||
|
$(SYSTEMPPU) : syslinux.pp $(SYSLINUXDEPS) $(DSYSTEMDEPS) $(DSYSPROCDEPS)
|
||||||
|
$(COPY) $(DSYSTEMDEPS) $(DSYSPROCDEPS) .
|
||||||
|
$(PP) $(OPT) -Us -Sg syslinux.pp $(REDIR)
|
||||||
|
$(DEL) $(SYSTEMDEPS) $(SYSPROCDEPS)
|
||||||
|
|
||||||
|
strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) $(PROCINC)/strings.pp .
|
||||||
|
$(PP) $(OPT) strings $(REDIR)
|
||||||
|
$(DEL) strings.pp
|
||||||
|
|
||||||
|
linux$(PPUEXT) : linux.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
|
||||||
|
syscalls.inc systypes.inc sysconst.inc $(SYSTEMPPU)
|
||||||
|
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
||||||
|
$(PP) $(OPT) linux.pp $(REDIR)
|
||||||
|
$(DEL) filerec.inc textrec.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Delphi Object Model
|
||||||
|
#
|
||||||
|
|
||||||
|
objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
|
||||||
$(COPY) $(OBJPASDIR)/objpas.pp .
|
$(COPY) $(OBJPASDIR)/objpas.pp .
|
||||||
$(PP) $(OPT) objpas $(REDIR)
|
$(PP) $(OPT) objpas $(REDIR)
|
||||||
$(DEL) objpas.pp
|
$(DEL) objpas.pp
|
||||||
|
|
||||||
|
#
|
||||||
|
# System Dependent Units
|
||||||
|
#
|
||||||
|
|
||||||
|
sockets$(PPUEXT) : sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
|
||||||
|
linux$(PPUEXT) $(SYSTEMPPU)
|
||||||
|
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
||||||
|
$(PP) $(OPT) sockets.pp $(REDIR)
|
||||||
|
$(DEL) filerec.inc textrec.inc
|
||||||
|
|
||||||
|
errors$(PPUEXT) : errors.pp strings$(PPUEXT) $(SYSTEMPPU)
|
||||||
|
$(PP) $(OPT) errors.pp $(REDIR)
|
||||||
|
|
||||||
|
#
|
||||||
|
# TP7 Compatible RTL Units
|
||||||
|
#
|
||||||
|
|
||||||
|
dos$(PPUEXT) : $(DOSDEPS) $(SYSTEMPPU)
|
||||||
|
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
||||||
|
$(PP) $(OPT) dos $(REDIR)
|
||||||
|
$(DEL) filerec.inc textrec.inc
|
||||||
|
|
||||||
|
crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(INC)/filerec.inc linux$(PPUEXT)\
|
||||||
|
$(SYSTEMPPU)
|
||||||
|
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
||||||
|
$(PP) $(OPT) crt $(REDIR)
|
||||||
|
$(DEL) filerec.inc textrec.inc
|
||||||
|
|
||||||
|
objects$(PPUEXT) : objects.pp $(SYSTEMPPU)
|
||||||
|
$(PP) $(OPT) objects $(REDIR)
|
||||||
|
|
||||||
|
printer$(PPUEXT) : printer.pp $(INC)/textrec.inc linux$(PPUEXT) $(SYSTEMPPU)
|
||||||
|
$(COPY) $(INC)/textrec.inc .
|
||||||
|
$(PP) $(OPT) printer $(REDIR)
|
||||||
|
$(DEL) textrec.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Other RTL Units
|
||||||
|
#
|
||||||
|
|
||||||
|
getopts$(PPUEXT) : $(PROCINC)/getopts.pp $(SYSTEMPPU)
|
||||||
|
$(COPY) $(PROCINC)/getopts.pp .
|
||||||
|
$(PP) $(OPT) getopts $(REDIR)
|
||||||
|
$(DEL) getopts.pp
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# Libs
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
libs : all libfpc$(LIBEXT)
|
libs : all libfpc$(LIBEXT)
|
||||||
|
|
||||||
libfpc.so:
|
libfpc.so:
|
||||||
@ -280,30 +367,17 @@ libfpc.so:
|
|||||||
|
|
||||||
libfpc.a:
|
libfpc.a:
|
||||||
$(PPUMOVE) -s -o fpc *.ppu
|
$(PPUMOVE) -s -o fpc *.ppu
|
||||||
|
|
||||||
install : all
|
|
||||||
$(MKDIR) $(UNITINSTALLDIR)/linuxunits
|
|
||||||
$(INSTALL) -m 644 *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)/linuxunits
|
|
||||||
|
|
||||||
libinstall : libs
|
libinstall : libs
|
||||||
$(INSTALL) -m 755 libfpc$(LIBEXT) $(LIBINSTALLDIR)
|
$(INSTALLEXE) libfpc$(LIBEXT) $(LIBINSTALLDIR)
|
||||||
$(INSTALL) -m 644 *$(PPLEXT) $(UNITINSTALLDIR)/linuxunits
|
$(INSTALL) *$(PPLEXT) $(UNITINSTALLDIR)
|
||||||
|
|
||||||
clean :
|
|
||||||
-$(DEL) *$(OEXT)
|
|
||||||
-$(DEL) *.s
|
|
||||||
-$(DEL) *$(PPUEXT)
|
|
||||||
-$(DEL) *.dif
|
|
||||||
-$(DEL) *.PPS
|
|
||||||
-$(DEL) log
|
|
||||||
|
|
||||||
libsclean : clean
|
libsclean : clean
|
||||||
-$(DEL) *.a *.so *$(PPLEXT)
|
-$(DEL) *.a *.so *$(PPLEXT)
|
||||||
|
|
||||||
diffclean :
|
#####################################################################
|
||||||
-$(DEL) *.dif
|
# Diffs
|
||||||
|
#####################################################################
|
||||||
distclean : diffclean libsclean clean
|
|
||||||
|
|
||||||
%.dif : %.pp
|
%.dif : %.pp
|
||||||
-$(DIFF) $(DIFFOPTS) $*.pp $(REFPATH)/linux/$*.pp >$*.dif
|
-$(DIFF) $(DIFFOPTS) $*.pp $(REFPATH)/linux/$*.pp >$*.dif
|
||||||
@ -314,10 +388,19 @@ distclean : diffclean libsclean clean
|
|||||||
%.dif : %.as
|
%.dif : %.as
|
||||||
-$(DIFF) $(DIFFOPTS) $*.s $(REFPATH)/linux/$*.s >$*.dif
|
-$(DIFF) $(DIFFOPTS) $*.s $(REFPATH)/linux/$*.s >$*.dif
|
||||||
|
|
||||||
|
diffclean :
|
||||||
|
-$(DEL) *.dif
|
||||||
|
|
||||||
makefile.dif : makefile
|
makefile.dif : makefile
|
||||||
-$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/linux/makefile > makefile.dif
|
-$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/linux/makefile > makefile.dif
|
||||||
|
|
||||||
|
|
||||||
diffs : dos.dif syslinux.dif objects.dif errno.dif prt0.dif prt1.dif \
|
diffs : dos.dif syslinux.dif objects.dif errno.dif prt0.dif prt1.dif \
|
||||||
objects.dif linux.dif printer.dif os.dif syscalls.dif sysnr.dif \
|
objects.dif linux.dif printer.dif os.dif syscalls.dif sysnr.dif \
|
||||||
makefile.dif
|
makefile.dif
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# Distribution
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
distclean : clean libsclean diffclean
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user