Browse Source

* fpcmake

peter 26 years ago
parent
commit
1d8ee73e62
9 changed files with 3426 additions and 397 deletions
  1. 19 5
      compiler/Makefile
  2. 17 4
      compiler/Makefile.fpc
  3. 370 0
      compiler/new/Makefile.fpc
  4. 1020 257
      install/Makefile
  5. 168 0
      install/Makefile.fpc
  6. 882 58
      install/demo/Makefile
  7. 30 0
      install/demo/Makefile.fpc
  8. 895 73
      install/fpinst/Makefile
  9. 25 0
      install/fpinst/Makefile.fpc

+ 19 - 5
compiler/Makefile

@@ -1,12 +1,12 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-08 15:24
+# Makefile generated from Makefile.fpc on 1999-11-09 20:52
 #
 
 defaultrule: Makefile all
 
 Makefile: Makefile.fpc
 	fpcmake
-	$(MAKE)
+	
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -122,6 +122,20 @@ endif
 
 # Pre Settings
 
+# Allow ALPHA, POWERPC, M68K, I386 defines for target cpu
+ifdef ALPHA
+CPU_TARGET=alpha
+endif
+ifdef POWERPC
+CPU_TARGET=powerpc
+endif
+ifdef M68K
+CPU_TARGET=m68k
+endif
+ifdef I386
+CPU_TARGET=i386
+endif
+
 # RTL
 RTL=../rtl
 UTILS=../utils
@@ -189,15 +203,15 @@ MSGFILE=error$(FPCLANG).msg
 # set correct defines (-d$(CPU_TARGET) is automaticly added in makefile.fpc)
 override LOCALDEF+=-dGDB -dBROWSERLOG
 
-# for i386 also insert MMX support
+# i386 specific
 ifeq ($(CPU_TARGET),i386)
+# also insert MMX support
 override LOCALDEF+=-dSUPPORT_MMX
-endif
-
 # We don't need the intel and binary writer on linux...
 ifdef inlinux
 override LOCALDEF+=-dNOAG386INT -dNOAG386BIN
 endif
+endif
 
 override LOCALOPT+=$(LOCALDEF)
 

+ 17 - 4
compiler/Makefile.fpc

@@ -4,7 +4,6 @@
 
 [dirs]
 fpcdir=..
-unitdir=
 targetdir=.
 
 [defaults]
@@ -16,6 +15,20 @@ toolcmp=1
 
 
 [presettings]
+# Allow ALPHA, POWERPC, M68K, I386 defines for target cpu
+ifdef ALPHA
+CPU_TARGET=alpha
+endif
+ifdef POWERPC
+CPU_TARGET=powerpc
+endif
+ifdef M68K
+CPU_TARGET=m68k
+endif
+ifdef I386
+CPU_TARGET=i386
+endif
+
 # RTL
 RTL=../rtl
 UTILS=../utils
@@ -54,15 +67,15 @@ MSGFILE=error$(FPCLANG).msg
 # set correct defines (-d$(CPU_TARGET) is automaticly added in makefile.fpc)
 override LOCALDEF+=-dGDB -dBROWSERLOG
 
-# for i386 also insert MMX support
+# i386 specific
 ifeq ($(CPU_TARGET),i386)
+# also insert MMX support
 override LOCALDEF+=-dSUPPORT_MMX
-endif
-
 # We don't need the intel and binary writer on linux...
 ifdef inlinux
 override LOCALDEF+=-dNOAG386INT -dNOAG386BIN
 endif
+endif
 
 override LOCALOPT+=$(LOCALDEF)
 

+ 370 - 0
compiler/new/Makefile.fpc

