Browse Source

* zipinstall fixes

peter 26 years ago
parent
commit
602b295aaf
54 changed files with 123 additions and 39863 deletions
  1. 3 500
      base/Makefile
  2. 2 869
      compiler/Makefile
  3. 2 875
      compiler/new/Makefile
  4. 2 131
      fcl/Makefile
  5. 2 894
      fcl/db/Makefile
  6. 2 873
      fcl/go32v2/Makefile
  7. 2 873
      fcl/linux/Makefile
  8. 2 870
      fcl/os2/Makefile
  9. 2 875
      fcl/shedit/Makefile
  10. 2 870
      fcl/template/Makefile
  11. 2 865
      fcl/tests/Makefile
  12. 2 873
      fcl/win32/Makefile
  13. 3 141
      ide/Makefile
  14. 3 138
      ide/fake/Makefile
  15. 2 848
      ide/fake/compiler/Makefile
  16. 2 851
      ide/fake/gdb/Makefile
  17. 2 880
      ide/text/Makefile
  18. 2 795
      install/Makefile
  19. 2 865
      install/demo/Makefile
  20. 2 878
      install/fpinst/Makefile
  21. 3 138
      packages/Makefile
  22. 2 871
      packages/forms/Makefile
  23. 2 868
      packages/forms/demo/Makefile
  24. 2 905
      packages/gdbint/Makefile
  25. 2 134
      packages/gdbint/libgdb/Makefile
  26. 2 868
      packages/ggi/Makefile
  27. 2 861
      packages/gtk/Makefile
  28. 2 882
      packages/gtk/examples/Makefile
  29. 2 882
      packages/gtk/tutorial/Makefile
  30. 2 871
      packages/ibase/Makefile
  31. 2 871
      packages/inet/Makefile
  32. 2 871
      packages/mysql/Makefile
  33. 2 871
      packages/ncurses/Makefile
  34. 2 849
      packages/opengl/demos/Makefile
  35. 2 848
      packages/opengl/linuxd/Makefile
  36. 2 871
      packages/opengl/old/Makefile
  37. 2 871
      packages/paszlib/Makefile
  38. 2 868
      packages/postgres/Makefile
  39. 2 868
      packages/svgalib/Makefile
  40. 2 868
      packages/uncgi/Makefile
  41. 2 871
      packages/utmp/Makefile
  42. 2 131
      rtl/Makefile
  43. 2 894
      rtl/go32v1/Makefile
  44. 2 894
      rtl/go32v2/Makefile
  45. 2 894
      rtl/linux/Makefile
  46. 2 894
      rtl/os2/Makefile
  47. 2 894
      rtl/win32/Makefile
  48. 2 220
      tests/Makefile
  49. 3 2
      tests/tbs/tbs0220.pp
  50. 9 2
      tests/tbs/tbs0224.pp
  51. 5 877
      utils/Makefile
  52. 2 861
      utils/h2pas/Makefile
  53. 2 855
      utils/simulator/Makefile
  54. 2 874
      utils/tply/Makefile

+ 3 - 500
base/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: info
 
 #####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inlinux when running under linux
-# define inWinNT when running under WinNT
-#####################################################################
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -167,381 +44,17 @@ endif
 
 export RELEASE=1
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
 
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: $(addsuffix _all,$(DIROBJECTS))
 
@@ -561,21 +74,14 @@ install: $(addsuffix _install,$(DIROBJECTS))
 
 sourceinstall: $(addsuffix _sourceinstall,$(DIROBJECTS))
 
-zipinstall: $(addsuffix _zipinstall,$(DIROBJECTS))
-
-zipinstalladd: $(addsuffix _zipinstalladd,$(DIROBJECTS))
-
 clean: $(addsuffix _clean,$(DIROBJECTS))
 
 cleanall: $(addsuffix _cleanall,$(DIROBJECTS))
 
 depend: $(addsuffix _depend,$(DIROBJECTS))
 
-.PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall depend
+.PHONY:  all debug examples test smart shared showinstall install sourceinstall clean cleanall depend
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -903,9 +409,6 @@ ide_info:
 	$(MAKE) -C ide info
 endif
 
-#####################################################################
-# Users rules
-#####################################################################
 
 #####################################################################
 # Main targets

+ 2 - 869
compiler/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -243,483 +120,26 @@ override LOCALOPT+=$(LOCALDEF)
 
 override FPCOPT+=$(LOCALOPT)
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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
 
