|
@@ -1,6 +1,17 @@
|
|
-# makes the SYSTEM-Unit for Win32
|
|
|
|
#
|
|
#
|
|
-# 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 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.
|
|
@@ -11,13 +22,18 @@
|
|
#####################################################################
|
|
#####################################################################
|
|
|
|
|
|
# set the directory where to install the units.
|
|
# set the directory where to install the units.
|
|
|
|
+ifndef UNITINSTALLDIR
|
|
|
|
+UNITINSTALLDIR=c:\lib\ppc\win32
|
|
|
|
+endif
|
|
|
|
+
|
|
|
|
+# set the directory where to install libraries
|
|
ifndef LIBINSTALLDIR
|
|
ifndef LIBINSTALLDIR
|
|
-LIBINSTALLDIR=c:/pp/bin
|
|
|
|
|
|
+LIBINSTALLDIR=c:\lib
|
|
endif
|
|
endif
|
|
|
|
|
|
# What is the Operating System
|
|
# What is the Operating System
|
|
ifndef OS_SRC
|
|
ifndef OS_SRC
|
|
-OS_SRC=DOS
|
|
|
|
|
|
+OS_SRC=GO32V2
|
|
endif
|
|
endif
|
|
|
|
|
|
# What is the target operating system ?
|
|
# What is the target operating system ?
|
|
@@ -25,7 +41,14 @@ ifndef OS_TARGET
|
|
OS_TARGET=WIN32
|
|
OS_TARGET=WIN32
|
|
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)
|
|
ifndef PP
|
|
ifndef PP
|
|
PP=ppc386
|
|
PP=ppc386
|
|
endif
|
|
endif
|
|
@@ -36,8 +59,9 @@ ifndef OPT
|
|
OPT=
|
|
OPT=
|
|
endif
|
|
endif
|
|
|
|
|
|
-ifndef CPU
|
|
|
|
-CPU=i386
|
|
|
|
|
|
+# Where is the ppumove program ?
|
|
|
|
+ifndef PPUMOVE
|
|
|
|
+PPUMOVE=ppumove
|
|
endif
|
|
endif
|
|
|
|
|
|
#####################################################################
|
|
#####################################################################
|
|
@@ -48,32 +72,27 @@ endif
|
|
# Where are the include files
|
|
# Where are the include files
|
|
INC=../inc
|
|
INC=../inc
|
|
PROCINC=../$(CPU)
|
|
PROCINC=../$(CPU)
|
|
-
|
|
|
|
-ifeq ($(OS_TARGET),$(OS_SRC))
|
|
|
|
-CROSSCOMPILE=NO
|
|
|
|
-else
|
|
|
|
-CROSSCOMPILE=YES
|
|
|
|
-endif
|
|
|
|
|
|
+OBJPASDIR=../objpas
|
|
|
|
|
|
# To copy pograms
|
|
# To copy pograms
|
|
ifndef COPY
|
|
ifndef COPY
|
|
ifeq ($(DOS),YES)
|
|
ifeq ($(DOS),YES)
|
|
COPY=copy
|
|
COPY=copy
|
|
else
|
|
else
|
|
-COPY=cp -f -p
|
|
|
|
|
|
+COPY=cp -p
|
|
endif
|
|
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=copy
|
|
INSTALL=copy
|
|
@@ -82,6 +101,15 @@ 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.
|
|
# To make a directory.
|
|
ifndef MKDIR
|
|
ifndef MKDIR
|
|
ifeq ($(DOS),YES)
|
|
ifeq ($(DOS),YES)
|
|
@@ -91,8 +119,7 @@ MKDIR=install -m 755 -d
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
|
|
-
|
|
|
|
-#diff program
|
|
|
|
|
|
+# diff program
|
|
ifndef REFPATH
|
|
ifndef REFPATH
|
|
REFPATH=/usr/local/fpk/work/new/rtl
|
|
REFPATH=/usr/local/fpk/work/new/rtl
|
|
endif
|
|
endif
|
|
@@ -103,86 +130,204 @@ ifndef DIFFOPTS
|
|
DIFFOPTS=-b -c
|
|
DIFFOPTS=-b -c
|
|
endif
|
|
endif
|
|
|
|
|
|
-ifeq ($(CROSSCOMPILE),YES)
|
|
|
|
-OPT:=$(OPT) -dCROSSCOMPILE -TWIN32
|
|
|
|
|
|
+#
|
|
|
|
+# System independent Commandline Options
|
|
|
|
+#
|
|
|
|
+
|
|
|
|
+# Cross compiling ?
|
|
|
|
+ifeq ($(OS_TARGET),$(OS_SRC))
|
|
|
|
+CROSSCOMPILE=NO
|
|
|
|
+else
|
|
|
|
+CROSSCOMPILE=YES
|
|
endif
|
|
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
|
|
-OPT:=$(OPT) @$(CFGFILE)
|
|
|
|
|
|
+override OPT:=$(OPT) @$(CFGFILE)
|
|
endif
|
|
endif
|
|
|
|
|
|
-# os independent depends
|
|
|
|
-SYSTEMDEPS=$(INC)/system.inc $(INC)/systemh.inc $(INC)/mathh.inc $(INC)/real2str.inc \
|
|
|
|
- $(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
|
|
|
|
|
|
+# Check for crosscompile
|
|
|
|
+ifeq ($(CROSSCOMPILE),YES)
|
|
|
|
+override OPT:= $(OPT) -dCROSSCOMPILE -T$(OS_TARGET)
|
|
|
|
+endif
|
|
|
|
|
|
-PPUEXT = .ppu
|
|
|
|
|
|
+#
|
|
|
|
+# System dependent Commandline Options
|
|
|
|
+#
|
|
|
|
|
|
-OEXT = .obj
|
|
|
|
|
|
|
|
|
|
+#####################################################################
|
|
|
|
+# System dependent
|
|
|
|
+#####################################################################
|
|
|
|
|
|
-.PHONY: all clean install diffs diffclean
|
|
|
|
|
|
+# Determine needed extensions
|
|
|
|
+PPUEXT=.ppw
|
|
|
|
+PPLEXT=.ppl
|
|
|
|
+OEXT=.obj
|
|
|
|
+ASMEXT=.s
|
|
|
|
+LIBEXT=.a
|
|
|
|
|
|
-all : syswin32$(PPUEXT) strings$(PPUEXT) objpas$(PPUEXT) getopts$(PPUEXT) \
|
|
|
|
- base$(PPUEXT)
|
|
|
|
|
|
+# Define Linux Units
|
|
|
|
+SYSTEMPPU=syswin32$(PPUEXT)
|
|
|
|
+OBJECTS=strings objpas \
|
|
|
|
+ base \
|
|
|
|
+# dos crt objects printer \
|
|
|
|
+ cpu mmx getopts \
|
|
|
|
|
|
|
|
+# No loaders needed
|
|
|
|
+LOADERS=
|
|
|
|
|
|
-getopts$(PPUEXT) : $(PROCINC)/getopts.pp syswin32$(PPUEXT)
|
|
|
|
- $(COPY) $(PROCINC)/getopts.pp .
|
|
|
|
- $(PP) $(OPT) getopts.pp $(REDIR)
|
|
|
|
- $(DEL) getopts.pp
|
|
|
|
|
|
+#####################################################################
|
|
|
|
+# 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 \
|
|
|
|
|
|
-strings$(PPUEXT) : $(PROCINC)/strings.pp syswin32$(PPUEXT)
|
|
|
|
|
|
+all : $(OBJLOADERS) $(PPUOBJECTS)
|
|
|
|
+
|
|
|
|
+install : all
|
|
|
|
+ $(MKDIR) $(UNITINSTALLDIR)
|
|
|
|
+ $(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
|
|
|
|
+
|
|
|
|
+clean :
|
|
|
|
+ -$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *.PPS log
|
|
|
|
+
|
|
|
|
+#####################################################################
|
|
|
|
+# Files
|
|
|
|
+#####################################################################
|
|
|
|
+
|
|
|
|
+#
|
|
|
|
+# Loaders
|
|
|
|
+#
|
|
|
|
+
|
|
|
|
+#
|
|
|
|
+# Base Units (System, strings, os-dependent-base-unit)
|
|
|
|
+#
|
|
|
|
+
|
|
|
|
+$(SYSTEMPPU) : syswin32.pp $(DSYSTEMDEPS) $(DSYSPROCDEPS)
|
|
|
|
+ $(COPY) $(DSYSTEMDEPS) .
|
|
|
|
+ $(COPY) $(DSYSPROCDEPS) .
|
|
|
|
+ $(PP) $(OPT) -Us -Sg syswin32.pp $(REDIR)
|
|
|
|
+ $(DEL) $(SYSTEMDEPS)
|
|
|
|
+ $(DEL) $(SYSPROCDEPS)
|
|
|
|
+
|
|
|
|
+strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
|
|
$(COPY) $(PROCINC)/strings.pp .
|
|
$(COPY) $(PROCINC)/strings.pp .
|
|
$(PP) $(OPT) strings.pp $(REDIR)
|
|
$(PP) $(OPT) strings.pp $(REDIR)
|
|
$(DEL) strings.pp
|
|
$(DEL) strings.pp
|
|
|
|
|
|
-dos$(PPUEXT) : dos.pp strings$(PPUEXT) syswin32$(PPUEXT)
|
|
|
|
- $(PP) $(OPT) dos.pp $(REDIR)
|
|
|
|
|
|
+#
|
|
|
|
+# Delphi Object Model
|
|
|
|
+#
|
|
|
|
|
|
-base$(PPUEXT) : base.pp syswin32$(PPUEXT)
|
|
|
|
|
|
+objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
|
|
|
|
+ $(COPY) $(OBJPASDIR)/objpas.pp .
|
|
|
|
+ $(PP) $(OPT) objpas $(REDIR)
|
|
|
|
+ $(DEL) objpas.pp
|
|
|
|
+
|
|
|
|
+#
|
|
|
|
+# System Dependent Units
|
|
|
|
+#
|
|
|
|
+
|
|
|
|
+base$(PPUEXT) : base.pp $(SYSTEMPPU)
|
|
$(PP) $(OPT) base.pp $(REDIR)
|
|
$(PP) $(OPT) base.pp $(REDIR)
|
|
|
|
|
|
-objpas$(PPUEXT) : ../objpas/objpas.pp system$(PPUEXT)
|
|
|
|
- $(COPY) ../objpas/objpas.pp .
|
|
|
|
- $(PP) $(OPT) objpas $(REDIR)
|
|
|
|
- $(DEL) objpas.pp
|
|
|
|
-
|
|
|
|
-syswin32$(PPUEXT) : syswin32.pp $(SYSTEMDEP)
|
|
|
|
- $(COPY) $(INC)/*.inc $(PROCINC)/*.inc .
|
|
|
|
- $(PP) $(OPT) -Us -Sg syswin32 $(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
|
|
|
|
-
|
|
|
|
-clean:
|
|
|
|
- -$(DEL) *$(OEXT)
|
|
|
|
- -$(DEL) *$(PPUEXT)
|
|
|
|
- -$(DEL) *.dif
|
|
|
|
- -$(DEL) *.s
|
|
|
|
- -$(DEL) log
|
|
|
|
|
|
+#
|
|
|
|
+# TP7 Compatible RTL Units
|
|
|
|
+#
|
|
|
|
|
|
-diffclean:
|
|
|
|
- -$(DEL) *.dif
|
|
|
|
|
|
+dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
|
|
|
|
+ go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
|
|
|
|
+ $(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
|
|
|
+ $(PP) $(OPT) dos $(REDIR)
|
|
|
|
+ $(DEL) filerec.inc textrec.inc
|
|
|
|
+
|
|
|
|
+#crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
|
|
|
|
+# $(COPY) $(INC)/textrec.inc .
|
|
|
|
+# $(PP) $(OPT) crt $(REDIR)
|
|
|
|
+# $(DEL) textrec.inc
|
|
|
|
+
|
|
|
|
+#objects$(PPUEXT) : objects.pp $(SYSTEMPPU)
|
|
|
|
+# $(PP) $(OPT) objects.pp $(REDIR)
|
|
|
|
|
|
-install: all
|
|
|
|
- $(MKDIR) $(LIBINSTALLDIR)/units
|
|
|
|
- $(INSTALL) *$(OEXT) *$(PPUEXT) $(LIBINSTALLDIR)/units
|
|
|
|
|
|
+#printer$(PPUEXT) : printer.pp $(SYSTEMPPU)
|
|
|
|
+# $(PP) $(OPT) printer.pp $(REDIR)
|
|
|
|
+
|
|
|
|
+#
|
|
|
|
+# 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
|
|
|
|
+
|
|
|
|
+getopts$(PPUEXT) : $(PROCINC)/getopts.pp $(SYSTEMPPU)
|
|
|
|
+ $(COPY) $(PROCINC)/getopts.pp .
|
|
|
|
+ $(PP) $(OPT) getopts.pp $(REDIR)
|
|
|
|
+ $(DEL) getopts.pp
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#####################################################################
|
|
|
|
+# Libs
|
|
|
|
+#####################################################################
|
|
|
|
+
|
|
|
|
+libs: all
|
|
|
|
+
|
|
|
|
+libsclean : clean
|
|
|
|
+ -$(DEL) *.$(LIBEXT) *$(PPLEXT)
|
|
|
|
+
|
|
|
|
+#####################################################################
|
|
|
|
+# Diffs
|
|
|
|
+#####################################################################
|
|
|
|
|
|
%.dif : %.pp
|
|
%.dif : %.pp
|
|
- -$(DIFF) $(DIFOPTS) $*.pp $(REFPATH)/win32/$*.pp > $*.dif
|
|
|
|
|
|
+ -$(DIFF) $(DIFFOPTS) $*.pp $(REFPATH)/dos/go32v1/$*.pp > $*.dif
|
|
|
|
|
|
%.dif : %.inc
|
|
%.dif : %.inc
|
|
- -$(DIFF) $(DIFOPTS) $*.inc $(REFPATH)/win32/$*.inc > $*.dif
|
|
|
|
|
|
+ -$(DIFF) $(DIFFOPTS) $*.inc $(REFPATH)/dos/go32v1/$*.inc > $*.dif
|
|
|
|
|
|
%.dif : %.as
|
|
%.dif : %.as
|
|
- -$(DIFF) $(DIFOPTS) $*.as $(REFPATH)/win32/$*.as > $*.dif
|
|
|
|
|
|
+ -$(DIFF) $(DIFFOPTS) $*.as $(REFPATH)/dos/go32v1/$*.as > $*.dif
|
|
|
|
+
|
|
|
|
+diffclean:
|
|
|
|
+ -$(DEL) *.dif
|
|
|
|
|
|
makefile.dif : makefile
|
|
makefile.dif : makefile
|
|
- -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/os2/makefile > makefile.dif
|
|
|
|
|
|
+ -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/dos/go32v1/makefile > makefile.dif
|
|
|
|
+
|
|
|
|
+diffs: syswin32.dif os.dif makefile.dif dos.dif base.dif struct.dif \
|
|
|
|
+ winheap.dif messages.dif
|
|
|
|
+
|
|
|
|
+#####################################################################
|
|
|
|
+# Distribution
|
|
|
|
+#####################################################################
|
|
|
|
|
|
|
|
+distclean : clean libsclean diffclean
|
|
|
|
|
|
-diffs: syswin32.dif dos.dif os.dif
|
|
|