@@ -0,0 +1,370 @@
+#
+#   Makefile.fpc for Free Pascal Compiler NEWCG
+#
+
+[dirs]
+fpcdir=../..
+unitdir=$(CPU_TARGET) . $(OLDDIR)
+incdir=$(OLDDIR)
+targetdir=.
+
+[defaults]
+defaultoptions=-Sg
+
+[tools]
+tooldiff=1
+toolcmp=1
+
+
+[presettings]
+# Allow ALPHA, POWERPC, M68K, I386 defines for target cpu
+ifdef ALPHA
+CPU_TARGET=alpha
+endif
+ifdef POWERPC
+CPU_TARGET=powerpc
+endif
+ifdef M68K
+CPU_TARGET=m68k
+endif
+ifdef I386
+CPU_TARGET=i386
+endif
+
+# Where is the 'old' compiler located
+OLDDIR=..
+
+# RTL
+RTL=$(OLDDIR)/../rtl
+UTILS=$(OLDDIR)/../utils
+
+# Utils used by compiler development/installation
+COMPILERUTILS=$(OLDDIR)/utils
+
+# Default language for the compiler
+ifndef FPCLANG
+FPCLANG=e
+endif
+
+# Local defines for the compiler only
+ifndef LOCALDEF
+LOCALDEF=
+endif
+
+# Local options for the compiler only
+ifndef LOCALOPT
+LOCALOPT=
+endif
+
+# Options for the RTL only when cycling
+ifndef RTLOPTS
+RTLOPTS=
+endif
+
+# Message files
+MSGFILES=$(wildcard $(OLDDIR)/error*.msg)
+
+# ppcSUFFIX
+ifeq ($(CPU_TARGET),i386)
+CPUSUF=386
+endif
+ifeq ($(CPU_TARGET),alpha)
+CPUSUF=axp
+endif
+ifeq ($(CPU_TARGET),m68k)
+CPUSUF=68k
+endif
+ifeq ($(CPU_TARGET),powerpc)
+CPUSUF=ppc
+endif
+
+
+[postsettings]
+# Default message file
+MSGFILE=$(OLDDIR)/error$(FPCLANG).msg
+
+# set correct defines (-d$(CPU_TARGET) is automaticly added in makefile.fpc)
+override LOCALDEF+=-dGDB -dBROWSERLOG -dNEWCG
+
+# i386 specific
+ifeq ($(CPU_TARGET),i386)
+# also insert MMX support
+override LOCALDEF+=-dSUPPORT_MMX
+# We don't need the intel and binary writer on linux...
+ifdef inlinux
+override LOCALDEF+=-dNOAG386INT -dNOAG386BIN
+endif
+endif
+
+override LOCALOPT+=$(LOCALDEF)
+
+override FPCOPT+=$(LOCALOPT)
+
+
+[rules]
+#####################################################################
+# Setup Targets
+#####################################################################
+
+ifeq ($(OS_TARGET),win32)
+ifdef CMP
+override DIFF:=$(CMP) -i138
+endif
+endif
+
+# Used to avoid unnecessary steps in remake3
+ifdef DIFF
+ifdef OLDFPC
+DIFFRESULT:=$(shell $(DIFF) $(OLDFPC) $(FPC))
+else
+DIFFRESULT=Not equal
+endif
+else
+DIFFRESULT=No diff program
+endif
+
+
+#####################################################################
+# Setup os-independent filenames
+#####################################################################
+
+FPCEXENAME=pp$(EXEEXT)
+EXENAME=ppc$(CPUSUF)$(EXEEXT)
+TEMPNAME=ppc$(EXEEXT)
+TEMPNAME1=ppc1$(EXEEXT)
+TEMPNAME2=ppc2$(EXEEXT)
+TEMPNAME3=ppc3$(EXEEXT)
+MAKEDEP=ppdep$(EXEEXT)
+MSG2INC=msg2inc$(EXEEXT)
+
+
+#####################################################################
+# CPU targets
+#####################################################################
+
+alpha:
+        $(MAKE) ALPHA=1 all
+
+i386:
+        $(MAKE) I386=1 all
+
+m68k:
+        $(MAKE) M68K=1 all
+
+powerpc:
+        $(MAKE) POWERPC=1 all
+
+
+#####################################################################
+# Default makefile
+#####################################################################
+
+all: $(EXENAME)
+        $(MAKE) echotime
+
+ifeq ($(MAKELEVEL),0)
+ifndef STARTTIME
+ifdef DATE
+STARTTIME:=$(shell $(DATE) +%T)
+else
+STARTTIME:=unknown
+endif
+endif
+endif
+
+export STARTTIME
+
+ifdef DATE
+ENDTIME=$(shell $(DATE) +%T)
+else
+ENDTIME:=unknown
+endif
+
+echotime:
+        @echo Start $(STARTTIME) now $(ENDTIME)
+
+ifndef DIFFRESULT
+next :
+        @echo $(OLDFPC) and $(FPC) are equal
+        $(COPY) $(FPC) $(EXENAME)
+else
+next :
+        $(MAKE) execlean
+        $(MAKE) -C $(RTLDIR) clean
+        $(MAKE) -C $(RTLDIR) 'FPC=$(FPC)' 'OPT=$(RTLOPTS)' all
+        $(MAKE) clean
+        $(MAKE) all
+endif
+
+clean : execlean fpc_cleanall
+
+execlean :
+        -$(DEL) ppc386$(EXEEXT) ppcaxp$(EXEEXT) ppc68k$(EXEEXT) ppcppc$(EXEEXT)
+
+distclean: clean
+        -$(DEL) $(TEMPNAME) $(TEMPNAME1) $(TEMPNAME2) $(TEMPNAME3) $(MSG2INC)
+
+
+#####################################################################
+# Include depencies
+#####################################################################
+
+$(MAKEDEP): $(UTILS)/ppdep.pp
+        $(COMPILER) $(UTILS)/ppdep.pp
+        $(COPY) $(UTILS)/$(MAKEDEP) $(MAKEDEP)
+
+dependencies : $(MAKEDEP)
+        $(MAKEDEP) pp.pas $(FPCOPTDEF) $(LOCALDEF) '-F$$(COMPILER) $$(LOCALOPT)' > depend
+
+ifdef USEDEPEND
+
+include depend
+
+endif
+
+
+#####################################################################
+# Make targets
+#####################################################################
+
+$(MSG2INC): $(COMPILERUTILS)/msg2inc.pp
+        $(COMPILER) -FE. $(COMPILERUTILS)/msg2inc.pp
+
+# The msgtxt.inc only depends on the error?.msg file, not on msg2inc,
+# because that one will be new almost everytime
+msgtxt.inc: $(MSGFILE)
+        $(MAKE) $(MSG2INC)
+        $(MSG2INC) $(MSGFILE) msg msg
+
+msg: msgtxt.inc
+
+# Make only the compiler
+ifndef COMPLETE
+$(EXENAME) : $(wildcard *.pas) $(wildcard *.inc) msg
+        $(COMPILER) pp.pas
+        $(EXECPPAS)
+        $(MOVE) $(FPCEXENAME) $(EXENAME)
+else
+$(EXENAME) : $(wildcard *.pas) $(wildcard *.inc) msg
+        $(COMPILER) pp.pas
+        $(EXECPPAS)
+        $(COMPILER) pp.pas
+        $(EXECPPAS)
+        $(COMPILER) pp.pas
+        $(EXECPPAS)
+        $(MOVE) $(FPCEXENAME) $(EXENAME)
+endif
+
+tokens.dat : $(wildcard *.pas) $(wildcard *.inc)
+        $(COMPILER) tokendat.pas
+        ./tokendat
+
+# This target remakes the units with the currently made version
+remake: $(EXENAME)
+        $(MOVE) $(EXENAME) $(TEMPNAME)
+        $(MAKE) execlean
+        $(MAKE) -C $(RTLDIR) clean
+        $(MAKE) clean
+        $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' all
+
+remake3: $(TEMPNAME3)
+        $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME2)' next
+        $(DIFF) $(TEMPNAME3) $(EXENAME)
+
+$(TEMPNAME1) : $(EXENAME)
+        -$(DEL) $(TEMPNAME1)
+        $(MOVE) $(EXENAME) $(TEMPNAME1)
+
+$(TEMPNAME2) : $(TEMPNAME1)
+        $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME1)' 'OLDFPC=' next
+        -$(DEL) $(TEMPNAME2)
+        $(MOVE) $(EXENAME) $(TEMPNAME2)
+
+$(TEMPNAME3) : $(TEMPNAME2)
+        $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME2)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME1)' next
+        -$(DEL) $(TEMPNAME3)
+        $(MOVE) $(EXENAME) $(TEMPNAME3)
+
+cycle:
+        $(MAKE) clean
+        $(MAKE) -C $(RTLDIR) clean
+        $(MAKE) -C $(RTLDIR) 'OPT=$(RTLOPTS)' all
+        $(MAKE) remake3
+        $(MAKE) echotime
+
+cycledep:
+        $(MAKE) cycle USEDEPEND=1
+
+cvstest:
+        $(MAKE) cycle 'LOCALOPT=-n -Se' 'RTLOPTS=-n -Se'
+
+
+#####################################################################
+# Installation
+#####################################################################
+
+# This will only install the ppc386.exe, not the message files etc.
+quickinstall:
+ifdef inlinux
+        $(MKDIR) $(LIBINSTALLDIR)
+        $(INSTALLEXE) $(EXENAME) $(LIBINSTALLDIR)
+else
+        $(MKDIR) $(BININSTALLDIR)
+ifdef UPX
+        -$(UPX) $(EXENAME)
+endif
+        $(INSTALLEXE) $(EXENAME) $(BININSTALLDIR)
+endif
+
+installlib: quickinstall
+ifdef inlinux
+        $(INSTALLEXE) $(COMPILERUTILS)/samplecfg $(LIBINSTALLDIR)/samplecfg
+endif
+        $(MKDIR) $(MSGINSTALLDIR)
+        $(INSTALL) $(MSGFILES) $(MSGINSTALLDIR)
+
+# this also installs the link /usr/bin/ppc386. The .deb does that later
+install: installlib
+ifdef inlinux
+        $(MKDIR) $(BININSTALLDIR)
+        ln -sf $(LIBINSTALLDIR)/ppc386 $(BININSTALLDIR)/ppc386
+endif
+
+
+#####################################################################
+# Misc
+#####################################################################
+
+rtl :
+        $(MAKE) -C $(RTLDIR) all
+
+rtlclean :
+        $(MAKE) -C $(RTLDIR) clean
+
+rtlinstall:
+        $(MAKE) -C $(RTLDIR) install
+
+#####################################################################
+# local user configurable file
+# in makefile.loc you can add any desired target
+#####################################################################
+
+localmake:=$(strip $(wildcard makefile.loc))
+
+ifdef localmake
+include ./$(localmake)
+endif
+
+
+#####################################################################
+# M68k test targets
+#####################################################################
+
+# just a quick way to get ppc68k
+# needs to be after makefile.def for PASFILES INCFILES
+
+$(M68KEXENAME): $(PASFILES) $(INCFILES)
+        $(MAKE) clean
+        $(FPC) -uI386 -uSUPPORT_MMX -dm68k -o$(M68KEXENAME) pp
+        $(MAKE) clean
+

+ 1020 - 257
install/Makefile