-# cmp
-ifndef CMP
-CMP:=$(strip $(wildcard $(addsuffix /cmp$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(CMP),)
-CMP=
-else
-export CMP:=$(firstword $(CMP))
-endif
-endif
 
-# diff
-ifndef DIFF
-DIFF:=$(strip $(wildcard $(addsuffix /diff$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(DIFF),)
-DIFF=
-else
-export DIFF:=$(firstword $(DIFF))
-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=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 debug: fpc_debug
 
@@ -741,9 +161,6 @@ info: fpc_info
 
 .PHONY:  debug smart shared showinstall sourceinstall zipinstall zipinstalladd cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -755,300 +172,16 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
 
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
 
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 #####################################################################
 # Setup Targets

+ 2 - 875
compiler/new/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# Release ? Then force OPT and don't use extra opts via commandline
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -260,492 +137,29 @@ override LOCALOPT+=$(LOCALDEF)
 
 override FPCOPT+=$(LOCALOPT)
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
 
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
 
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
-endif
 
 
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
 
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
 
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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
-
-# cmp
-ifndef CMP
-CMP:=$(strip $(wildcard $(addsuffix /cmp$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(CMP),)
-CMP=
-else
-export CMP:=$(firstword $(CMP))
-endif
-endif
-
-# diff
-ifndef DIFF
-DIFF:=$(strip $(wildcard $(addsuffix /diff$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(DIFF),)
-DIFF=
-else
-export DIFF:=$(firstword $(DIFF))
-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=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 debug: fpc_debug
 
@@ -767,9 +181,6 @@ info: fpc_info
 
 .PHONY:  debug smart shared showinstall sourceinstall zipinstall zipinstalladd cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -781,300 +192,16 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
 
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 #####################################################################
 # Setup Targets

+ 2 - 131
fcl/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-endif
-endif
-
-# Target OS
-ifndef OS_TARGET
-export OS_TARGET:=$(shell $(FPC) -iTO)
-endif
+# Autodetect OS (Linux or D
 
-# 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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
 
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -163,9 +40,6 @@ endif
 # Libraries
 
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: $(OS_TARGET)_all
 
@@ -199,9 +73,6 @@ info: $(OS_TARGET)_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall depend info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)

+ 2 - 894
fcl/db/Makefile

@@ -1,143 +1,17 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-
-#####################################################################
-# Default target
-#####################################################################
 
 override CPU_TARGET:=i386
 
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
 
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -185,479 +59,27 @@ override NEEDGCCLIB=1
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-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
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-# Add GCC lib path if asked
-ifdef GCCLIBDIR
-override FPCOPT+=-Fl$(GCCLIBDIR)
-endif
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
 
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
 
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
 
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
 
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -689,9 +111,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -721,329 +140,18 @@ endif
 
 .PHONY:  rtl_package fcl_package mysql_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
 
-#####################################################################
-# Source install rules
-#####################################################################
 
-.PHONY: fpc_sourceinstall
 
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
 
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 db$(PPUEXT): db.pp fields.inc dataset.inc dbs.inc
 

+ 2 - 873
fcl/go32v2/Makefile

@@ -1,144 +1,18 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-
-#####################################################################
-# Default target
-#####################################################################
 
 override OS_TARGET:=go32v2
 override CPU_TARGET:=i386
 
-#####################################################################
-# FPC version/target Detection
-#####################################################################
 
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -196,472 +70,27 @@ override NEEDUNITDIR+=$(addprefix $(PACKAGEDIR)/,$(PACKAGES))
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
-endif
-
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -689,9 +118,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -714,314 +140,17 @@ endif
 
 .PHONY:  rtl_package paszlib_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 INCFILES=$(addprefix $(INC)/,$(INCNAMES))
 

+ 2 - 873
fcl/linux/Makefile

@@ -1,144 +1,18 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-
-#####################################################################
-# Default target
-#####################################################################
 
 override OS_TARGET:=linux
 override CPU_TARGET:=i386
 
-#####################################################################
-# FPC version/target Detection
-#####################################################################
 
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -196,472 +70,27 @@ override NEEDUNITDIR+=$(addprefix $(PACKAGEDIR)/,$(PACKAGES))
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
-endif
-
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -689,9 +118,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -714,314 +140,17 @@ endif
 
 .PHONY:  rtl_package zlib_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 INCFILES=$(addprefix $(INC)/,$(INCNAMES))
 

+ 2 - 870
fcl/os2/Makefile

@@ -1,144 +1,18 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-
-#####################################################################
-# Default target
-#####################################################################
 
 override OS_TARGET:=os2
 override CPU_TARGET:=i386
 
-#####################################################################
-# FPC version/target Detection
-#####################################################################
 
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -194,468 +68,26 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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
 
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
 
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
-endif
 
 
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
 
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
 
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
 
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
 
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
 
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -683,9 +115,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -697,314 +126,17 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
 
-override ALLTARGET+=fpc_units
 
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
 
-fpc_units: $(UNITPPUFILES)
 
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 INCFILES=$(addprefix $(INC)/,$(INCNAMES))
 

+ 2 - 875
fcl/shedit/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# Release ? Then force OPT and don't use extra opts via commandline
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -190,463 +67,24 @@ override NEEDUNITDIR+=$(addprefix $(PACKAGEDIR)/,$(PACKAGES))
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
 
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
 
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
 
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
 
-#####################################################################
-# Shell tools
-#####################################################################
 
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
 
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -674,9 +112,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -711,323 +146,15 @@ endif
 
 .PHONY:  rtl_package fcl_package gtk_package
 
-#####################################################################
-# Units
-#####################################################################
 
-.PHONY: fpc_units
 
-override ALLTARGET+=fpc_units
 
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
 
-fpc_units: $(UNITPPUFILES)
 
-#####################################################################
-# Exes
-#####################################################################
 
-.PHONY: fpc_exes
 
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
 
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
 
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 870
fcl/template/Makefile

@@ -1,144 +1,18 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-
-#####################################################################
-# Default target
-#####################################################################
 
 override OS_TARGET:=<template>
 override CPU_TARGET:=i386
 
-#####################################################################
-# FPC version/target Detection
-#####################################################################
 
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -193,468 +67,26 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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
 
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
 
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
-endif
 
 
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
 
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
 
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
 
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
 
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
 
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -682,9 +114,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -696,314 +125,17 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
 
-override ALLTARGET+=fpc_units
 
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
 
-fpc_units: $(UNITPPUFILES)
 
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 vpath %$(PASEXT) $(INC) $(XML)
 

+ 2 - 865
fcl/tests/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -179,467 +56,25 @@ override NEEDUNITDIR+=$(FPCDIR)/fcl/$(OS_TARGET)
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -667,9 +102,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -688,309 +120,14 @@ endif
 
 .PHONY:  rtl_package fcl_package
 
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
 
-#####################################################################
-# Clean rules
-#####################################################################
 
-.PHONY: fpc_clean fpc_cleanall
 
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
 
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
 
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
 
-#####################################################################
-# Info rules
-#####################################################################
 
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 873
fcl/win32/Makefile

@@ -1,144 +1,18 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-
-#####################################################################
-# Default target
-#####################################################################
 
 override OS_TARGET:=win32
 override CPU_TARGET:=i386
 
-#####################################################################
-# FPC version/target Detection
-#####################################################################
 
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -196,472 +70,27 @@ override NEEDUNITDIR+=$(addprefix $(PACKAGEDIR)/,$(PACKAGES))
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
-endif
-
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -689,9 +118,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -714,314 +140,17 @@ endif
 
 .PHONY:  rtl_package paszlib_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 INCFILES=$(addprefix $(INC)/,$(INCNAMES))
 

+ 3 - 141
ide/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -163,9 +40,6 @@ endif
 # Libraries
 
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 debug: $(addsuffix _debug,$(DIROBJECTS))
 
@@ -183,23 +57,14 @@ install: $(addsuffix _install,$(DIROBJECTS))
 
 sourceinstall: $(addsuffix _sourceinstall,$(DIROBJECTS))
 
-zipinstall: $(addsuffix _zipinstall,$(DIROBJECTS))
-
-zipinstalladd: $(addsuffix _zipinstalladd,$(DIROBJECTS))
-
 clean: $(addsuffix _clean,$(DIROBJECTS))
 
 cleanall: $(addsuffix _cleanall,$(DIROBJECTS))
 
 depend: $(addsuffix _depend,$(DIROBJECTS))
 
-info: $(addsuffix _info,$(DIROBJECTS))
-
-.PHONY:  debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall depend info
+.PHONY:  debug examples test smart shared showinstall install sourceinstall clean cleanall depend
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -319,9 +184,6 @@ text_info:
 	$(MAKE) -C text info
 endif
 
-#####################################################################
-# Users rules
-#####################################################################
 
 .PHONY: gdb full fullgdb clean_compiler
 

+ 3 - 138
ide/fake/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -163,9 +40,6 @@ endif
 # Libraries
 
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: $(addsuffix _all,$(DIROBJECTS))
 
@@ -185,23 +59,14 @@ install: $(addsuffix _install,$(DIROBJECTS))
 
 sourceinstall: $(addsuffix _sourceinstall,$(DIROBJECTS))
 
-zipinstall: $(addsuffix _zipinstall,$(DIROBJECTS))
-
-zipinstalladd: $(addsuffix _zipinstalladd,$(DIROBJECTS))
-
 clean: $(addsuffix _clean,$(DIROBJECTS))
 
 cleanall: $(addsuffix _cleanall,$(DIROBJECTS))
 
 depend: $(addsuffix _depend,$(DIROBJECTS))
 
-info: $(addsuffix _info,$(DIROBJECTS))
+.PHONY:  all debug examples test smart shared showinstall install sourceinstall clean cleanall depend
 
-.PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall depend info
-
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)

+ 2 - 848
ide/fake/compiler/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -167,446 +44,20 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -634,9 +85,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -648,308 +96,14 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
 
-.PHONY: fpc_units
 
-override ALLTARGET+=fpc_units
 
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
 
-fpc_units: $(UNITPPUFILES)
 
-#####################################################################
-# General compile rules
-#####################################################################
 
-.PHONY: fpc_all fpc_debug
 
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
 
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 851
ide/fake/gdb/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -167,446 +44,20 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -634,9 +85,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -648,314 +96,17 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
 
-#####################################################################
-# Source install rules
-#####################################################################
 
-.PHONY: fpc_sourceinstall
 
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
 
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 gdbint$(PPUEXT): gdbint$(PASEXT)
 

+ 2 - 880
ide/text/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inlinux when running under linux
-# define inWinNT when running under WinNT
-#####################################################################
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -210,482 +87,28 @@ ifeq ($(FULL),1)
 override NEEDOPT+=-dBrowserCol -dGDB -Sg
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-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
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef NEEDLIBDIR
-override FPCOPT+=$(addprefix -Fl,$(NEEDLIBDIR))
-endif
-
-ifdef NEEDOBJDIR
-override FPCOPT+=$(addprefix -Fo,$(NEEDOBJDIR))
-endif
-
-# Add GCC lib path if asked
-ifdef GCCLIBDIR
-override FPCOPT+=-Fl$(GCCLIBDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -709,9 +132,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall sourceinstall zipinstall zipinstalladd cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -754,315 +174,17 @@ endif
 
 .PHONY:  rtl_package api_package fv_package gdbint_package
 
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 .PHONY: gdb full fullgdb clean_compiler
 

+ 2 - 795
install/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: help
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -187,454 +64,22 @@ endif
 # Libraries
 
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -660,9 +105,6 @@ cleanall: fpc_cleanall
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -674,247 +116,12 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
 
-#####################################################################
-# Clean rules
-#####################################################################
 
-.PHONY: fpc_clean fpc_cleanall
 
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
 
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
 
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
 
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 help:
 	@echo

+ 2 - 865
install/demo/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# Release ? Then force OPT and don't use extra opts via commandline
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -183,463 +60,24 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -667,9 +105,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -681,315 +116,17 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Exes
-#####################################################################
 
-.PHONY: fpc_exes
 
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
 
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
 
-fpc_exes: $(EXEFILES)
 
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 ifeq ($(OS_TARGET),win32)
 vpath %$(PASEXT) win32

+ 2 - 878
install/fpinst/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
+# Autodetect OS (Linux or D
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
 
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -189,463 +66,24 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -673,9 +111,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -687,329 +122,18 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
 
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
 
-fpc_units: $(UNITPPUFILES)
 
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
 
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
 
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 ifdef inlinux
 installer: install.pas

+ 3 - 138
packages/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -169,9 +46,6 @@ endif
 # Libraries
 
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: $(addsuffix _all,$(DIROBJECTS))
 
@@ -191,23 +65,14 @@ install: $(addsuffix _install,$(DIROBJECTS))
 
 sourceinstall: $(addsuffix _sourceinstall,$(DIROBJECTS))
 
-zipinstall: $(addsuffix _zipinstall,$(DIROBJECTS))
-
-zipinstalladd: $(addsuffix _zipinstalladd,$(DIROBJECTS))
-
 clean: $(addsuffix _clean,$(DIROBJECTS))
 
 cleanall: $(addsuffix _cleanall,$(DIROBJECTS))
 
 depend: $(addsuffix _depend,$(DIROBJECTS))
 
-info: $(addsuffix _info,$(DIROBJECTS))
+.PHONY:  all debug examples test smart shared showinstall install sourceinstall clean cleanall depend
 
-.PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall depend info
-
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)

+ 2 - 871
packages/forms/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -179,454 +56,22 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -654,9 +99,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -668,329 +110,18 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 forms$(PPUEXT): forms-$(FORMSVERSION)$(PASEXT) x$(PPUEXT) xresource$(PPUEXT) xlib$(PPUEXT)\
 	      xutil$(PPUEXT)

+ 2 - 868
packages/forms/demo/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# Release ? Then force OPT and don't use extra opts via commandline
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -172,470 +49,25 @@ override NEEDOTHERLIB=1
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-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
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-# Add Other dirs path if asked
-ifdef OTHERLIBDIR
-override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -663,9 +95,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -677,309 +106,14 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
 
-#####################################################################
-# Clean rules
-#####################################################################
 
-.PHONY: fpc_clean fpc_cleanall
 
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
 
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
 
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
 
-#####################################################################
-# Info rules
-#####################################################################
 
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 905
packages/gdbint/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
+# Autodetect OS (Linux or D
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
 
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -178,479 +55,27 @@ override NEEDGCCLIB=1
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-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
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDLIBDIR
-override FPCOPT+=$(addprefix -Fl,$(NEEDLIBDIR))
-endif
-
-ifdef NEEDOBJDIR
-override FPCOPT+=$(addprefix -Fo,$(NEEDOBJDIR))
-endif
-
-# Add GCC lib path if asked
-ifdef GCCLIBDIR
-override FPCOPT+=-Fl$(GCCLIBDIR)
-endif
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -680,9 +105,6 @@ info: fpc_info
 
 .PHONY:  all debug examples smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -694,344 +116,19 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
 
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
 
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
 
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# Examples
-#####################################################################
 
-.PHONY: fpc_examples fpc_test
 
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
 
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
 
-.PHONY: fpc_all fpc_debug
 
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
 
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 gdbint$(PPUEXT): gdbint$(PASEXT)
 

+ 2 - 134
packages/gdbint/libgdb/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
+# Autodetect OS (Linux or D
 
-# 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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -162,13 +39,7 @@ endif
 # Libraries
 
 
-#####################################################################
-# Standard rules
-#####################################################################
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -180,9 +51,6 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Users rules
-#####################################################################
 
 all:
 	$(MAKE) -C $(OS_TARGET) all

+ 2 - 868
packages/ggi/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -171,454 +48,22 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
 
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
 
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
 
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
 
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
 
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
 
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -650,9 +95,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -664,323 +106,15 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
 
-.PHONY: fpc_all fpc_debug
 
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
 
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 861
packages/gtk/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# Release ? Then force OPT and don't use extra opts via commandline
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -175,459 +52,23 @@ LIBNAME=fpgtk
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
 
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
 
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
 
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
 
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
 
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
 
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -653,9 +94,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -667,314 +105,17 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
 
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
 
-fpc_units: $(UNITPPUFILES)
 
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 clean: fpc_clean
 	$(MAKE) -C examples clean

+ 2 - 882
packages/gtk/examples/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -177,487 +54,28 @@ override NEEDOTHERLIB=1
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-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
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-# Add GCC lib path if asked
-ifdef GCCLIBDIR
-override FPCOPT+=-Fl$(GCCLIBDIR)
-endif
-
-# Add Other dirs path if asked
-ifdef OTHERLIBDIR
-override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
-endif
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -685,9 +103,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -699,309 +114,14 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
 
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 882
packages/gtk/tutorial/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -176,487 +53,28 @@ override NEEDOTHERLIB=1
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-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
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-# Add GCC lib path if asked
-ifdef GCCLIBDIR
-override FPCOPT+=-Fl$(GCCLIBDIR)
-endif
-
-# Add Other dirs path if asked
-ifdef OTHERLIBDIR
-override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
-endif
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -684,9 +102,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -698,309 +113,14 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
 
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 871
packages/ibase/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# Release ? Then force OPT and don't use extra opts via commandline
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -171,454 +48,22 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -650,9 +95,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -664,328 +106,17 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 testib$(EXEEXT): testib.pp ibase$(PPUEXT)

+ 2 - 871
packages/inet/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# Release ? Then force OPT and don't use extra opts via commandline
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -171,454 +48,22 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -650,9 +95,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -664,329 +106,18 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 testinet$(EXEEXT): testinet$(PASEXT) inet$(PPUEXT)
 

+ 2 - 871
packages/mysql/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# Release ? Then force OPT and don't use extra opts via commandline
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -171,454 +48,22 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -650,9 +95,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -664,329 +106,18 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 mysql$(PPUEXT): mysql$(PASEXT) mysql_com$(PPUEXT)
 

+ 2 - 871
packages/ncurses/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# Release ? Then force OPT and don't use extra opts via commandline
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -171,454 +48,22 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -650,9 +95,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -664,329 +106,18 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 testn$(EXEEXT): testn$(PASEXT) ncurses$(PPUEXT)
 

+ 2 - 849
packages/opengl/demos/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -167,446 +44,20 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -634,9 +85,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -648,309 +96,14 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Exes
-#####################################################################
 
-.PHONY: fpc_exes
 
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
 
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
 
-fpc_exes: $(EXEFILES)
 
-#####################################################################
-# General compile rules
-#####################################################################
 
-.PHONY: fpc_all fpc_debug
 
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
 
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 848
packages/opengl/linuxd/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -167,446 +44,20 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -634,9 +85,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -648,308 +96,14 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
 
-.PHONY: fpc_units
 
-override ALLTARGET+=fpc_units
 
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
 
-fpc_units: $(UNITPPUFILES)
 
-#####################################################################
-# General compile rules
-#####################################################################
 
-.PHONY: fpc_all fpc_debug
 
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
 
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 871
packages/opengl/old/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -172,458 +49,23 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -655,9 +97,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -669,323 +108,15 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
 
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 871
packages/paszlib/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -172,458 +49,23 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -655,9 +97,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -669,323 +108,15 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
 
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 868
packages/postgres/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -171,454 +48,22 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
 
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
 
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
 
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
 
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
 
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
 
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -650,9 +95,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -664,323 +106,15 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
 
-.PHONY: fpc_all fpc_debug
 
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
 
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 868
packages/svgalib/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -171,454 +48,22 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
 
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
 
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
 
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
 
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
 
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
 
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -650,9 +95,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -664,323 +106,15 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
 
-.PHONY: fpc_all fpc_debug
 
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
 
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 868
packages/uncgi/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -171,454 +48,22 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
 
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
 
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
 
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
 
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
 
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
 
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -650,9 +95,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -664,323 +106,15 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
 
-.PHONY: fpc_all fpc_debug
 
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
 
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 871
packages/utmp/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# Release ? Then force OPT and don't use extra opts via commandline
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -171,454 +48,22 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -650,9 +95,6 @@ info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -664,328 +106,17 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-
-fpc_examples: all $(EXAMPLEFILES)
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
 
-.PHONY: fpc_smart fpc_shared
 
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
 
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
 
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
 
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 testu$(EXEEXT): testu$(PASEXT) utmp$(PPUEXT)

+ 2 - 131
rtl/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-endif
-endif
-
-# Target OS
-ifndef OS_TARGET
-export OS_TARGET:=$(shell $(FPC) -iTO)
-endif
+# Autodetect OS (Linux or D
 
-# 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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
 
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -163,9 +40,6 @@ endif
 # Libraries
 
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: $(OS_TARGET)_all
 
@@ -199,9 +73,6 @@ info: $(OS_TARGET)_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall depend info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)

+ 2 - 894
rtl/go32v1/Makefile

@@ -1,144 +1,18 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-
-#####################################################################
-# Default target
-#####################################################################
 
 override OS_TARGET:=go32v1
 override CPU_TARGET:=i386
 
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
 
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -216,464 +90,25 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 # Put system unit dependencies together.
 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
-endif
-
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
 
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -701,347 +136,20 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
-
-
-#####################################################################
-# Loaders
-#####################################################################
-
-.PHONY: fpc_loaders
-
-%$(OEXT): %$(LOADEREXT)
-	$(AS) -o $*$(OEXT) $<
-
-override ALLTARGET+=fpc_loaders
-override CLEANTARGET+=fpc_loaders_clean
-override SHOWINSTALLTARGET+=fpc_loaders_showinstall
-override INSTALLTARGET+=fpc_loaders_install
-
-override LOADEROFILES:=$(addsuffix $(OEXT),$(LOADEROBJECTS))
-
-fpc_loaders: $(LOADEROFILES)
-
-fpc_loaders_clean:
-	-$(DEL) $(LOADEROFILES)
-
-fpc_loaders_showinstall:
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
-
-fpc_loaders_install:
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
-
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
 
-#####################################################################
-# Source install rules
-#####################################################################
 
-.PHONY: fpc_sourceinstall
 
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
 
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 vpath %$(PASEXT) $(INC) $(PROCINC)
 

+ 2 - 894
rtl/go32v2/Makefile

@@ -1,144 +1,18 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-
-#####################################################################
-# Default target
-#####################################################################
 
 override OS_TARGET:=go32v2
 override CPU_TARGET:=i386
 
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
 
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -216,464 +90,25 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 # Put system unit dependencies together.
 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
-endif
-
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
 
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -701,347 +136,20 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
-
-
-#####################################################################
-# Loaders
-#####################################################################
-
-.PHONY: fpc_loaders
-
-%$(OEXT): %$(LOADEREXT)
-	$(AS) -o $*$(OEXT) $<
-
-override ALLTARGET+=fpc_loaders
-override CLEANTARGET+=fpc_loaders_clean
-override SHOWINSTALLTARGET+=fpc_loaders_showinstall
-override INSTALLTARGET+=fpc_loaders_install
-
-override LOADEROFILES:=$(addsuffix $(OEXT),$(LOADEROBJECTS))
-
-fpc_loaders: $(LOADEROFILES)
-
-fpc_loaders_clean:
-	-$(DEL) $(LOADEROFILES)
-
-fpc_loaders_showinstall:
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
-
-fpc_loaders_install:
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
-
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
 
-#####################################################################
-# Source install rules
-#####################################################################
 
-.PHONY: fpc_sourceinstall
 
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
 
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 vpath %$(PASEXT) $(INC) $(PROCINC)
 

+ 2 - 894
rtl/linux/Makefile

@@ -1,144 +1,18 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-20 12:09
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-
-#####################################################################
-# Default target
-#####################################################################
 
 override OS_TARGET:=linux
 override CPU_TARGET:=i386
 
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
 
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -227,464 +101,25 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 # Put system unit dependencies together.
 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
-endif
-
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
 
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
 
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
 
-#####################################################################
-# Shell tools
-#####################################################################
 
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
 
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -712,347 +147,20 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
-
-
-#####################################################################
-# Loaders
-#####################################################################
 
-.PHONY: fpc_loaders
 
-%$(OEXT): %$(LOADEREXT)
-	$(AS) -o $*$(OEXT) $<
 
-override ALLTARGET+=fpc_loaders
-override CLEANTARGET+=fpc_loaders_clean
-override SHOWINSTALLTARGET+=fpc_loaders_showinstall
-override INSTALLTARGET+=fpc_loaders_install
 
-override LOADEROFILES:=$(addsuffix $(OEXT),$(LOADEROBJECTS))
 
-fpc_loaders: $(LOADEROFILES)
 
-fpc_loaders_clean:
-	-$(DEL) $(LOADEROFILES)
 
-fpc_loaders_showinstall:
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
 
-fpc_loaders_install:
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
 
-#####################################################################
-# Units
-#####################################################################
 
-.PHONY: fpc_units
 
-override ALLTARGET+=fpc_units
 
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
 
-fpc_units: $(UNITPPUFILES)
 
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 vpath %$(PASEXT) $(INC) $(PROCINC)
 

+ 2 - 894
rtl/os2/Makefile

@@ -1,144 +1,18 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-
-#####################################################################
-# Default target
-#####################################################################
 
 override OS_TARGET:=os2
 override CPU_TARGET:=i386
 
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
 
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -216,464 +90,25 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 # Put system unit dependencies together.
 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
-endif
-
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
 
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -701,347 +136,20 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
-
-
-#####################################################################
-# Loaders
-#####################################################################
-
-.PHONY: fpc_loaders
-
-%$(OEXT): %$(LOADEREXT)
-	$(AS) -o $*$(OEXT) $<
-
-override ALLTARGET+=fpc_loaders
-override CLEANTARGET+=fpc_loaders_clean
-override SHOWINSTALLTARGET+=fpc_loaders_showinstall
-override INSTALLTARGET+=fpc_loaders_install
-
-override LOADEROFILES:=$(addsuffix $(OEXT),$(LOADEROBJECTS))
-
-fpc_loaders: $(LOADEROFILES)
-
-fpc_loaders_clean:
-	-$(DEL) $(LOADEROFILES)
-
-fpc_loaders_showinstall:
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
-
-fpc_loaders_install:
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
-
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
 
-#####################################################################
-# Source install rules
-#####################################################################
 
-.PHONY: fpc_sourceinstall
 
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
 
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 vpath %.pas $(INC) $(PROCINC)
 vpath %.pp $(INC) $(PROCINC)

+ 2 - 894
rtl/win32/Makefile

@@ -1,144 +1,18 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-
-#####################################################################
-# Default target
-#####################################################################
 
 override OS_TARGET:=win32
 override CPU_TARGET:=i386
 
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
 
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -221,464 +95,25 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 # Put system unit dependencies together.
 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
-endif
-
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
 
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -706,347 +141,20 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
-
-
-#####################################################################
-# Loaders
-#####################################################################
-
-.PHONY: fpc_loaders
-
-%$(OEXT): %$(LOADEREXT)
-	$(AS) -o $*$(OEXT) $<
-
-override ALLTARGET+=fpc_loaders
-override CLEANTARGET+=fpc_loaders_clean
-override SHOWINSTALLTARGET+=fpc_loaders_showinstall
-override INSTALLTARGET+=fpc_loaders_install
-
-override LOADEROFILES:=$(addsuffix $(OEXT),$(LOADEROBJECTS))
-
-fpc_loaders: $(LOADEROFILES)
-
-fpc_loaders_clean:
-	-$(DEL) $(LOADEROFILES)
-
-fpc_loaders_showinstall:
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
-
-fpc_loaders_install:
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
-
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
 
-#####################################################################
-# Source install rules
-#####################################################################
 
-.PHONY: fpc_sourceinstall
 
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
 
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 vpath %$(PASEXT) $(INC) $(PROCINC)
 

+ 2 - 220
tests/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-21 00:34
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:59
 #
 
 defaultrule: info
 
 #####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inlinux when running under linux
-# define inWinNT when running under WinNT
-#####################################################################
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -162,100 +39,8 @@ endif
 # Libraries
 
 
-#####################################################################
-# Default extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -267,9 +52,6 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Users rules
-#####################################################################
 
 DIRS=tf ts tbs tbf test tesi to webtbs webtbf
 

+ 3 - 2
tests/tbs/tbs0220.pp

@@ -1,14 +1,15 @@
 type
-  a = array[0..100] of char;
+  a = array[1..100] of char;
 
 var
   a1 : a;
   s : string;
 begin
-  a1[0]:='1';a1[2]:='2';a1[3]:='3';
+  a1[1]:='1';a1[2]:='2';a1[3]:='3';
   a1[4]:='4';a1[5]:='5';a1[6]:='6';
   a1[7]:='7';a1[8]:='8';a1[9]:='9';
   a1[10]:='0';a1[11]:='1';
   s:=Copy(a1,1,10);
   if s<>'1234567890' then halt(1);
+  writeln('ok');
 end.

+ 9 - 2
tests/tbs/tbs0224.pp

@@ -3,10 +3,17 @@ var f:text;
     i:integer;
 begin
   assign(f,'bug0224.txt');
+  rewrite(f);
+  write(f,'     ');
   reset(f);
 {$I-}
   readln(f,i);              { you can't avoid run-time error generation }
 {$I+}
-  if IOResult<>0 then writeln('error...')
-                 else close(f);
+  if IOResult<>0 then
+   writeln('error...');
+{$I-}
+  close(f);
+  erase(f);
+{$I+}
+  if IOResult<>0 then;
 end.

+ 5 - 877
utils/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
+# Autodetect OS (Linux or D
 
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -176,473 +53,25 @@ override NEEDUNITDIR+=$(FPCDIR)/fcl/$(OS_TARGET)
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
 
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
 
-# data2inc
-ifndef DATA2INC
-DATA2INC:=$(strip $(wildcard $(addsuffix /data2inc$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(DATA2INC),)
-DATA2INC=
-else
-export DATA2INC:=$(firstword $(DATA2INC))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all $(addsuffix _all,$(DIROBJECTS))
 
@@ -662,9 +91,9 @@ install: fpc_install $(addsuffix _install,$(DIROBJECTS))
 
 sourceinstall: fpc_sourceinstall $(addsuffix _sourceinstall,$(DIROBJECTS))
 
-zipinstall: fpc_zipinstall $(addsuffix _zipinstall,$(DIROBJECTS))
+zipinstall: fpc_zipinstall
 
-zipinstalladd: fpc_zipinstalladd $(addsuffix _zipinstalladd,$(DIROBJECTS))
+zipinstalladd: fpc_zipinstalladd
 
 clean: fpc_clean $(addsuffix _clean,$(DIROBJECTS))
 
@@ -672,13 +101,10 @@ cleanall: fpc_cleanall $(addsuffix _cleanall,$(DIROBJECTS))
 
 depend: $(addsuffix _depend,$(DIROBJECTS))
 
-info: fpc_info $(addsuffix _info,$(DIROBJECTS))
+info: fpc_info
 
 .PHONY:  all debug examples test smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall depend info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -697,311 +123,16 @@ endif
 
 .PHONY:  rtl_package fcl_package
 
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
 
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
 
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
 
-fpc_exes: $(EXEFILES)
 
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
 
-fpc_debug:
-	$(MAKE) all DEBUG=1
 
-# General compile rules, available for both possible PASEXT
 
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 
 
 # Target Dirs
@@ -1111,9 +242,6 @@ h2pas_info:
 	$(MAKE) -C h2pas info
 endif
 
-#####################################################################
-# Users rules
-#####################################################################
 
 #
 # PPU Tools

+ 2 - 861
utils/h2pas/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-endif
-endif
-
-# Target OS
-ifndef OS_TARGET
-export OS_TARGET:=$(shell $(FPC) -iTO)
-endif
+# Autodetect OS (Linux or D
 
-# 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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -172,458 +49,23 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
 
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
 
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
 
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
 
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
 
-#####################################################################
-# Install Directories
-#####################################################################
 
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
 
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
 
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
 
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
 
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
 
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
 
 
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -651,9 +93,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -665,315 +104,17 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
 
-.PHONY: fpc_sourceinstall
 
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
 
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
 
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
 
-#####################################################################
-# Clean rules
-#####################################################################
 
-.PHONY: fpc_clean fpc_cleanall
 
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
-
-#####################################################################
-# Users rules
-#####################################################################
 
 # do we have pyacc?
 ifndef PYACC

+ 2 - 855
utils/simulator/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Targets
@@ -171,454 +48,22 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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 RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
 
-# 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
 
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
-
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -646,9 +91,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -660,309 +102,14 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
 
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
 
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
 
-#####################################################################
-# Source install rules
-#####################################################################
 
-.PHONY: fpc_sourceinstall
 
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
 
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 

+ 2 - 874
utils/tply/Makefile

@@ -1,137 +1,14 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-12-19 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-12-21 16:56
 #
 
 defaultrule: all
 
 #####################################################################
-# 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
-# Compatibility with old makefiles
-ifdef PP
-export FPC=$(PP)
-else
-ifdef inOS2
-export FPC=ppos2$(EXEEXT)
-else
-export FPC=ppc386$(EXEEXT)
-endif
-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
-#####################################################################
+# Autodetect OS (Linux or D
 
-# Release ? Then force OPT and don't use extra opts via commandline
-ifndef REDIRFILE
-REDIRFILE=log
-endif
 
-ifdef RELEASE
-override OPT:=-Xs -OG2p3 -n
-endif
 
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override OPT+=-vwni
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override OPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
 
 
 # Pre Settings
@@ -182,458 +59,23 @@ endif
 
 INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# create fcldir,rtldir,unitdir
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifneq ($(FPCDIR),.)
-override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
-override FCLDIR=$(FPCDIR)/fcl/$(OS_TARGET)
-override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-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
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef EXTRAINSTALLDIR
-EXTRAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-
-#####################################################################
-# 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
-
-ifdef RTLDIR
-override FPCOPT+=-Fu$(RTLDIR)
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Smartlinking
-ifdef SMARTLINK
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g
-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
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment variable FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# To copy pograms
-ifndef COPY
-export COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-export COPYTREE:=cp -rfp
-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
-
-# 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
-
-# ppdep
-ifndef PPDEP
-PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPDEP),)
-PPDEP=
-else
-export PPDEP:=$(firstword $(PPDEP))
-endif
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-export PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
 
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-export PPUFILES:=$(firstword $(PPUFILES))
-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 ($(UPXPROG),)
-UPXPROG=
-else
-export UPXPROG:=$(firstword $(UPXPROG))
-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 extensions
-#####################################################################
 
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-FPCMADE=fpcmade.v1
-endif
 
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-FPCMADE=fpcmade.dos
-endif
 
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-FPCMADE=fpcmade.lnx
-endif
 
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-FPCMADE=fpcmade.w32
-endif
 
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-FPCMADE=fpcmade.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
 
-#####################################################################
-# Standard rules
-#####################################################################
 
 all: fpc_all
 
@@ -661,9 +103,6 @@ info: fpc_info
 
 .PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipinstalladd clean cleanall info
 
-#####################################################################
-# Package depends
-#####################################################################
 
 ifneq ($(wildcard $(RTLDIR)),)
 ifeq ($(wildcard $(RTLDIR)/$(FPCMADE)),)
@@ -675,329 +114,18 @@ endif
 
 .PHONY:  rtl_package
 
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_debug
-
-$(FPCMADE):
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_all: $(addsuffix _package,$(COMPILEPACKAGES)) \
-	 $(addsuffix _component,$(COMPILECOMPONENTS)) \
-	 $(ALLTARGET) $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
 
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all SMARTLINK=1
-
-fpc_shared: 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_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-ifdef PPUFILES
-ifdef inlinux
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
-endif
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
-endif
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(INSTALLPPULIBFILES),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(EXTRAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
-endif
-
-#####################################################################
-# Source install rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
 
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(BASEDIR) $(SOURCEINSTALLDIR)
 
-#####################################################################
-# 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 DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-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 $(DESTZIPDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(DESTZIPDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(DESTZIPDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(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) $(DESTZIPDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(DESTZIPDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
 
-#####################################################################
-# Clean rules
-#####################################################################
 
-.PHONY: fpc_clean fpc_cleanall
 
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
 
-ifdef CLEANPPUFILES
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
-endif
-endif
 
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-fpc_cleanall: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
 
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-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_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(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)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
-	@$(ECHO)
 
-#####################################################################
-# Users rules
-#####################################################################
 
 pyacc$(EXEEXT): pyacc$(PASEXT) $(wildcard yacc*$(PASEXT))
 	$(COMPILER) pyacc$(PASEXT) $(REDIR)