@@ -1,257 +1,1020 @@
-#
-#   $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 Installation Helpers
-#
-#   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.
-#
-
-#####################################################################
-# Defaults
-#####################################################################
-
-# Default place of the makefile.fpc
-DEFAULTFPCDIR=..
-
-# Test dir if none specified
-ifndef BASEINSTALLDIR
-BASEINSTALLDIR=/pptest
-endif
-
-
-#####################################################################
-# Real targets
-#####################################################################
-
-UNITOBJECTS=
-EXEOBJECTS=
-
-
-#####################################################################
-# Common targets
-#####################################################################
-
-all:
-	@echo
-	@echo Possible targets are:
-	@echo
-	@echo basego32, basego32.zip
-	@echo basew32,	basew32.zip
-	@echo
-	@exit
-
-
-#####################################################################
-# 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
-
-
-#####################################################################
-# Dependencies
-#####################################################################
-
-# Directory to the base of the CVS tree
-CVSBASE=..
-CFG=$(CVSBASE)/rtl/cfg
-
-# Temporary path to pack a file
-PACKDIR=$(subst \,/,$(TMP))/pp_tmp
-
-# Use new ppc386
-PPNEW=$(BASEDIR)/$(CVSBASE)/compiler/ppc386.exe
-
-# Test dir if none specified
-ifndef PACKAGEDIR
-PACKAGEDIR=$(BASEDIR)
-endif
-
-
-##########################################################################
-# Default target
-##########################################################################
-
-.PHONY: all clean basego32 basew32
-
-clean:
-	-$(DEL) *.tpu install.exe install.dat
-
-##########################################################################
-# Install
-##########################################################################
-
-installer:
-	$(MAKE) -C $(CVSBASE)/rtl/go32v2 all RELEASE=1
-	$(MAKE) -C $(CVSBASE)/api all RELEASE=1
-	$(MAKE) -C $(CVSBASE)/fv all RELEASE=1
-	$(MAKE) -C fpinst all RELEASE=1
-
-
-##########################################################################
-# Basego32.zip
-##########################################################################
-
-basego32:
-# create dirs
-	$(MKDIR) $(BASEINSTALLDIR)
-	$(MKDIR) $(DOCINSTALLDIR)
-	$(MKDIR) $(BININSTALLDIR)
-	$(MKDIR) $(SOURCEINSTALLDIR)
-# readme & whatsnew and docs
-	$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
-# bingo32 (cwsdpmi,wmemu387.dxe)
-	$(COPY) bingo32/* $(BININSTALLDIR)
-# source (base)
-	$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
-# compiler
-	make -C $(CVSBASE)/compiler cycle OS_TARGET=go32v2 RELEASE=1
-	make -C $(CVSBASE)/compiler install OS_TARGET=go32v2
-# rtl go32v2
-	make -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
-	make -C $(CVSBASE)/rtl/go32v2 install OS_TARGET=go32v2 RELEASE=1 PP=$(PPNEW)
-# rtl go32v2 libs
-#	make -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
-#	make -C $(CVSBASE)/rtl/go32v2 libinstall OS_TARGET=go32v2 RELEASE=1 PP=$(PPNEW)
-# utils
-	make -C $(CVSBASE)/utils clean OS_TARGET=go32v2
-	make -C $(CVSBASE)/utils all OS_TARGET=go32v2 RELEASE=1 PP=$(PPNEW)
-	make -C $(CVSBASE)/utils install OS_TARGET=go32v2 RELEASE=1 PP=$(PPNEW)
-
-basego32.zip:
-	make basego32 BASEINSTALLDIR=$(PACKDIR)
-	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/basego32.zip * ; cd $(BASEDIR)
-	$(DELTREE) $(PACKDIR)
-
-
-##########################################################################
-# basew32.zip
-##########################################################################
-
-basew32:
-# create dirs
-	$(MKDIR) $(BASEINSTALLDIR)
-	$(MKDIR) $(DOCINSTALLDIR)
-	$(MKDIR) $(BININSTALLDIR)
-	$(MKDIR) $(SOURCEINSTALLDIR)
-# readme & whatsnew and docs
-	$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
-# source (base)
-	$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
-# readme.txt & whatsnew.txt
-	$(MKDIR) $(BASEINSTALLDIR)
-	$(COPY) readme.txt whatsnew.txt $(BASEINSTALLDIR)
-# compiler, the - is necessary because the files sometimes differ
-	-make -C $(CVSBASE)/compiler cycle OS_TARGET=win32 RELEASE=1
-	make -C $(CVSBASE)/compiler install OS_TARGET=win32
-# rtl
-	make -C $(CVSBASE)/rtl/win32 clean OS_TARGET=win32
-	make -C $(CVSBASE)/rtl/win32 install OS_TARGET=win32 RELEASE=1 PP=$(PPNEW)
-# rtl libs
-#	make -C $(CVSBASE)/rtl/win32 clean OS_TARGET=win32
-#	make -C $(CVSBASE)/rtl/win32 libinstall OS_TARGET=win32 RELEASE=1 PP=$(PPNEW)
-# utils
-	make -C $(CVSBASE)/utils clean OS_TARGET=win32
-	make -C $(CVSBASE)/utils install OS_TARGET=win32 RELEASE=1 PP=$(PPNEW)
-
-basew32.zip:
-	make basew32 BASEINSTALLDIR=$(PACKDIR)
-	$(MKDIR) $(PACKAGEDIR)
-# Maybe you need 4dos for it, becuase unix paths with / are used
-	cd $(PACKDIR)
-	$(ZIPPROG) $(PACKAGEDIR)/basew32.zip *
-	cd $(BASEDIR)
-	$(DELTREE) $(PACKDIR)
-
-
-##########################################################################
-# Baseemx.zip
-##########################################################################
-
-baseemx:
-# create dirs
-	$(MKDIR) $(BASEINSTALLDIR)
-	$(MKDIR) $(DOCINSTALLDIR)
-	$(MKDIR) $(BININSTALLDIR)
-	$(MKDIR) $(SOURCEINSTALLDIR)
-# readme & whatsnew and docs
-	$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
-# source (base)
-	$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
-# compiler
-	make -C $(CVSBASE)/compiler cycle OS_TARGET=os2 RELEASE=1
-	make -C $(CVSBASE)/compiler install OS_TARGET=os2
-# rtl os2
-	make -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=os2
-	make -C $(CVSBASE)/rtl/go32v2 install OS_TARGET=os2 RELEASE=1 PP=$(PPNEW)
-# rtl go32v2 libs
-#	make -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
-#	make -C $(CVSBASE)/rtl/go32v2 libinstall OS_TARGET=go32v2 RELEASE=1 PP=$(PPNEW)
-# utils
-	make -C $(CVSBASE)/utils clean OS_TARGET=os2
-	make -C $(CVSBASE)/utils install OS_TARGET=os2 RELEASE=1 PP=$(PPNEW)
-
-baseemx.zip:
-	make baseemx BASEINSTALLDIR=$(PACKDIR)
-	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/baseemx.zip * ; cd $(BASEDIR)
-	$(DELTREE) $(PACKDIR)
-
-#
-# $Log$
-# Revision 1.6  1999-07-22 16:18:07  peter
-#   * 0.99.12b release updates
-#
-# Revision 1.5	1999/06/11 13:58:35  peter
-#   * moved .txt to doc/
-#
-# Revision 1.4	1999/06/11 13:03:51  peter
-#   * os2 update, readme,whatsnew in doc/ dir
-#
-# Revision 1.3	1999/05/30 11:34:33  peter
-#   * updates to generate the installer
-#
-# Revision 1.2	1999/05/03 18:04:37  peter
-#   * updates
-#
-# Revision 1.1	1998/09/16 16:46:36  peter
-#   + updates
-#
-#
+#
+# Makefile generated from Makefile.fpc on 1999-11-10 00:26
+#
+
+defaultrule: Makefile help
+
+Makefile: Makefile.fpc
+	fpcmake
+	
+
+#####################################################################
+# Autodetect OS (Linux or Dos or Windows NT)
+# define inlinux when running under linux
+# define inWinNT when running under WinNT
+#####################################################################
+
+# We need only / in the path
+override PATH:=$(subst \,/,$(PATH))
+
+# Search for PWD and determine also if we are under linux
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
+ifeq ($(PWD),)
+nopwd:
+	@echo You need the GNU utils package to use this Makefile!
+	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
+	@exit
+else
+inlinux=1
+endif
+else
+PWD:=$(firstword $(PWD))
+endif
+
+# Detect NT - NT sets OS to Windows_NT
+ifndef inlinux
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+endif
+endif
+
+# Detect OS/2 - OS/2 has OS2_SHELL defined
+ifndef inlinux
+ifndef inWinNT
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+endif
+
+# The extension of executables
+ifdef inlinux
+EXEEXT=
+else
+EXEEXT=.exe
+endif
+
+# The path which is search separated by spaces
+ifdef inlinux
+SEARCHPATH=$(subst :, ,$(PATH))
+else
+SEARCHPATH=$(subst ;, ,$(PATH))
+endif
+
+#####################################################################
+# FPC version/target Detection
+#####################################################################
+
+# What compiler to use ?
+ifndef FPC
+ifdef inOS2
+export FPC=ppos2$(EXEEXT)
+else
+export FPC=ppc386$(EXEEXT)
+endif
+endif
+
+# Target OS
+ifndef OS_TARGET
+export OS_TARGET:=$(shell $(FPC) -iTO)
+endif
+
+# Source OS
+ifndef OS_SOURCE
+export OS_SOURCE:=$(shell $(FPC) -iSO)
+endif
+
+# Target CPU
+ifndef CPU_TARGET
+export CPU_TARGET:=$(shell $(FPC) -iTP)
+endif
+
+# Source CPU
+ifndef CPU_SOURCE
+export CPU_SOURCE:=$(shell $(FPC) -iSP)
+endif
+
+# FPC version
+ifndef FPC_VERSION
+export FPC_VERSION:=$(shell $(FPC) -iV)
+endif
+
+#####################################################################
+# Default Settings
+#####################################################################
+
+# Release ? Then force OPT and don't use extra opts via commandline
+ifdef RELEASE
+override OPT:=-Xs -OG2p3 -n
+endif
+
+# Verbose settings (warning,note,info)
+ifdef VERBOSE
+override OPT+=-vwni
+endif
+
+#####################################################################
+# User Settings
+#####################################################################
+
+
+# Pre Settings
+
+# Test dir if none specified
+ifndef BASEINSTALLDIR
+BASEINSTALLDIR=/pptest
+endif
+
+# Directory to the base of the CVS tree
+CVSBASE=..
+CFG=$(CVSBASE)/rtl/cfg
+
+# Temporary path to pack a file
+PACKDIR=$(subst \,/,$(TMP))/pp_tmp
+
+# Use new ppc386
+PPNEW=$(BASEDIR)/$(CVSBASE)/compiler/ppc386.exe
+
+# Test dir if none specified
+ifndef PACKAGEDIR
+PACKAGEDIR=$(BASEDIR)
+endif
+
+# Targets
+
+
+# Clean
+
+
+# Install
+
+
+# Defaults
+
+
+# Directories
+
+ifndef FPCDIR
+FPCDIR=..
+endif
+
+# Libraries
+
+
+#####################################################################
+# Compiler Command Line
+#####################################################################
+
+# Load commandline OPTDEF and add FPC_CPU define
+override FPCOPTDEF:=-d$(CPU_TARGET)
+
+# Load commandline OPT and add target and unit dir to be sure
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+
+
+ifdef NEEDOPT
+override FPCOPT+=$(NEEDOPT)
+endif
+
+# RTL first and then Unit dir (a unit can override RTLunit). Don't add the
+# dirs if fpcdir=. which can be used for the rtl makefiles
+ifdef FPCDIR
+ifneq ($(FPCDIR),.)
+override FPCOPT+=-Fu$(FPCDIR)/rtl/$(OS_TARGET) -Fu$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+
+# Smartlinking
+ifeq ($(SMARTLINK),YES)
+override FPCOPT+=-Cx
+endif
+
+# Add commandline options
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+endif
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+endif
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+endif
+
+# Add defines from FPCOPTDEF to FPCOPT
+ifdef FPCOPTDEF
+override FPCOPT+=$(FPCOPTDEF)
+endif
+
+# Was a config file specified ?
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+
+override COMPILER=$(FPC) $(FPCOPT)
+
+#####################################################################
+# Shell tools
+#####################################################################
+
+# To copy pograms
+ifndef COPY
+export COPY:=cp -fp
+endif
+
+# To move pograms
+ifndef MOVE
+export MOVE:=mv -f
+endif
+
+# Check delete program
+ifndef DEL
+export DEL:=rm -f
+endif
+
+# Check deltree program
+ifndef DELTREE
+export DELTREE:=rm -rf
+endif
+
+# To install files
+ifndef INSTALL
+ifdef inlinux
+export INSTALL:=install -m 644
+else
+export INSTALL:=$(COPY)
+endif
+endif
+
+# To install programs
+ifndef INSTALLEXE
+ifdef inlinux
+export INSTALLEXE:=install -m 755
+else
+export INSTALLEXE:=$(COPY)
+endif
+endif
+
+# To make a directory.
+ifndef MKDIR
+ifdef inlinux
+export MKDIR:=install -m 755 -d
+else
+export MKDIR:=ginstall -m 755 -d
+endif
+endif
+
+#####################################################################
+# Default Tools
+#####################################################################
+
+# assembler, redefine it if cross compiling
+ifndef AS
+AS=as
+endif
+
+# linker, but probably not used
+ifndef LD
+LD=ld
+endif
+
+# Where is the ppumove program ?
+ifndef PPUMOVE
+PPUMOVE=ppumove
+endif
+
+# Where is the ppdep program ?
+ifndef PPDEP
+PPDEP=ppdep
+endif
+
+# ppas.bat / ppas.sh
+ifdef inlinux
+PPAS=ppas.sh
+else
+ifdef inOS2
+PPAS=ppas.cmd
+else
+PPAS=ppas.bat
+endif
+endif
+
+# also call ppas if with command option -s
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+EXECPPAS=@$(PPAS)
+endif
+
+# ldconfig to rebuild .so cache
+ifdef inlinux
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+
+# echo
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+export ECHO:=echo
+else
+export ECHO:=$(firstword $(ECHO))
+endif
+endif
+
+# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
+# upx uses that one itself (PFV)
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(UPX),)
+UPXPROG=
+else
+export UPXPROG:=$(firstword $(UPX))
+endif
+else
+UPXPROG=
+endif
+endif
+
+# gdate/date
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))
+ifeq ($(DATE),)
+DATE=
+else
+export DATE:=$(firstword $(DATE))
+endif
+else
+export DATE:=$(firstword $(DATE))
+endif
+endif
+
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+
+# ZipProg, you can't use Zip as the var name (PFV)
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG=
+else
+export ZIPPROG:=$(firstword $(ZIPPROG)) -D9 -r
+endif
+endif
+
+ifndef ZIPEXT
+ZIPEXT=.zip
+endif
+
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+#####################################################################
+# Default extensions
+#####################################################################
+
+# Default needed extensions (Go32v2,Linux)
+LOADEREXT=.as
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+PACKAGESUFFIX=
+
+# Go32v1
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+PACKAGESUFFIX=v1
+endif
+
+# Go32v2
+ifeq ($(OS_TARGET),go32v2)
+PACKAGESUFFIX=go32
+endif
+
+# Linux
+ifeq ($(OS_TARGET),linux)
+PACKAGESUFFIX=linux
+endif
+
+# Win32
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=win32
+endif
+
+# OS/2
+ifeq ($(OS_TARGET),os2)
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+SMARTEXT=.so
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=os2
+endif
+
+# library prefix
+LIBPREFIX=lib
+ifeq ($(OS_TARGET),go32v2)
+LIBPREFIX=
+endif
+ifeq ($(OS_TARGET),go32v1)
+LIBPREFIX=
+endif
+
+# determine which .pas extension is used
+ifndef PASEXT
+ifdef EXEOBJECTS
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
+else
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
+endif
+ifeq ($(TESTPAS),)
+PASEXT=.pp
+else
+PASEXT=.pas
+endif
+endif
+
+#####################################################################
+# Default rules
+#####################################################################
+
+.PHONY: defaultrule all staticlib sharedlib showinstall install \
+	staticinstall sharedinstall libinstall zipinstall zipinstalladd \
+	clean cleanall depend info
+
+all: fpc_all
+
+staticlib: fpc_staticlib
+
+sharedlib: fpc_sharedlib
+
+showinstall: fpc_showinstall
+
+staticinstall: fpc_staticinstall
+
+sharedinstall: fpc_sharedinstall
+
+libinstall: fpc_libinstall
+
+zipinstall: fpc_zipinstall
+
+zipinstalladd: fpc_zipinstalladd
+
+clean: fpc_clean
+
+clean_all: fpc_clean_all
+
+depend: fpc_depend
+
+info: fpc_info
+
+#####################################################################
+# General compile rules
+#####################################################################
+
+.PHONY: fpc_all fpc_units fpc_exes fpc_loaders
+
+# Create Filenames
+LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
+EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
+EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
+UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
+UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
+UNITAFILES=$(addsuffix $(STATICLIBEXT),$(UNITOBJECTS))
+
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
+
+ifdef DEFAULTUNITS
+fpc_all: fpc_loaders fpc_units
+else
+fpc_all: fpc_loaders fpc_units fpc_exes
+endif
+
+fpc_loaders: $(LOADEROFILES)
+
+fpc_units: $(UNITPPUFILES)
+
+fpc_exes: $(EXEFILES)
+
+# General compile rules, available for both possible PASEXT
+%$(PPUEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(PPUEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(OEXT): %$(LOADEREXT)
+	$(AS) -o $*$(OEXT) $<
+
+#####################################################################
+# Library
+#####################################################################
+
+.PHONY: fpc_staticlib fpc_sharedlib
+
+# Default sharedlib units are all unit objects
+ifndef SHAREDLIBUNITOBJECTS
+SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
+endif
+
+fpc_staticlib:
+	$(MAKE) libsclean
+	$(MAKE) all SMARTLINK=YES
+
+fpc_sharedlib: all
+ifdef inlinux
+ifndef LIBNAME
+	@$(ECHO) LIBNAME not set
+else
+	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
+endif
+else
+	@$(ECHO) Shared Libraries not supported
+endif
+
+#####################################################################
+# Install rules
+#####################################################################
+
+.PHONY: fpc_showinstallfiles fpc_install
+
+ifdef UNITOBJECTS
+override UNITINSTALLFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRAINSTALLUNITS
+override EXTRAINSTALLFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)))
+endif
+
+fpc_showinstallfiles : all
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))
+endif
+endif
+ifdef LOADEROBJECTS
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
+endif
+ifdef UNITINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(UNITINSTALLFILES))
+endif
+ifdef EXTRAINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(EXTRAINSTALLFILES))
+endif
+
+fpc_install:
+# Create UnitInstallFiles
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	$(MKDIR) $(BININSTALLDIR)
+# Compress the exes if upx is defined
+ifdef UPXPROG
+	-$(UPXPROG) $(EXEFILES)
+endif
+	$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
+endif
+endif
+ifdef LOADEROBJECTS
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
+endif
+ifdef UNITINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(UNITINSTALLFILES) $(UNITINSTALLDIR)
+endif
+ifdef EXTRAINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(EXTRAINSTALLFILES) $(UNITINSTALLDIR)
+endif
+
+#####################################################################
+# Zip
+#####################################################################
+
+.PHONY: fpc_zipinstall fpc_zipinstalladd
+
+# Temporary path to pack a file
+ifndef PACKDIR
+ifndef inlinux
+PACKDIR=pack_tmp
+else
+PACKDIR=/tmp/fpc-pack
+endif
+endif
+
+# Test dir if none specified
+ifndef PACKAGEDIR
+PACKAGEDIR=$(BASEDIR)
+endif
+
+# Add .zip/.tar.gz extension
+ifdef ZIPNAME
+ifndef inlinux
+override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
+endif
+endif
+
+# Default target which is call before zipping
+ifndef ZIPTARGET
+ZIPTARGET=install
+endif
+
+# Note: This will not remove the zipfile first
+fpc_zipinstalladd:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz
+	cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
+	gzip $(PACKAGEDIR)/$(ZIPNAME).tar
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+# First remove the zip and then install
+fpc_zipinstall:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(DEL) $(PACKAGEDIR)/$(ZIPNAME)
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+#####################################################################
+# Clean rules
+#####################################################################
+
+.PHONY: fpc_clean fpc_libsclean fpc_cleanall
+
+ifdef UNITOBJECTS
+override UNITCLEANFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRACLEANUNITS
+override EXTRACLEANFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)))
+endif
+
+fpc_clean:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES) $(EXEOFILES)
+endif
+ifdef LOADEROBJECTS
+	-$(DEL) $(LOADEROFILES)
+endif
+ifdef UNITCLEANFILES
+	-$(DEL) $(UNITCLEANFILES)
+endif
+ifdef EXTRACLEANFILES
+	-$(DEL) $(EXTRACLEANFILES)
+endif
+	-$(DEL) $(PPAS) link.res log
+
+fpc_libsclean: clean
+	-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+
+fpc_cleanall:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES)
+endif
+	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+	-$(DELTREE) *$(SMARTEXT)
+
+#####################################################################
+# Depend rules
+#####################################################################
+
+.PHONY: fpc_depend
+
+fpc_depend:
+	$(PPDEP) $(UNITOBJECTS)
+
+#####################################################################
+# Users rules
+#####################################################################
+
+
+help:
+	@echo
+	@echo Possible targets are:
+	@echo
+	@echo basego32, basego32.zip
+	@echo basew32,	basew32.zip
+	@echo
+	@exit
+
+##########################################################################
+# Install
+##########################################################################
+
+installer:
+	$(MAKE) -C $(CVSBASE)/rtl/go32v2 all RELEASE=1
+	$(MAKE) -C $(CVSBASE)/api all RELEASE=1
+	$(MAKE) -C $(CVSBASE)/fv all RELEASE=1
+	$(MAKE) -C fpinst all RELEASE=1
+
+##########################################################################
+# Basego32.zip
+##########################################################################
+
+basego32:
+# create dirs
+	$(MKDIR) $(BASEINSTALLDIR)
+	$(MKDIR) $(DOCINSTALLDIR)
+	$(MKDIR) $(BININSTALLDIR)
+	$(MKDIR) $(SOURCEINSTALLDIR)
+# readme & whatsnew and docs
+	$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
+# bingo32 (cwsdpmi,wmemu387.dxe)
+	$(COPY) bingo32/* $(BININSTALLDIR)
+# source (base)
+	$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
+# compiler
+	$(MAKE) -C $(CVSBASE)/compiler cycle OS_TARGET=go32v2 RELEASE=1
+	$(MAKE) -C $(CVSBASE)/compiler install OS_TARGET=go32v2
+# rtl go32v2
+	$(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
+	$(MAKE) -C $(CVSBASE)/rtl/go32v2 install OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
+# rtl go32v2 libs
+#	$(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
+#	$(MAKE) -C $(CVSBASE)/rtl/go32v2 libinstall OS_TARGET=go32v2 RELEASE=1 PP=$(PPNEW)
+# utils
+	$(MAKE) -C $(CVSBASE)/utils clean OS_TARGET=go32v2
+	$(MAKE) -C $(CVSBASE)/utils all OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
+	$(MAKE) -C $(CVSBASE)/utils install OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
+
+basego32.zip:
+	$(MAKE) basego32 BASEINSTALLDIR=$(PACKDIR)
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/basego32.zip * ; cd $(BASEDIR)
+	$(DELTREE) $(PACKDIR)
+
+
+##########################################################################
+# basew32.zip
+##########################################################################
+
+basew32:
+# create dirs
+	$(MKDIR) $(BASEINSTALLDIR)
+	$(MKDIR) $(DOCINSTALLDIR)
+	$(MKDIR) $(BININSTALLDIR)
+	$(MKDIR) $(SOURCEINSTALLDIR)
+# readme & whatsnew and docs
+	$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
+# source (base)
+	$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
+# readme.txt & whatsnew.txt
+	$(MKDIR) $(BASEINSTALLDIR)
+	$(COPY) readme.txt whatsnew.txt $(BASEINSTALLDIR)
+# compiler, the - is necessary because the files sometimes differ
+	-$(MAKE) -C $(CVSBASE)/compiler cycle OS_TARGET=win32 RELEASE=1
+	$(MAKE) -C $(CVSBASE)/compiler install OS_TARGET=win32
+# rtl
+	$(MAKE) -C $(CVSBASE)/rtl/win32 clean OS_TARGET=win32
+	$(MAKE) -C $(CVSBASE)/rtl/win32 install OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
+# rtl libs
+#	$(MAKE) -C $(CVSBASE)/rtl/win32 clean OS_TARGET=win32
+#	$(MAKE) -C $(CVSBASE)/rtl/win32 libinstall OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
+# utils
+	$(MAKE) -C $(CVSBASE)/utils clean OS_TARGET=win32
+	$(MAKE) -C $(CVSBASE)/utils install OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
+
+basew32.zip:
+	$(MAKE) basew32 BASEINSTALLDIR=$(PACKDIR)
+	$(MKDIR) $(PACKAGEDIR)
+# Maybe you need 4dos for it, becuase unix paths with / are used
+	cd $(PACKDIR)
+	$(ZIPPROG) $(PACKAGEDIR)/basew32.zip *
+	cd $(BASEDIR)
+	$(DELTREE) $(PACKDIR)
+
+
+##########################################################################
+# Baseemx.zip
+##########################################################################
+
+baseemx:
+# create dirs
+	$(MKDIR) $(BASEINSTALLDIR)
+	$(MKDIR) $(DOCINSTALLDIR)
+	$(MKDIR) $(BININSTALLDIR)
+	$(MKDIR) $(SOURCEINSTALLDIR)
+# readme & whatsnew and docs
+	$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
+# source (base)
+	$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
+# compiler
+	$(MAKE) -C $(CVSBASE)/compiler cycle OS_TARGET=os2 RELEASE=1
+	$(MAKE) -C $(CVSBASE)/compiler install OS_TARGET=os2
+# rtl os2
+	$(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=os2
+	$(MAKE) -C $(CVSBASE)/rtl/go32v2 install OS_TARGET=os2 RELEASE=1 FPC=$(PPNEW)
+# rtl go32v2 libs
+#	$(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
+#	$(MAKE) -C $(CVSBASE)/rtl/go32v2 libinstall OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
+# utils
+	$(MAKE) -C $(CVSBASE)/utils clean OS_TARGET=os2
+	$(MAKE) -C $(CVSBASE)/utils install OS_TARGET=os2 RELEASE=1 FPC=$(PPNEW)
+
+baseemx.zip:
+	$(MAKE) baseemx BASEINSTALLDIR=$(PACKDIR)
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/baseemx.zip * ; cd $(BASEDIR)
+	$(DELTREE) $(PACKDIR)

+ 168 - 0
install/Makefile.fpc

@@ -0,0 +1,168 @@
+#
+#   Makefile.fpc for Free Component Library
+#
+
+[defaults]
+defaultrule=help
+
+[dirs]
+fpcdir=..
+
+[sections]
+info=0
+
+[tools]
+toolzip=1
+toolupx=1
+tooldate=1
+
+
+[presettings]
+# Test dir if none specified
+ifndef BASEINSTALLDIR
+BASEINSTALLDIR=/pptest
+endif
+
+# Directory to the base of the CVS tree
+CVSBASE=..
+CFG=$(CVSBASE)/rtl/cfg
+
+# Temporary path to pack a file
+PACKDIR=$(subst \,/,$(TMP))/pp_tmp
+
+# Use new ppc386
+PPNEW=$(BASEDIR)/$(CVSBASE)/compiler/ppc386.exe
+
+# Test dir if none specified
+ifndef PACKAGEDIR
+PACKAGEDIR=$(BASEDIR)
+endif
+
+
+[rules]
+help:
+	@echo
+	@echo Possible targets are:
+	@echo
+	@echo basego32, basego32.zip
+	@echo basew32,	basew32.zip
+	@echo
+	@exit
+
+##########################################################################
+# Install
+##########################################################################
+
+installer:
+	$(MAKE) -C $(CVSBASE)/rtl/go32v2 all RELEASE=1
+	$(MAKE) -C $(CVSBASE)/api all RELEASE=1
+	$(MAKE) -C $(CVSBASE)/fv all RELEASE=1
+	$(MAKE) -C fpinst all RELEASE=1
+
+##########################################################################
+# Basego32.zip
+##########################################################################
+
+basego32:
+# create dirs
+	$(MKDIR) $(BASEINSTALLDIR)
+	$(MKDIR) $(DOCINSTALLDIR)
+	$(MKDIR) $(BININSTALLDIR)
+	$(MKDIR) $(SOURCEINSTALLDIR)
+# readme & whatsnew and docs
+	$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
+# bingo32 (cwsdpmi,wmemu387.dxe)
+	$(COPY) bingo32/* $(BININSTALLDIR)
+# source (base)
+	$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
+# compiler
+	$(MAKE) -C $(CVSBASE)/compiler cycle OS_TARGET=go32v2 RELEASE=1
+	$(MAKE) -C $(CVSBASE)/compiler install OS_TARGET=go32v2
+# rtl go32v2
+	$(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
+	$(MAKE) -C $(CVSBASE)/rtl/go32v2 install OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
+# rtl go32v2 libs
+#	$(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
+#	$(MAKE) -C $(CVSBASE)/rtl/go32v2 libinstall OS_TARGET=go32v2 RELEASE=1 PP=$(PPNEW)
+# utils
+	$(MAKE) -C $(CVSBASE)/utils clean OS_TARGET=go32v2
+	$(MAKE) -C $(CVSBASE)/utils all OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
+	$(MAKE) -C $(CVSBASE)/utils install OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
+
+basego32.zip:
+	$(MAKE) basego32 BASEINSTALLDIR=$(PACKDIR)
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/basego32.zip * ; cd $(BASEDIR)
+	$(DELTREE) $(PACKDIR)
+
+
+##########################################################################
+# basew32.zip
+##########################################################################
+
+basew32:
+# create dirs
+	$(MKDIR) $(BASEINSTALLDIR)
+	$(MKDIR) $(DOCINSTALLDIR)
+	$(MKDIR) $(BININSTALLDIR)
+	$(MKDIR) $(SOURCEINSTALLDIR)
+# readme & whatsnew and docs
+	$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
+# source (base)
+	$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
+# readme.txt & whatsnew.txt
+	$(MKDIR) $(BASEINSTALLDIR)
+	$(COPY) readme.txt whatsnew.txt $(BASEINSTALLDIR)
+# compiler, the - is necessary because the files sometimes differ
+	-$(MAKE) -C $(CVSBASE)/compiler cycle OS_TARGET=win32 RELEASE=1
+	$(MAKE) -C $(CVSBASE)/compiler install OS_TARGET=win32
+# rtl
+	$(MAKE) -C $(CVSBASE)/rtl/win32 clean OS_TARGET=win32
+	$(MAKE) -C $(CVSBASE)/rtl/win32 install OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
+# rtl libs
+#	$(MAKE) -C $(CVSBASE)/rtl/win32 clean OS_TARGET=win32
+#	$(MAKE) -C $(CVSBASE)/rtl/win32 libinstall OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
+# utils
+	$(MAKE) -C $(CVSBASE)/utils clean OS_TARGET=win32
+	$(MAKE) -C $(CVSBASE)/utils install OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
+
+basew32.zip:
+	$(MAKE) basew32 BASEINSTALLDIR=$(PACKDIR)
+	$(MKDIR) $(PACKAGEDIR)
+# Maybe you need 4dos for it, becuase unix paths with / are used
+	cd $(PACKDIR)
+	$(ZIPPROG) $(PACKAGEDIR)/basew32.zip *
+	cd $(BASEDIR)
+	$(DELTREE) $(PACKDIR)
+
+
+##########################################################################
+# Baseemx.zip
+##########################################################################
+
+baseemx:
+# create dirs
+	$(MKDIR) $(BASEINSTALLDIR)
+	$(MKDIR) $(DOCINSTALLDIR)
+	$(MKDIR) $(BININSTALLDIR)
+	$(MKDIR) $(SOURCEINSTALLDIR)
+# readme & whatsnew and docs
+	$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
+# source (base)
+	$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
+# compiler
+	$(MAKE) -C $(CVSBASE)/compiler cycle OS_TARGET=os2 RELEASE=1
+	$(MAKE) -C $(CVSBASE)/compiler install OS_TARGET=os2
+# rtl os2
+	$(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=os2
+	$(MAKE) -C $(CVSBASE)/rtl/go32v2 install OS_TARGET=os2 RELEASE=1 FPC=$(PPNEW)
+# rtl go32v2 libs
+#	$(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
+#	$(MAKE) -C $(CVSBASE)/rtl/go32v2 libinstall OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
+# utils
+	$(MAKE) -C $(CVSBASE)/utils clean OS_TARGET=os2
+	$(MAKE) -C $(CVSBASE)/utils install OS_TARGET=os2 RELEASE=1 FPC=$(PPNEW)
+
+baseemx.zip:
+	$(MAKE) baseemx BASEINSTALLDIR=$(PACKDIR)
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/baseemx.zip * ; cd $(BASEDIR)
+	$(DELTREE) $(PACKDIR)

File diff suppressed because it is too large
+ 882 - 58
install/demo/Makefile


+ 30 - 0
install/demo/Makefile.fpc

@@ -0,0 +1,30 @@
+#
+#   Makefile.fpc for shedit
+#
+
+[targets]
+programs=eratos qsort hello blackbox magic lines fpctris
+programs_win32=winhello menu mandel dlltest testdll
+programs_linux=mandel samegame
+programs_go32v2=mandel samegame
+
+[dirs]
+fpcdir=../..
+unitdir=$(FPCDIR)/api
+targetdir=.
+
+
+[rules]
+ifeq ($(OS_TARGET),win32)
+vpath %$(PASEXT) win32
+endif
+
+#################################
+# Demo installation for linux
+#
+
+DEMOINSTALLDIR=$(DOCINSTALLDIR)/demo
+
+installdemo:
+        $(MKDIR) $(DEMOINSTALLDIR)
+        $(COPY) -rf * $(DEMOINSTALLDIR)

+ 895 - 73
install/fpinst/Makefile

@@ -1,129 +1,951 @@
 #
-#   $Id$
-#   Copyright (c) 1998 by the Free Pascal Development Team
-#
-#   Makefile for Free Pascal Installer
-#
-#   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.
+# Makefile generated from Makefile.fpc on 1999-11-10 00:36
 #
 
+defaultrule: Makefile all
+
+Makefile: Makefile.fpc
+	fpcmake
+	
 
 #####################################################################
-# Defaults
+# Autodetect OS (Linux or Dos or Windows NT)
+# define inlinux when running under linux
+# define inWinNT when running under WinNT
 #####################################################################
 
-# Default place of the makefile.fpc
-DEFAULTFPCDIR=../..
+# We need only / in the path
+override PATH:=$(subst \,/,$(PATH))
 
-NEEDUNITDIR=../../api ../../fv
+# Search for PWD and determine also if we are under linux
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
+ifeq ($(PWD),)
+nopwd:
+	@echo You need the GNU utils package to use this Makefile!
+	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
+	@exit
+else
+inlinux=1
+endif
+else
+PWD:=$(firstword $(PWD))
+endif
 
+# Detect NT - NT sets OS to Windows_NT
+ifndef inlinux
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+endif
+endif
+
+# Detect OS/2 - OS/2 has OS2_SHELL defined
+ifndef inlinux
+ifndef inWinNT
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+endif
+
+# The extension of executables
+ifdef inlinux
+EXEEXT=
+else
+EXEEXT=.exe
+endif
+
+# The path which is search separated by spaces
+ifdef inlinux
+SEARCHPATH=$(subst :, ,$(PATH))
+else
+SEARCHPATH=$(subst ;, ,$(PATH))
+endif
 
 #####################################################################
-# Real targets
+# FPC version/target Detection
 #####################################################################
 
+# What compiler to use ?
+ifndef FPC
+ifdef inOS2
+export FPC=ppos2$(EXEEXT)
+else
+export FPC=ppc386$(EXEEXT)
+endif
+endif
+
+# Target OS
+ifndef OS_TARGET
+export OS_TARGET:=$(shell $(FPC) -iTO)
+endif
+
+# Source OS
+ifndef OS_SOURCE
+export OS_SOURCE:=$(shell $(FPC) -iSO)
+endif
+
+# Target CPU
+ifndef CPU_TARGET
+export CPU_TARGET:=$(shell $(FPC) -iTP)
+endif
+
+# Source CPU
+ifndef CPU_SOURCE
+export CPU_SOURCE:=$(shell $(FPC) -iSP)
+endif
+
+# FPC version
+ifndef FPC_VERSION
+export FPC_VERSION:=$(shell $(FPC) -iV)
+endif
+
+#####################################################################
+# Default Settings
+#####################################################################
+
+# Release ? Then force OPT and don't use extra opts via commandline
+ifdef RELEASE
+override OPT:=-Xs -OG2p3 -n
+endif
+
+# Verbose settings (warning,note,info)
+ifdef VERBOSE
+override OPT+=-vwni
+endif
+
+#####################################################################
+# User Settings
+#####################################################################
+
+
+# Targets
+
 UNITOBJECTS=ziptypes unzip
+ifeq ($(OS_TARGET),linux)
+EXEOBJECTS+=installer
+endif
+ifeq ($(OS_TARGET),go32v2)
+EXEOBJECTS+=install
+endif
+ifeq ($(OS_TARGET),win32)
+EXEOBJECTS+=install
+endif
+ifeq ($(OS_TARGET),os2)
+EXEOBJECTS+=install
+endif
+
+# Clean
+
+ifeq ($(OS_TARGET),linux)
+EXTRACLEANFILES+=install.o
+endif
+
+# Install
+
+
+# Defaults
+
+
+# Directories
+
+ifndef FPCDIR
+FPCDIR=../..
+endif
+override NEEDUNITDIR=$(FPCDIR)/fv $(FPCDIR)/api
+ifndef TARGETDIR
+TARGETDIR=.
+endif
+
+# Libraries
+
 
-# this hack is needed to solve dup install target
-ifdef linux
-EXEOBJECTS=installer
+# Info
+
+FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
+
+#####################################################################
+# Compiler Command Line
+#####################################################################
+
+# Load commandline OPTDEF and add FPC_CPU define
+override FPCOPTDEF:=-d$(CPU_TARGET)
+
+# Load commandline OPT and add target and unit dir to be sure
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+
+
+ifdef NEEDOPT
+override FPCOPT+=$(NEEDOPT)
+endif
+
+# RTL first and then Unit dir (a unit can override RTLunit). Don't add the
+# dirs if fpcdir=. which can be used for the rtl makefiles
+ifdef FPCDIR
+ifneq ($(FPCDIR),.)
+override FPCOPT+=-Fu$(FPCDIR)/rtl/$(OS_TARGET) -Fu$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+
+ifdef NEEDUNITDIR
+override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
+endif
+
+# Target dirs
+ifdef TARGETDIR
+override FPCOPT+=-FE$(TARGETDIR)
+endif
+
+# Smartlinking
+ifeq ($(SMARTLINK),YES)
+override FPCOPT+=-Cx
+endif
+
+# Add commandline options
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+endif
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+endif
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+endif
+
+# Add defines from FPCOPTDEF to FPCOPT
+ifdef FPCOPTDEF
+override FPCOPT+=$(FPCOPTDEF)
+endif
+
+# Was a config file specified ?
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+
+override COMPILER=$(FPC) $(FPCOPT)
+
+#####################################################################
+# Shell tools
+#####################################################################
+
+# To copy pograms
+ifndef COPY
+export COPY:=cp -fp
+endif
+
+# To move pograms
+ifndef MOVE
+export MOVE:=mv -f
+endif
+
+# Check delete program
+ifndef DEL
+export DEL:=rm -f
+endif
+
+# Check deltree program
+ifndef DELTREE
+export DELTREE:=rm -rf
+endif
+
+# To install files
+ifndef INSTALL
+ifdef inlinux
+export INSTALL:=install -m 644
+else
+export INSTALL:=$(COPY)
+endif
+endif
+
+# To install programs
+ifndef INSTALLEXE
+ifdef inlinux
+export INSTALLEXE:=install -m 755
 else
-EXEOBJECTS=install
+export INSTALLEXE:=$(COPY)
+endif
+endif
+
+# To make a directory.
+ifndef MKDIR
+ifdef inlinux
+export MKDIR:=install -m 755 -d
+else
+export MKDIR:=ginstall -m 755 -d
+endif
 endif
 
 #####################################################################
-# Common targets
+# Default Tools
 #####################################################################
 
-.PHONY: all clean install info \
-	staticlib sharedlib libsclean \
-	staticinstall sharedinstall libinstall \
+# assembler, redefine it if cross compiling
+ifndef AS
+AS=as
+endif
+
+# linker, but probably not used
+ifndef LD
+LD=ld
+endif
 
-all: testfpcmake fpc_all
+# Where is the ppumove program ?
+ifndef PPUMOVE
+PPUMOVE=ppumove
+endif
 
-clean: testfpcmake fpc_clean
+# Where is the ppdep program ?
+ifndef PPDEP
+PPDEP=ppdep
+endif
 
-install: testfpcmake fpc_install
+# ppas.bat / ppas.sh
+ifdef inlinux
+PPAS=ppas.sh
+else
+ifdef inOS2
+PPAS=ppas.cmd
+else
+PPAS=ppas.bat
+endif
+endif
 
-info: testfpcmake fpc_info
+# also call ppas if with command option -s
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+EXECPPAS=@$(PPAS)
+endif
 
-staticlib: testfpcmake fpc_staticlib
+# ldconfig to rebuild .so cache
+ifdef inlinux
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
 
-sharedlib: testfpcmake fpc_sharedlib
+# echo
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+export ECHO:=echo
+else
+export ECHO:=$(firstword $(ECHO))
+endif
+endif
 
-libsclean: testfpcmake fpc_libsclean
+# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
+# upx uses that one itself (PFV)
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(UPX),)
+UPXPROG=
+else
+export UPXPROG:=$(firstword $(UPX))
+endif
+else
+UPXPROG=
+endif
+endif
 
-staticinstall: testfpcmake fpc_staticinstall
+# gdate/date
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))
+ifeq ($(DATE),)
+DATE=
+else
+export DATE:=$(firstword $(DATE))
+endif
+else
+export DATE:=$(firstword $(DATE))
+endif
+endif
 
-sharedinstall: testfpcmake fpc_sharedinstall
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
 
-libinstall: testfpcmake fpc_libinstall
+# ZipProg, you can't use Zip as the var name (PFV)
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG=
+else
+export ZIPPROG:=$(firstword $(ZIPPROG)) -D9 -r
+endif
+endif
 
+ifndef ZIPEXT
+ZIPEXT=.zip
+endif
 
 #####################################################################
-# Include default makefile
+# Default Directories
 #####################################################################
 
-# test if FPCMAKE is still valid
-ifdef FPCMAKE
-ifeq ($(strip $(wildcard $(FPCMAKE))),)
-FPCDIR=
-FPCMAKE=
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
 endif
 endif
 
-ifndef FPCDIR
-ifdef DEFAULTFPCDIR
-FPCDIR=$(DEFAULTFPCDIR)
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
 endif
 endif
 
-ifndef FPCMAKE
-ifdef FPCDIR
-FPCMAKE=$(FPCDIR)/makefile.fpc
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
 else
-FPCMAKE=makefile.fpc
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
 endif
 endif
 
-override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
-ifeq ($(FPCMAKE),)
-testfpcmake:
-	@echo makefile.fpc not found!
-	@echo Check the FPCMAKE and FPCDIR environment variables.
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+#####################################################################
+# Default extensions
+#####################################################################
+
+# Default needed extensions (Go32v2,Linux)
+LOADEREXT=.as
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+PACKAGESUFFIX=
+
+# Go32v1
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+PACKAGESUFFIX=v1
+endif
+
+# Go32v2
+ifeq ($(OS_TARGET),go32v2)
+PACKAGESUFFIX=go32
+endif
+
+# Linux
+ifeq ($(OS_TARGET),linux)
+PACKAGESUFFIX=linux
+endif
+
+# Win32
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=win32
+endif
+
+# OS/2
+ifeq ($(OS_TARGET),os2)
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+SMARTEXT=.so
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=os2
+endif
+
+# library prefix
+LIBPREFIX=lib
+ifeq ($(OS_TARGET),go32v2)
+LIBPREFIX=
+endif
+ifeq ($(OS_TARGET),go32v1)
+LIBPREFIX=
+endif
+
+# determine which .pas extension is used
+ifndef PASEXT
+ifdef EXEOBJECTS
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
+else
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
+endif
+ifeq ($(TESTPAS),)
+PASEXT=.pp
+else
+PASEXT=.pas
+endif
+endif
+
+#####################################################################
+# Default rules
+#####################################################################
+
+.PHONY: defaultrule all staticlib sharedlib showinstall install \
+	staticinstall sharedinstall libinstall zipinstall zipinstalladd \
+	clean cleanall depend info
+
+all: fpc_all
+
+staticlib: fpc_staticlib
+
+sharedlib: fpc_sharedlib
+
+showinstall: fpc_showinstall
+
+staticinstall: fpc_staticinstall
+
+sharedinstall: fpc_sharedinstall
+
+libinstall: fpc_libinstall
+
+zipinstall: fpc_zipinstall
+
+zipinstalladd: fpc_zipinstalladd
+
+clean: fpc_clean
+
+clean_all: fpc_clean_all
+
+depend: fpc_depend
+
+info: fpc_info
+
+#####################################################################
+# General compile rules
+#####################################################################
+
+.PHONY: fpc_all fpc_units fpc_exes fpc_loaders
+
+# Create Filenames
+LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
+EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
+EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
+UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
+UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
+UNITAFILES=$(addsuffix $(STATICLIBEXT),$(UNITOBJECTS))
+
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
+
+ifdef DEFAULTUNITS
+fpc_all: fpc_loaders fpc_units
+else
+fpc_all: fpc_loaders fpc_units fpc_exes
+endif
+
+fpc_loaders: $(LOADEROFILES)
+
+fpc_units: $(UNITPPUFILES)
+
+fpc_exes: $(EXEFILES)
+
+# General compile rules, available for both possible PASEXT
+%$(PPUEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(PPUEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(OEXT): %$(LOADEREXT)
+	$(AS) -o $*$(OEXT) $<
+
+#####################################################################
+# Library
+#####################################################################
+
+.PHONY: fpc_staticlib fpc_sharedlib
+
+# Default sharedlib units are all unit objects
+ifndef SHAREDLIBUNITOBJECTS
+SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
+endif
+
+fpc_staticlib:
+	$(MAKE) libsclean
+	$(MAKE) all SMARTLINK=YES
+
+fpc_sharedlib: all
+ifdef inlinux
+ifndef LIBNAME
+	@$(ECHO) LIBNAME not set
+else
+	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
+endif
+else
+	@$(ECHO) Shared Libraries not supported
+endif
+
+#####################################################################
+# Install rules
+#####################################################################
+
+.PHONY: fpc_showinstallfiles fpc_install
+
+ifdef UNITOBJECTS
+override UNITINSTALLFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRAINSTALLUNITS
+override EXTRAINSTALLFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)))
+endif
+
+fpc_showinstallfiles : all
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))
+endif
+endif
+ifdef LOADEROBJECTS
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
+endif
+ifdef UNITINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(UNITINSTALLFILES))
+endif
+ifdef EXTRAINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(EXTRAINSTALLFILES))
+endif
+
+fpc_install:
+# Create UnitInstallFiles
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	$(MKDIR) $(BININSTALLDIR)
+# Compress the exes if upx is defined
+ifdef UPXPROG
+	-$(UPXPROG) $(EXEFILES)
+endif
+	$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
+endif
+endif
+ifdef LOADEROBJECTS
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
+endif
+ifdef UNITINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(UNITINSTALLFILES) $(UNITINSTALLDIR)
+endif
+ifdef EXTRAINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(EXTRAINSTALLFILES) $(UNITINSTALLDIR)
+endif
+
+#####################################################################
+# Zip
+#####################################################################
+
+.PHONY: fpc_zipinstall fpc_zipinstalladd
+
+# Temporary path to pack a file
+ifndef PACKDIR
+ifndef inlinux
+PACKDIR=pack_tmp
+else
+PACKDIR=/tmp/fpc-pack
+endif
+endif
+
+# Test dir if none specified
+ifndef PACKAGEDIR
+PACKAGEDIR=$(BASEDIR)
+endif
+
+# Add .zip/.tar.gz extension
+ifdef ZIPNAME
+ifndef inlinux
+override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
+endif
+endif
+
+# Default target which is call before zipping
+ifndef ZIPTARGET
+ZIPTARGET=install
+endif
+
+# Note: This will not remove the zipfile first
+fpc_zipinstalladd:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
 	@exit
 else
-include $(FPCMAKE)
-testfpcmake:
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz
+	cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
+	gzip $(PACKAGEDIR)/$(ZIPNAME).tar
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
 endif
 
+# First remove the zip and then install
+fpc_zipinstall:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(DEL) $(PACKAGEDIR)/$(ZIPNAME)
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
 
 #####################################################################
-# Dependencies
+# Clean rules
 #####################################################################
 
-ifdef linux
-installer: install.pas
-	$(COMPILER) install.pas
+.PHONY: fpc_clean fpc_libsclean fpc_cleanall
+
+ifdef UNITOBJECTS
+override UNITCLEANFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRACLEANUNITS
+override EXTRACLEANFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)))
 endif
 
-#
-# $Log$
-# Revision 1.5  1999-06-29 22:20:18  peter
-#   * updated to use tab pages
-#
-# Revision 1.4  1999/05/30 11:34:34  peter
-#   * updates to generate the installer
-#
-# Revision 1.3	1999/05/02 14:27:39  peter
-#   * update to new standards
-#
-# Revision 1.2	1999/03/09 01:35:53  peter
-#   * makefile.fpc updates and defaultfpcdir var
-#
-#
+fpc_clean:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES) $(EXEOFILES)
+endif
+ifdef LOADEROBJECTS
+	-$(DEL) $(LOADEROFILES)
+endif
+ifdef UNITCLEANFILES
+	-$(DEL) $(UNITCLEANFILES)
+endif
+ifdef EXTRACLEANFILES
+	-$(DEL) $(EXTRACLEANFILES)
+endif
+	-$(DEL) $(PPAS) link.res log
+
+fpc_libsclean: clean
+	-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+
+fpc_cleanall:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES)
+endif
+	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+	-$(DELTREE) *$(SMARTEXT)
+
+#####################################################################
+# Depend rules
+#####################################################################
+
+.PHONY: fpc_depend
+
+fpc_depend:
+	$(PPDEP) $(UNITOBJECTS)
+
+#####################################################################
+# Info rules
+#####################################################################
+
+.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
+	fpc_dirinfo
+
+fpc_info: $(FPCINFO)
+
+fpc_infocfg:
+	@$(ECHO)
+	@$(ECHO)  == Configuration info ==
+	@$(ECHO)
+	@$(ECHO)  FPC....... $(FPC)
+	@$(ECHO)  Version... $(FPC_VERSION)
+	@$(ECHO)  CPU....... $(CPU_TARGET)
+	@$(ECHO)  Source.... $(OS_SOURCE)
+	@$(ECHO)  Target.... $(OS_TARGET)
+	@$(ECHO)
+
+
+fpc_infoinstall:
+	@$(ECHO)
+	@$(ECHO)  == Install info ==
+	@$(ECHO)
+ifdef DATE
+	@$(ECHO)  DateStr.............. $(DATESTR)
+endif
+	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
+	@$(ECHO)
+	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
+	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
+	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
+	@$(ECHO)  StaticUnitInstallDir. $(STATIC_UNITINSTALLDIR)
+	@$(ECHO)  SharedUnitInstallDir. $(SHARED_UNITINSTALLDIR)
+	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
+	@$(ECHO)  StaticLibInstallDir.. $(STATIC_LIBINSTALLDIR)
+	@$(ECHO)  SharedLibInstallDir.. $(SHARED_LIBINSTALLDIR)
+	@$(ECHO)  MsgInstallDir........ $(MSGINSTALLDIR)
+	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
+	@$(ECHO)
+
+#####################################################################
+# Users rules
+#####################################################################
+
+
+ifdef inlinux
+installer: install.pas
+	$(COMPILER) -oinstaller install.pas
+endif

+ 25 - 0
install/fpinst/Makefile.fpc

@@ -0,0 +1,25 @@
+#
+#   Makefile.fpc for FPC installer
+#
+
+[targets]
+units=ziptypes unzip
+programs_go32v2=install
+programs_win32=install
+programs_os2=install
+programs_linux=installer
+
+[clean]
+files_linux=install.o
+
+[dirs]
+fpcdir=../..
+unitdir=$(FPCDIR)/fv $(FPCDIR)/api
+targetdir=.
+
+
+[rules]
+ifdef inlinux
+installer: install.pas
+        $(COMPILER) -oinstaller install.pas
+endif

Some files were not shown because too many files changed in this diff