peter пре 26 година
родитељ
комит
ba170472db

+ 151 - 154
compiler/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-09 20:52
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:51
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -217,6 +213,151 @@ override LOCALOPT+=$(LOCALDEF)
 
 override FPCOPT+=$(LOCALOPT)
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -402,10 +543,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -467,150 +608,6 @@ export DIFF:=$(firstword $(DIFF))
 endif
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################
@@ -1199,8 +1196,8 @@ ifdef inlinux
 	$(INSTALLEXE) $(EXENAME) $(LIBINSTALLDIR)
 else
 	$(MKDIR) $(BININSTALLDIR)
-ifdef UPX
-	-$(UPX) $(EXENAME)
+ifdef UPXPROG
+	-$(UPXPROG) $(EXENAME)
 endif
 	$(INSTALLEXE) $(EXENAME) $(BININSTALLDIR)
 endif

+ 3 - 3
compiler/Makefile.fpc

@@ -1,5 +1,5 @@
 #
-#   Makefile.fpc for shedit
+#   Makefile.fpc for Free Pascal Compiler
 #
 
 [dirs]
@@ -275,8 +275,8 @@ ifdef inlinux
         $(INSTALLEXE) $(EXENAME) $(LIBINSTALLDIR)
 else
         $(MKDIR) $(BININSTALLDIR)
-ifdef UPX
-        -$(UPX) $(EXENAME)
+ifdef UPXPROG
+        -$(UPXPROG) $(EXENAME)
 endif
         $(INSTALLEXE) $(EXENAME) $(BININSTALLDIR)
 endif

+ 151 - 154
compiler/new/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-09 20:51
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:51
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -236,6 +232,151 @@ override LOCALOPT+=$(LOCALDEF)
 
 override FPCOPT+=$(LOCALOPT)
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -430,10 +571,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -495,150 +636,6 @@ export DIFF:=$(firstword $(DIFF))
 endif
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################
@@ -1243,8 +1240,8 @@ ifdef inlinux
 	$(INSTALLEXE) $(EXENAME) $(LIBINSTALLDIR)
 else
 	$(MKDIR) $(BININSTALLDIR)
-ifdef UPX
-	-$(UPX) $(EXENAME)
+ifdef UPXPROG
+	-$(UPXPROG) $(EXENAME)
 endif
 	$(INSTALLEXE) $(EXENAME) $(BININSTALLDIR)
 endif

+ 2 - 2
compiler/new/Makefile.fpc

@@ -310,8 +310,8 @@ ifdef inlinux
         $(INSTALLEXE) $(EXENAME) $(LIBINSTALLDIR)
 else
         $(MKDIR) $(BININSTALLDIR)
-ifdef UPX
-        -$(UPX) $(EXENAME)
+ifdef UPXPROG
+        -$(UPXPROG) $(EXENAME)
 endif
         $(INSTALLEXE) $(EXENAME) $(BININSTALLDIR)
 endif

+ 2 - 522
fcl/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-09 16:13
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -138,282 +134,6 @@ endif
 # Libraries
 
 
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-
-ifdef NEEDOPT
-override FPCOPT+=$(NEEDOPT)
-endif
-
-# Smartlinking
-ifeq ($(SMARTLINK),YES)
-override FPCOPT+=-Cx
-endif
-
-# Add commandline options
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-override COMPILER=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
 #####################################################################
 # Default rules
 #####################################################################
@@ -434,246 +154,6 @@ depend: fpc_depend
 
 info: fpc_info
 
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_units fpc_exes fpc_loaders
-
-# Create Filenames
-LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
-EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
-UNITAFILES=$(addsuffix $(STATICLIBEXT),$(UNITOBJECTS))
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-ifdef DEFAULTUNITS
-fpc_all: fpc_loaders fpc_units
-else
-fpc_all: fpc_loaders fpc_units fpc_exes
-endif
-
-fpc_loaders: $(LOADEROFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-fpc_exes: $(EXEFILES)
-
-# General compile rules, available for both possible PASEXT
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(OEXT): %$(LOADEREXT)
-	$(AS) -o $*$(OEXT) $<
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_staticlib fpc_sharedlib
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
-endif
-
-fpc_staticlib:
-	$(MAKE) libsclean
-	$(MAKE) all SMARTLINK=YES
-
-fpc_sharedlib: all
-ifdef inlinux
-ifndef LIBNAME
-	@$(ECHO) LIBNAME not set
-else
-	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
-endif
-else
-	@$(ECHO) Shared Libraries not supported
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstallfiles fpc_install
-
-ifdef UNITOBJECTS
-override UNITINSTALLFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
-endif
-ifdef EXTRAINSTALLUNITS
-override EXTRAINSTALLFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)))
-endif
-
-fpc_showinstallfiles : all
-ifndef DEFAULTUNITS
-ifdef EXEOBJECTS
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))
-endif
-endif
-ifdef LOADEROBJECTS
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
-endif
-ifdef UNITINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(UNITINSTALLFILES))
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install:
-# Create UnitInstallFiles
-ifndef DEFAULTUNITS
-ifdef EXEOBJECTS
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(EXEFILES)
-endif
-	$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
-endif
-endif
-ifdef LOADEROBJECTS
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
-endif
-ifdef UNITINSTALLFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(UNITINSTALLFILES) $(UNITINSTALLDIR)
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(UNITINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall fpc_zipinstalladd
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inlinux
-PACKDIR=pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Test dir if none specified
-ifndef PACKAGEDIR
-PACKAGEDIR=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-endif
-
-# Default target which is call before zipping
-ifndef ZIPTARGET
-ZIPTARGET=install
-endif
-
-# Note: This will not remove the zipfile first
-fpc_zipinstalladd:
-ifndef ZIPNAME
-	@$(ECHO) Please specify ZIPNAME!
-	@exit
-else
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(PACKAGEDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-# First remove the zip and then install
-fpc_zipinstall:
-ifndef ZIPNAME
-	@$(ECHO) Please specify ZIPNAME!
-	@exit
-else
-	$(DEL) $(PACKAGEDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_libsclean fpc_cleanall
-
-ifdef UNITOBJECTS
-override UNITCLEANFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
-endif
-ifdef EXTRACLEANUNITS
-override EXTRACLEANFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)))
-endif
-
-fpc_clean:
-ifdef EXEOBJECTS
-	-$(DEL) $(EXEFILES) $(EXEOFILES)
-endif
-ifdef LOADEROBJECTS
-	-$(DEL) $(LOADEROFILES)
-endif
-ifdef UNITCLEANFILES
-	-$(DEL) $(UNITCLEANFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(PPAS) link.res log
-
-fpc_libsclean: clean
-	-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-
-fpc_cleanall:
-ifdef EXEOBJECTS
-	-$(DEL) $(EXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-
-#####################################################################
-# Depend rules
-#####################################################################
-
-.PHONY: fpc_depend
-
-fpc_depend:
-	$(PPDEP) $(UNITOBJECTS)
-
 #####################################################################
 # Users rules
 #####################################################################

+ 1 - 2
fcl/Makefile.fpc

@@ -3,8 +3,7 @@
 #
 
 [sections]
-tools=0
-info=0
+none=1
 
 [rules]
 all:

+ 149 - 152
fcl/db/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-09 16:02
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -160,6 +156,151 @@ override NEEDGCCLIB=1
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -354,10 +495,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -399,150 +540,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 149 - 152
fcl/go32v2/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-09 16:00
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -170,6 +166,151 @@ endif
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -360,10 +501,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -405,150 +546,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 149 - 152
fcl/linux/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-09 16:00
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -170,6 +166,151 @@ endif
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -360,10 +501,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -405,150 +546,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 149 - 152
fcl/os2/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-09 16:01
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -170,6 +166,151 @@ endif
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -360,10 +501,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -405,150 +546,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 170 - 175
fcl/shedit/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-04 11:51
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	$(MAKE)
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -120,8 +116,9 @@ endif
 #####################################################################
 
 
+# Targets
+
 UNITOBJECTS=doc_text shedit sh_pas sh_xml
-EXEOBJECTS=
 ifeq ($(OS_TARGET),linux)
 EXEOBJECTS+=gtkdemo
 endif
@@ -129,8 +126,18 @@ ifeq ($(OS_TARGET),win32)
 EXEOBJECTS+=gtkdemo
 endif
 
+# Clean
+
+
+# Install
+
+
+# Defaults
+
 DEFAULTUNITS=1
 
+# Directories
+
 ifndef FPCDIR
 FPCDIR=../..
 endif
@@ -139,15 +146,164 @@ ifndef TARGETDIR
 TARGETDIR=.
 endif
 
+# Libraries
+
+
+# Info
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
 
 # Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(FPC_CPU)
+override FPCOPTDEF:=-d$(CPU_TARGET)
 
 # Load commandline OPT and add target and unit dir to be sure
 ifneq ($(OS_TARGET),$(OS_SOURCE))
@@ -331,10 +487,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -376,150 +532,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################
@@ -717,12 +729,12 @@ endif
 
 .PHONY: fpc_showinstallfiles fpc_install
 
-ifdef EXTRAINSTALLUNITS
-override EXTRAINSTALLFILES=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)))
-endif
 ifdef UNITOBJECTS
 override UNITINSTALLFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
 endif
+ifdef EXTRAINSTALLUNITS
+override EXTRAINSTALLFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)))
+endif
 
 fpc_showinstallfiles : all
 ifndef DEFAULTUNITS
@@ -840,7 +852,7 @@ ifdef UNITOBJECTS
 override UNITCLEANFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
 endif
 ifdef EXTRACLEANUNITS
-override EXTRACLEANFILES=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)))
+override EXTRACLEANFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)))
 endif
 
 fpc_clean:
@@ -897,23 +909,6 @@ fpc_infocfg:
 	@$(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)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(ECHO)
-	@$(ECHO)  == Unit info ==
-	@$(ECHO)
-	@$(ECHO)  UnitInstallFiles. $(UNITINSTALLFILES)
-	@$(ECHO)  UnitCleanFiles... $(UNITCLEANFILES)
-	@$(ECHO)
 
 fpc_infoinstall:
 	@$(ECHO)

+ 149 - 152
fcl/tests/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-09 16:01
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -155,6 +151,151 @@ endif
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -344,10 +485,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -389,150 +530,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 149 - 152
fcl/win32/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-09 16:01
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -170,6 +166,151 @@ endif
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -360,10 +501,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -405,150 +546,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 865 - 56
ide/Makefile

@@ -1,80 +1,903 @@
 #
-#   $Id$
-#   Copyright (c) 1998 by the Free Pascal Development Team
-#
-#   Makefile for Free Pascal Environment
-#
-#   See the file COPYING.FPC, included in this distribution,
-#   for details about the copyright.
-#
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:51
 #
 
+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
+ifdef inOS2
+export FPC=ppos2$(EXEEXT)
+else
+export FPC=ppc386$(EXEEXT)
+endif
+endif
+
+# Target OS
+ifndef OS_TARGET
+export OS_TARGET:=$(shell $(FPC) -iTO)
+endif
+
+# Source OS
+ifndef OS_SOURCE
+export OS_SOURCE:=$(shell $(FPC) -iSO)
+endif
+
+# Target CPU
+ifndef CPU_TARGET
+export CPU_TARGET:=$(shell $(FPC) -iTP)
+endif
+
+# Source CPU
+ifndef CPU_SOURCE
+export CPU_SOURCE:=$(shell $(FPC) -iSP)
+endif
+
+# FPC version
+ifndef FPC_VERSION
+export FPC_VERSION:=$(shell $(FPC) -iV)
+endif
+
+#####################################################################
+# Default Settings
 #####################################################################
+
+# Release ? Then force OPT and don't use extra opts via commandline
+ifdef RELEASE
+override OPT:=-Xs -OG2p3 -n
+endif
+
+# Verbose settings (warning,note,info)
+ifdef VERBOSE
+override OPT+=-vwni
+endif
+
+#####################################################################
+# User Settings
+#####################################################################
+
+
+# Targets
+
+
+# Clean
+
+
+# Install
+
+
 # Defaults
+
+
+# Directories
+
+
+# Libraries
+
+
+# Info
+
+FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
+
 #####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
 
-# Default place of the makefile.fpc
-DEFAULTFPCDIR=..
 
 #####################################################################
-# Common targets
+# Compiler Command Line
 #####################################################################
 
-.PHONY: all clean install info \
-        staticlib sharedlib libsclean \
-        staticinstall sharedinstall libinstall \
-        
-info: testfpcmake fpc_info
+# 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
+
+# Smartlinking
+ifeq ($(SMARTLINK),YES)
+override FPCOPT+=-Cx
+endif
+
+# Add commandline options
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+endif
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+endif
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+endif
+
+# Add defines from FPCOPTDEF to FPCOPT
+ifdef FPCOPTDEF
+override FPCOPT+=$(FPCOPTDEF)
+endif
+
+# Was a config file specified ?
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+
+override COMPILER=$(FPC) $(FPCOPT)
 
 #####################################################################
-# Include default makefile
+# Shell tools
 #####################################################################
 
-# test if FPCMAKE is still valid
-ifdef FPCMAKE
-ifeq ($(strip $(wildcard $(FPCMAKE))),)
-FPCDIR=
-FPCMAKE=
+# To copy pograms
+ifndef COPY
+export COPY:=cp -fp
 endif
+
+# To move pograms
+ifndef MOVE
+export MOVE:=mv -f
 endif
 
-ifndef FPCDIR
-ifdef DEFAULTFPCDIR
-FPCDIR=$(DEFAULTFPCDIR)
+# Check delete program
+ifndef DEL
+export DEL:=rm -f
 endif
+
+# Check deltree program
+ifndef DELTREE
+export DELTREE:=rm -rf
 endif
 
-ifndef FPCMAKE
-ifdef FPCDIR
-FPCMAKE=$(FPCDIR)/makefile.fpc
+# To install files
+ifndef INSTALL
+ifdef inlinux
+export INSTALL:=install -m 644
 else
-FPCMAKE=makefile.fpc
+export INSTALL:=$(COPY)
 endif
 endif
 
-override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
-ifeq ($(FPCMAKE),)
-testfpcmake:
-	@echo makefile.fpc not found!
-	@echo Check the FPCMAKE and FPCDIR environment variables.
-	@exit
+# To install programs
+ifndef INSTALLEXE
+ifdef inlinux
+export INSTALLEXE:=install -m 755
 else
-include $(FPCMAKE)
-testfpcmake:
+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
 
 #####################################################################
-# Dependencies
+# Default Tools
 #####################################################################
 
+# assembler, redefine it if cross compiling
+ifndef AS
+AS=as
+endif
+
+# linker, but probably not used
+ifndef LD
+LD=ld
+endif
+
+# Where is the ppumove program ?
+ifndef PPUMOVE
+PPUMOVE=ppumove
+endif
+
+# Where is the ppdep program ?
+ifndef PPDEP
+PPDEP=ppdep
+endif
+
+# ppas.bat / ppas.sh
 ifdef inlinux
-LIBDIR=/usr/lib/gcc-lib/i486-linux/2.7.2.3
+PPAS=ppas.sh
+else
+ifdef inOS2
+PPAS=ppas.cmd
+else
+PPAS=ppas.bat
+endif
 endif
 
+# also call ppas if with command option -s
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+EXECPPAS=@$(PPAS)
+endif
+
+# ldconfig to rebuild .so cache
+ifdef inlinux
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+
+# echo
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+export ECHO:=echo
+else
+export ECHO:=$(firstword $(ECHO))
+endif
+endif
+
+# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
+# upx uses that one itself (PFV)
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(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=
+
+# Go32v1
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+PACKAGESUFFIX=v1
+endif
+
+# Go32v2
+ifeq ($(OS_TARGET),go32v2)
+PACKAGESUFFIX=go32
+endif
+
+# Linux
+ifeq ($(OS_TARGET),linux)
+PACKAGESUFFIX=linux
+endif
+
+# Win32
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=win32
+endif
+
+# OS/2
+ifeq ($(OS_TARGET),os2)
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+SMARTEXT=.so
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=os2
+endif
+
+# library prefix
+LIBPREFIX=lib
+ifeq ($(OS_TARGET),go32v2)
+LIBPREFIX=
+endif
+ifeq ($(OS_TARGET),go32v1)
+LIBPREFIX=
+endif
+
+# determine which .pas extension is used
+ifndef PASEXT
+ifdef EXEOBJECTS
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
+else
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
+endif
+ifeq ($(TESTPAS),)
+PASEXT=.pp
+else
+PASEXT=.pas
+endif
+endif
+
+#####################################################################
+# Default rules
+#####################################################################
+
+.PHONY: defaultrule all staticlib sharedlib showinstall install \
+	staticinstall sharedinstall libinstall zipinstall zipinstalladd \
+	clean cleanall depend info
+
+staticlib: fpc_staticlib
+
+sharedlib: fpc_sharedlib
+
+showinstall: fpc_showinstall
+
+staticinstall: fpc_staticinstall
+
+sharedinstall: fpc_sharedinstall
+
+libinstall: fpc_libinstall
+
+zipinstalladd: fpc_zipinstalladd
+
+clean_all: fpc_clean_all
+
+depend: fpc_depend
+
+info: fpc_info
+
+#####################################################################
+# General compile rules
+#####################################################################
+
+.PHONY: fpc_all fpc_units fpc_exes fpc_loaders
+
+# Create Filenames
+LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
+EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
+EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
+UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
+UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
+UNITAFILES=$(addsuffix $(STATICLIBEXT),$(UNITOBJECTS))
+
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
+
+ifdef DEFAULTUNITS
+fpc_all: fpc_loaders fpc_units
+else
+fpc_all: fpc_loaders fpc_units fpc_exes
+endif
+
+fpc_loaders: $(LOADEROFILES)
+
+fpc_units: $(UNITPPUFILES)
+
+fpc_exes: $(EXEFILES)
+
+# General compile rules, available for both possible PASEXT
+%$(PPUEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(PPUEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(OEXT): %$(LOADEREXT)
+	$(AS) -o $*$(OEXT) $<
+
+#####################################################################
+# Library
+#####################################################################
+
+.PHONY: fpc_staticlib fpc_sharedlib
+
+# Default sharedlib units are all unit objects
+ifndef SHAREDLIBUNITOBJECTS
+SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
+endif
+
+fpc_staticlib:
+	$(MAKE) libsclean
+	$(MAKE) all SMARTLINK=YES
+
+fpc_sharedlib: all
+ifdef inlinux
+ifndef LIBNAME
+	@$(ECHO) LIBNAME not set
+else
+	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
+endif
+else
+	@$(ECHO) Shared Libraries not supported
+endif
+
+#####################################################################
+# Install rules
+#####################################################################
+
+.PHONY: fpc_showinstallfiles fpc_install
+
+ifdef UNITOBJECTS
+override UNITINSTALLFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRAINSTALLUNITS
+override EXTRAINSTALLFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)))
+endif
+
+fpc_showinstallfiles : all
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))
+endif
+endif
+ifdef LOADEROBJECTS
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
+endif
+ifdef UNITINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(UNITINSTALLFILES))
+endif
+ifdef EXTRAINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(EXTRAINSTALLFILES))
+endif
+
+fpc_install:
+# Create UnitInstallFiles
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	$(MKDIR) $(BININSTALLDIR)
+# Compress the exes if upx is defined
+ifdef UPXPROG
+	-$(UPXPROG) $(EXEFILES)
+endif
+	$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
+endif
+endif
+ifdef LOADEROBJECTS
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
+endif
+ifdef UNITINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(UNITINSTALLFILES) $(UNITINSTALLDIR)
+endif
+ifdef EXTRAINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(EXTRAINSTALLFILES) $(UNITINSTALLDIR)
+endif
+
+#####################################################################
+# Zip
+#####################################################################
+
+.PHONY: fpc_zipinstall fpc_zipinstalladd
+
+# Temporary path to pack a file
+ifndef PACKDIR
+ifndef inlinux
+PACKDIR=pack_tmp
+else
+PACKDIR=/tmp/fpc-pack
+endif
+endif
+
+# Test dir if none specified
+ifndef PACKAGEDIR
+PACKAGEDIR=$(BASEDIR)
+endif
+
+# Add .zip/.tar.gz extension
+ifdef ZIPNAME
+ifndef inlinux
+override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
+endif
+endif
+
+# Default target which is call before zipping
+ifndef ZIPTARGET
+ZIPTARGET=install
+endif
+
+# Note: This will not remove the zipfile first
+fpc_zipinstalladd:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz
+	cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
+	gzip $(PACKAGEDIR)/$(ZIPNAME).tar
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+# First remove the zip and then install
+fpc_zipinstall:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(DEL) $(PACKAGEDIR)/$(ZIPNAME)
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+#####################################################################
+# Clean rules
+#####################################################################
+
+.PHONY: fpc_clean fpc_libsclean fpc_cleanall
+
+ifdef UNITOBJECTS
+override UNITCLEANFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRACLEANUNITS
+override EXTRACLEANFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)))
+endif
+
+fpc_clean:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES) $(EXEOFILES)
+endif
+ifdef LOADEROBJECTS
+	-$(DEL) $(LOADEROFILES)
+endif
+ifdef UNITCLEANFILES
+	-$(DEL) $(UNITCLEANFILES)
+endif
+ifdef EXTRACLEANFILES
+	-$(DEL) $(EXTRACLEANFILES)
+endif
+	-$(DEL) $(PPAS) link.res log
+
+fpc_libsclean: clean
+	-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+
+fpc_cleanall:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES)
+endif
+	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+	-$(DELTREE) *$(SMARTEXT)
+
+#####################################################################
+# Depend rules
+#####################################################################
+
+.PHONY: fpc_depend
+
+fpc_depend:
+	$(PPDEP) $(UNITOBJECTS)
+
+#####################################################################
+# Info rules
+#####################################################################
+
+.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
+	fpc_dirinfo
+
+fpc_info: $(FPCINFO)
+
+fpc_infocfg:
+	@$(ECHO)
+	@$(ECHO)  == Configuration info ==
+	@$(ECHO)
+	@$(ECHO)  FPC....... $(FPC)
+	@$(ECHO)  Version... $(FPC_VERSION)
+	@$(ECHO)  CPU....... $(CPU_TARGET)
+	@$(ECHO)  Source.... $(OS_SOURCE)
+	@$(ECHO)  Target.... $(OS_TARGET)
+	@$(ECHO)
+
+
+fpc_infoinstall:
+	@$(ECHO)
+	@$(ECHO)  == Install info ==
+	@$(ECHO)
+ifdef DATE
+	@$(ECHO)  DateStr.............. $(DATESTR)
+endif
+	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
+	@$(ECHO)
+	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
+	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
+	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
+	@$(ECHO)  StaticUnitInstallDir. $(STATIC_UNITINSTALLDIR)
+	@$(ECHO)  SharedUnitInstallDir. $(SHARED_UNITINSTALLDIR)
+	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
+	@$(ECHO)  StaticLibInstallDir.. $(STATIC_LIBINSTALLDIR)
+	@$(ECHO)  SharedLibInstallDir.. $(SHARED_LIBINSTALLDIR)
+	@$(ECHO)  MsgInstallDir........ $(MSGINSTALLDIR)
+	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
+	@$(ECHO)
+
+#####################################################################
+# Users rules
+#####################################################################
+
+
+.PHONY: gdb full fullgdb clean_compiler
+
 all:
 	$(MAKE) -C text all
 
@@ -110,17 +933,3 @@ zipinstall:
 #
 clean_compiler:
 	make -C ../../compiler clean
-
-#
-# $Log$
-# Revision 1.1  1999-04-16 20:16:38  michael
-# + Adapted ide Makefiles
-#
-# Revision 1.14  1999/03/16 00:47:00  peter
-#   * makefile.fpc targets start with fpc_
-#   * small updates for install scripts
-#
-# Revision 1.13  1999/03/09 01:35:52  peter
-#   * makefile.fpc updates and defaultfpcdir var
-#
-#

+ 42 - 0
ide/Makefile.fpc

@@ -0,0 +1,42 @@
+#
+#   Makefile.fpc for FP IDE
+#
+
+[rules]
+.PHONY: gdb full fullgdb clean_compiler
+
+all:
+        $(MAKE) -C text all
+
+gdb:
+        $(MAKE) -C text all GDB=1
+
+full:
+        $(MAKE) -C text all FULL=1
+
+fullgdb:
+        $(MAKE) -C text all FULL=1 GDB=1
+
+# This is necessary because we don't have all units separate in the
+# units targets
+clean:
+        $(MAKE) -C fake clean
+        $(MAKE) -C text clean
+
+
+#
+# Installation
+#
+install:
+        $(MAKE) -C fake install
+        $(MAKE) -C fake install
+
+zipinstall:
+        $(MAKE) -C fake zipinstall
+        $(MAKE) -C fake zipinstall
+
+#
+# Misc
+#
+clean_compiler:
+        make -C ../../compiler clean

+ 861 - 62
ide/fake/Makefile

@@ -1,93 +1,906 @@
 #
-#   $Id$
-#   Copyright (c) 1998 by the Free Pascal Development Team
-#
-#   Makefile for Free Pascal Environment
-#
-#   See the file COPYING.FPC, included in this distribution,
-#   for details about the copyright.
-#
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:51
 #
 
+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
+ifdef inOS2
+export FPC=ppos2$(EXEEXT)
+else
+export FPC=ppc386$(EXEEXT)
+endif
+endif
+
+# Target OS
+ifndef OS_TARGET
+export OS_TARGET:=$(shell $(FPC) -iTO)
+endif
+
+# Source OS
+ifndef OS_SOURCE
+export OS_SOURCE:=$(shell $(FPC) -iSO)
+endif
+
+# Target CPU
+ifndef CPU_TARGET
+export CPU_TARGET:=$(shell $(FPC) -iTP)
+endif
+
+# Source CPU
+ifndef CPU_SOURCE
+export CPU_SOURCE:=$(shell $(FPC) -iSP)
+endif
+
+# FPC version
+ifndef FPC_VERSION
+export FPC_VERSION:=$(shell $(FPC) -iV)
+endif
+
+#####################################################################
+# Default Settings
 #####################################################################
+
+# Release ? Then force OPT and don't use extra opts via commandline
+ifdef RELEASE
+override OPT:=-Xs -OG2p3 -n
+endif
+
+# Verbose settings (warning,note,info)
+ifdef VERBOSE
+override OPT+=-vwni
+endif
+
+#####################################################################
+# User Settings
+#####################################################################
+
+
+# Targets
+
+
+# Clean
+
+
+# Install
+
+
 # Defaults
+
+
+# Directories
+
+
+# Libraries
+
+
+# Info
+
+FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
+
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
+#####################################################################
+# 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
+
+# Smartlinking
+ifeq ($(SMARTLINK),YES)
+override FPCOPT+=-Cx
+endif
+
+# Add commandline options
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+endif
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+endif
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+endif
+
+# Add defines from FPCOPTDEF to FPCOPT
+ifdef FPCOPTDEF
+override FPCOPT+=$(FPCOPTDEF)
+endif
+
+# Was a config file specified ?
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+
+override COMPILER=$(FPC) $(FPCOPT)
+
+#####################################################################
+# Shell tools
+#####################################################################
+
+# To copy pograms
+ifndef COPY
+export COPY:=cp -fp
+endif
+
+# To move pograms
+ifndef MOVE
+export MOVE:=mv -f
+endif
+
+# Check delete program
+ifndef DEL
+export DEL:=rm -f
+endif
+
+# Check deltree program
+ifndef DELTREE
+export DELTREE:=rm -rf
+endif
+
+# To install files
+ifndef INSTALL
+ifdef inlinux
+export INSTALL:=install -m 644
+else
+export INSTALL:=$(COPY)
+endif
+endif
+
+# To install programs
+ifndef INSTALLEXE
+ifdef inlinux
+export INSTALLEXE:=install -m 755
+else
+export INSTALLEXE:=$(COPY)
+endif
+endif
+
+# To make a directory.
+ifndef MKDIR
+ifdef inlinux
+export MKDIR:=install -m 755 -d
+else
+export MKDIR:=ginstall -m 755 -d
+endif
+endif
+
+#####################################################################
+# Default Tools
+#####################################################################
+
+# assembler, redefine it if cross compiling
+ifndef AS
+AS=as
+endif
+
+# linker, but probably not used
+ifndef LD
+LD=ld
+endif
+
+# Where is the ppumove program ?
+ifndef PPUMOVE
+PPUMOVE=ppumove
+endif
+
+# Where is the ppdep program ?
+ifndef PPDEP
+PPDEP=ppdep
+endif
+
+# ppas.bat / ppas.sh
+ifdef inlinux
+PPAS=ppas.sh
+else
+ifdef inOS2
+PPAS=ppas.cmd
+else
+PPAS=ppas.bat
+endif
+endif
+
+# also call ppas if with command option -s
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+EXECPPAS=@$(PPAS)
+endif
+
+# ldconfig to rebuild .so cache
+ifdef inlinux
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+
+# echo
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+export ECHO:=echo
+else
+export ECHO:=$(firstword $(ECHO))
+endif
+endif
+
+# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
+# upx uses that one itself (PFV)
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(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=
+
+# Go32v1
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+PACKAGESUFFIX=v1
+endif
+
+# Go32v2
+ifeq ($(OS_TARGET),go32v2)
+PACKAGESUFFIX=go32
+endif
+
+# Linux
+ifeq ($(OS_TARGET),linux)
+PACKAGESUFFIX=linux
+endif
+
+# Win32
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=win32
+endif
+
+# OS/2
+ifeq ($(OS_TARGET),os2)
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+SMARTEXT=.so
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=os2
+endif
+
+# library prefix
+LIBPREFIX=lib
+ifeq ($(OS_TARGET),go32v2)
+LIBPREFIX=
+endif
+ifeq ($(OS_TARGET),go32v1)
+LIBPREFIX=
+endif
+
+# determine which .pas extension is used
+ifndef PASEXT
+ifdef EXEOBJECTS
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
+else
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
+endif
+ifeq ($(TESTPAS),)
+PASEXT=.pp
+else
+PASEXT=.pas
+endif
+endif
+
+#####################################################################
+# Default rules
+#####################################################################
+
+.PHONY: defaultrule all staticlib sharedlib showinstall install \
+	staticinstall sharedinstall libinstall zipinstall zipinstalladd \
+	clean cleanall depend info
+
+staticlib: fpc_staticlib
+
+sharedlib: fpc_sharedlib
+
+showinstall: fpc_showinstall
+
+staticinstall: fpc_staticinstall
+
+sharedinstall: fpc_sharedinstall
+
+libinstall: fpc_libinstall
+
+zipinstall: fpc_zipinstall
+
+zipinstalladd: fpc_zipinstalladd
+
+clean_all: fpc_clean_all
+
+depend: fpc_depend
+
+info: fpc_info
+
+#####################################################################
+# General compile rules
 #####################################################################
 
-# Default place of the makefile.fpc
-DEFAULTFPCDIR=../..
+.PHONY: fpc_all fpc_units fpc_exes fpc_loaders
+
+# Create Filenames
+LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
+EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
+EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
+UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
+UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
+UNITAFILES=$(addsuffix $(STATICLIBEXT),$(UNITOBJECTS))
+
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
+
+ifdef DEFAULTUNITS
+fpc_all: fpc_loaders fpc_units
+else
+fpc_all: fpc_loaders fpc_units fpc_exes
+endif
+
+fpc_loaders: $(LOADEROFILES)
+
+fpc_units: $(UNITPPUFILES)
+
+fpc_exes: $(EXEFILES)
+
+# General compile rules, available for both possible PASEXT
+%$(PPUEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(PPUEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(OEXT): %$(LOADEREXT)
+	$(AS) -o $*$(OEXT) $<
 
 #####################################################################
-# Common targets
+# Library
 #####################################################################
 
-.PHONY: all clean install info \
-        staticlib sharedlib libsclean \
-        staticinstall sharedinstall libinstall \
-        
-info: testfpcmake fpc_info
+.PHONY: fpc_staticlib fpc_sharedlib
 
-staticlib: testfpcmake fpc_staticlib
+# Default sharedlib units are all unit objects
+ifndef SHAREDLIBUNITOBJECTS
+SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
+endif
 
-sharedlib: testfpcmake fpc_sharedlib
+fpc_staticlib:
+	$(MAKE) libsclean
+	$(MAKE) all SMARTLINK=YES
 
-libsclean: testfpcmake fpc_libsclean
+fpc_sharedlib: all
+ifdef inlinux
+ifndef LIBNAME
+	@$(ECHO) LIBNAME not set
+else
+	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
+endif
+else
+	@$(ECHO) Shared Libraries not supported
+endif
 
-staticinstall: testfpcmake fpc_staticinstall
+#####################################################################
+# Install rules
+#####################################################################
 
-sharedinstall: testfpcmake fpc_sharedinstall
+.PHONY: fpc_showinstallfiles fpc_install
 
-libinstall: testfpcmake fpc_libinstall
+ifdef UNITOBJECTS
+override UNITINSTALLFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRAINSTALLUNITS
+override EXTRAINSTALLFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)))
+endif
 
+fpc_showinstallfiles : all
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))
+endif
+endif
+ifdef LOADEROBJECTS
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
+endif
+ifdef UNITINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(UNITINSTALLFILES))
+endif
+ifdef EXTRAINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(EXTRAINSTALLFILES))
+endif
+
+fpc_install:
+# Create UnitInstallFiles
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	$(MKDIR) $(BININSTALLDIR)
+# Compress the exes if upx is defined
+ifdef UPXPROG
+	-$(UPXPROG) $(EXEFILES)
+endif
+	$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
+endif
+endif
+ifdef LOADEROBJECTS
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
+endif
+ifdef UNITINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(UNITINSTALLFILES) $(UNITINSTALLDIR)
+endif
+ifdef EXTRAINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(EXTRAINSTALLFILES) $(UNITINSTALLDIR)
+endif
 
 #####################################################################
-# Include default makefile
+# Zip
 #####################################################################
 
-# test if FPCMAKE is still valid
-ifdef FPCMAKE
-ifeq ($(strip $(wildcard $(FPCMAKE))),)
-FPCDIR=
-FPCMAKE=
+.PHONY: fpc_zipinstall fpc_zipinstalladd
+
+# Temporary path to pack a file
+ifndef PACKDIR
+ifndef inlinux
+PACKDIR=pack_tmp
+else
+PACKDIR=/tmp/fpc-pack
+endif
 endif
+
+# Test dir if none specified
+ifndef PACKAGEDIR
+PACKAGEDIR=$(BASEDIR)
 endif
 
-ifndef FPCDIR
-ifdef DEFAULTFPCDIR
-FPCDIR=$(DEFAULTFPCDIR)
+# Add .zip/.tar.gz extension
+ifdef ZIPNAME
+ifndef inlinux
+override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
 endif
 endif
 
-ifndef FPCMAKE
-ifdef FPCDIR
-FPCMAKE=$(FPCDIR)/makefile.fpc
+# Default target which is call before zipping
+ifndef ZIPTARGET
+ZIPTARGET=install
+endif
+
+# Note: This will not remove the zipfile first
+fpc_zipinstalladd:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
 else
-FPCMAKE=makefile.fpc
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz
+	cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
+	gzip $(PACKAGEDIR)/$(ZIPNAME).tar
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
 endif
+	$(DELTREE) $(PACKDIR)
 endif
 
-override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
-ifeq ($(FPCMAKE),)
-testfpcmake:
-	@echo makefile.fpc not found!
-	@echo Check the FPCMAKE and FPCDIR environment variables.
+# First remove the zip and then install
+fpc_zipinstall:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
 	@exit
 else
-include $(FPCMAKE)
+	$(DEL) $(PACKAGEDIR)/$(ZIPNAME)
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+#####################################################################
+# Clean rules
+#####################################################################
+
+.PHONY: fpc_clean fpc_libsclean fpc_cleanall
 
-testfpcmake:
+ifdef UNITOBJECTS
+override UNITCLEANFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRACLEANUNITS
+override EXTRACLEANFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)))
 endif
 
+fpc_clean:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES) $(EXEOFILES)
+endif
+ifdef LOADEROBJECTS
+	-$(DEL) $(LOADEROFILES)
+endif
+ifdef UNITCLEANFILES
+	-$(DEL) $(UNITCLEANFILES)
+endif
+ifdef EXTRACLEANFILES
+	-$(DEL) $(EXTRACLEANFILES)
+endif
+	-$(DEL) $(PPAS) link.res log
+
+fpc_libsclean: clean
+	-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+
+fpc_cleanall:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES)
+endif
+	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+	-$(DELTREE) *$(SMARTEXT)
 
 #####################################################################
-# Dependencies
+# Depend rules
 #####################################################################
 
-all: 
+.PHONY: fpc_depend
+
+fpc_depend:
+	$(PPDEP) $(UNITOBJECTS)
+
+#####################################################################
+# Info rules
+#####################################################################
+
+.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
+	fpc_dirinfo
+
+fpc_info: $(FPCINFO)
+
+fpc_infocfg:
+	@$(ECHO)
+	@$(ECHO)  == Configuration info ==
+	@$(ECHO)
+	@$(ECHO)  FPC....... $(FPC)
+	@$(ECHO)  Version... $(FPC_VERSION)
+	@$(ECHO)  CPU....... $(CPU_TARGET)
+	@$(ECHO)  Source.... $(OS_SOURCE)
+	@$(ECHO)  Target.... $(OS_TARGET)
+	@$(ECHO)
+
+
+fpc_infoinstall:
+	@$(ECHO)
+	@$(ECHO)  == Install info ==
+	@$(ECHO)
+ifdef DATE
+	@$(ECHO)  DateStr.............. $(DATESTR)
+endif
+	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
+	@$(ECHO)
+	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
+	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
+	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
+	@$(ECHO)  StaticUnitInstallDir. $(STATIC_UNITINSTALLDIR)
+	@$(ECHO)  SharedUnitInstallDir. $(SHARED_UNITINSTALLDIR)
+	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
+	@$(ECHO)  StaticLibInstallDir.. $(STATIC_LIBINSTALLDIR)
+	@$(ECHO)  SharedLibInstallDir.. $(SHARED_LIBINSTALLDIR)
+	@$(ECHO)  MsgInstallDir........ $(MSGINSTALLDIR)
+	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
+	@$(ECHO)
+
+#####################################################################
+# Users rules
+#####################################################################
+
+
+all:
 	$(MAKE) -C compiler all
-	$(MAKE) -C gdb all 
+	$(MAKE) -C gdb all
 
 clean :
 	$(MAKE) -C compiler clean
@@ -96,17 +909,3 @@ clean :
 install:
 	$(MAKE) -C compiler install
 	$(MAKE) -C gdb install
-
-#
-# $Log$
-# Revision 1.1  1999-04-16 20:16:38  michael
-# + Adapted ide Makefiles
-#
-# Revision 1.14  1999/03/16 00:47:00  peter
-#   * makefile.fpc targets start with fpc_
-#   * small updates for install scripts
-#
-# Revision 1.13  1999/03/09 01:35:52  peter
-#   * makefile.fpc updates and defaultfpcdir var
-#
-#

+ 16 - 0
ide/fake/Makefile.fpc

@@ -0,0 +1,16 @@
+#
+#   Makefile.fpc for Fake compiler/gdb
+#
+
+[rules]
+all:
+        $(MAKE) -C compiler all
+        $(MAKE) -C gdb all
+
+clean :
+        $(MAKE) -C compiler clean
+        $(MAKE) -C gdb clean
+
+install:
+        $(MAKE) -C compiler install
+        $(MAKE) -C gdb install

+ 845 - 78
ide/fake/compiler/Makefile

@@ -1,135 +1,902 @@
 #
-#   $Id$
-#   Copyright (c) 1999 by the Free Pascal Development Team
-#
-#   Makefile for <template> for Free Pascal
-#
-#   See the file COPYING.FPC, included in this distribution,
-#   for details about the copyright.
-#
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:51
 #
 
+defaultrule: all
 
 #####################################################################
-# Defaults
+# Autodetect OS (Linux or Dos or Windows NT)
+# define inlinux when running under linux
+# define inWinNT when running under WinNT
 #####################################################################
 
-# Where are the include files located
-INC=
-PROCINC=
-OSINC=
+# 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
 
-# Needed options, without it won't compile
-NEEDOPT=
+# Detect NT - NT sets OS to Windows_NT
+ifndef inlinux
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+endif
+endif
 
-# Needed unit dir, which is searched as the first path
-NEEDUNITDIR=
+# 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
 
-# Where need we to place the executables/ppu/objects
-TARGETDIR=
-UNITTARGETDIR=
+# The path which is search separated by spaces
+ifdef inlinux
+SEARCHPATH=$(subst :, ,$(PATH))
+else
+SEARCHPATH=$(subst ;, ,$(PATH))
+endif
 
-# As default make only the units
-#DEFAULTUNITS=1
+#####################################################################
+# FPC version/target Detection
+#####################################################################
 
+# What compiler to use ?
+ifndef FPC
+ifdef inOS2
+export FPC=ppos2$(EXEEXT)
+else
+export FPC=ppc386$(EXEEXT)
+endif
+endif
+
+# Target OS
+ifndef OS_TARGET
+export OS_TARGET:=$(shell $(FPC) -iTO)
+endif
+
+# Source OS
+ifndef OS_SOURCE
+export OS_SOURCE:=$(shell $(FPC) -iSO)
+endif
+
+# Target CPU
+ifndef CPU_TARGET
+export CPU_TARGET:=$(shell $(FPC) -iTP)
+endif
+
+# Source CPU
+ifndef CPU_SOURCE
+export CPU_SOURCE:=$(shell $(FPC) -iSP)
+endif
+
+# FPC version
+ifndef FPC_VERSION
+export FPC_VERSION:=$(shell $(FPC) -iV)
+endif
+
+#####################################################################
+# Default Settings
+#####################################################################
+
+# Release ? Then force OPT and don't use extra opts via commandline
+ifdef RELEASE
+override OPT:=-Xs -OG2p3 -n
+endif
+
+# Verbose settings (warning,note,info)
+ifdef VERBOSE
+override OPT+=-vwni
+endif
 
 #####################################################################
-# Real targets
+# User Settings
 #####################################################################
 
+
+# Targets
+
 UNITOBJECTS=browcol compiler systems version comphook globtype tokens
-EXEOBJECTS=
 
+# Clean
+
+
+# Install
+
+
+# Defaults
+
+
+# Directories
+
+
+# Libraries
+
+
+# Info
+
+FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
+
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
+#####################################################################
+# 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
+
+# Smartlinking
+ifeq ($(SMARTLINK),YES)
+override FPCOPT+=-Cx
+endif
+
+# Add commandline options
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+endif
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+endif
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+endif
+
+# Add defines from FPCOPTDEF to FPCOPT
+ifdef FPCOPTDEF
+override FPCOPT+=$(FPCOPTDEF)
+endif
+
+# Was a config file specified ?
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+
+override COMPILER=$(FPC) $(FPCOPT)
+
+#####################################################################
+# Shell tools
+#####################################################################
+
+# To copy pograms
+ifndef COPY
+export COPY:=cp -fp
+endif
+
+# To move pograms
+ifndef MOVE
+export MOVE:=mv -f
+endif
+
+# Check delete program
+ifndef DEL
+export DEL:=rm -f
+endif
+
+# Check deltree program
+ifndef DELTREE
+export DELTREE:=rm -rf
+endif
+
+# To install files
+ifndef INSTALL
+ifdef inlinux
+export INSTALL:=install -m 644
+else
+export INSTALL:=$(COPY)
+endif
+endif
+
+# To install programs
+ifndef INSTALLEXE
+ifdef inlinux
+export INSTALLEXE:=install -m 755
+else
+export INSTALLEXE:=$(COPY)
+endif
+endif
+
+# To make a directory.
+ifndef MKDIR
+ifdef inlinux
+export MKDIR:=install -m 755 -d
+else
+export MKDIR:=ginstall -m 755 -d
+endif
+endif
 
 #####################################################################
-# Common targets
+# Default Tools
 #####################################################################
 
-.PHONY: all clean install info \
-        staticlib sharedlib libsclean \
-        staticinstall sharedinstall libinstall \
-        
-all: testfpcmake fpc_all
+# assembler, redefine it if cross compiling
+ifndef AS
+AS=as
+endif
 
-clean: testfpcmake fpc_clean
+# linker, but probably not used
+ifndef LD
+LD=ld
+endif
 
-info: testfpcmake fpc_info
+# Where is the ppumove program ?
+ifndef PPUMOVE
+PPUMOVE=ppumove
+endif
 
-staticlib: testfpcmake fpc_staticlib
+# Where is the ppdep program ?
+ifndef PPDEP
+PPDEP=ppdep
+endif
 
-sharedlib: testfpcmake fpc_sharedlib
+# ppas.bat / ppas.sh
+ifdef inlinux
+PPAS=ppas.sh
+else
+ifdef inOS2
+PPAS=ppas.cmd
+else
+PPAS=ppas.bat
+endif
+endif
 
-libsclean: testfpcmake fpc_libsclean
+# also call ppas if with command option -s
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+EXECPPAS=@$(PPAS)
+endif
 
-# Empty targets. Nothing to install
-install:
+# ldconfig to rebuild .so cache
+ifdef inlinux
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
 
-staticinstall:
+# echo
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+export ECHO:=echo
+else
+export ECHO:=$(firstword $(ECHO))
+endif
+endif
 
-sharedinstall:
+# 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
 
-libinstall:
+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
 
 #####################################################################
-# Include default makefile
+# Default extensions
 #####################################################################
 
-# test if FPCMAKE is still valid
-ifdef FPCMAKE
-ifeq ($(strip $(wildcard $(FPCMAKE))),)
-FPCDIR=
-FPCMAKE=
+# Default needed extensions (Go32v2,Linux)
+LOADEREXT=.as
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+PACKAGESUFFIX=
+
+# Go32v1
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+PACKAGESUFFIX=v1
 endif
+
+# Go32v2
+ifeq ($(OS_TARGET),go32v2)
+PACKAGESUFFIX=go32
 endif
 
-ifndef FPCDIR
-ifdef DEFAULTFPCDIR
-FPCDIR=$(DEFAULTFPCDIR)
+# Linux
+ifeq ($(OS_TARGET),linux)
+PACKAGESUFFIX=linux
+endif
+
+# Win32
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=win32
+endif
+
+# OS/2
+ifeq ($(OS_TARGET),os2)
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+SMARTEXT=.so
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=os2
+endif
+
+# library prefix
+LIBPREFIX=lib
+ifeq ($(OS_TARGET),go32v2)
+LIBPREFIX=
+endif
+ifeq ($(OS_TARGET),go32v1)
+LIBPREFIX=
+endif
+
+# determine which .pas extension is used
+ifndef PASEXT
+ifdef EXEOBJECTS
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
+else
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
+endif
+ifeq ($(TESTPAS),)
+PASEXT=.pp
 else
-FPCDIR=../../..
+PASEXT=.pas
 endif
 endif
 
-ifndef FPCMAKE
-ifdef FPCDIR
-FPCMAKE=$(FPCDIR)/makefile.fpc
+#####################################################################
+# Default rules
+#####################################################################
+
+.PHONY: defaultrule all staticlib sharedlib showinstall install \
+	staticinstall sharedinstall libinstall zipinstall zipinstalladd \
+	clean cleanall depend info
+
+all: fpc_all
+
+staticlib: fpc_staticlib
+
+sharedlib: fpc_sharedlib
+
+showinstall: fpc_showinstall
+
+install: fpc_install
+
+staticinstall: fpc_staticinstall
+
+sharedinstall: fpc_sharedinstall
+
+libinstall: fpc_libinstall
+
+zipinstall: fpc_zipinstall
+
+zipinstalladd: fpc_zipinstalladd
+
+clean: fpc_clean
+
+clean_all: fpc_clean_all
+
+depend: fpc_depend
+
+info: fpc_info
+
+#####################################################################
+# General compile rules
+#####################################################################
+
+.PHONY: fpc_all fpc_units fpc_exes fpc_loaders
+
+# Create Filenames
+LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
+EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
+EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
+UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
+UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
+UNITAFILES=$(addsuffix $(STATICLIBEXT),$(UNITOBJECTS))
+
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
+
+ifdef DEFAULTUNITS
+fpc_all: fpc_loaders fpc_units
 else
-FPCMAKE=makefile.fpc
+fpc_all: fpc_loaders fpc_units fpc_exes
 endif
+
+fpc_loaders: $(LOADEROFILES)
+
+fpc_units: $(UNITPPUFILES)
+
+fpc_exes: $(EXEFILES)
+
+# General compile rules, available for both possible PASEXT
+%$(PPUEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(PPUEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(OEXT): %$(LOADEREXT)
+	$(AS) -o $*$(OEXT) $<
+
+#####################################################################
+# Library
+#####################################################################
+
+.PHONY: fpc_staticlib fpc_sharedlib
+
+# Default sharedlib units are all unit objects
+ifndef SHAREDLIBUNITOBJECTS
+SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
+endif
+
+fpc_staticlib:
+	$(MAKE) libsclean
+	$(MAKE) all SMARTLINK=YES
+
+fpc_sharedlib: all
+ifdef inlinux
+ifndef LIBNAME
+	@$(ECHO) LIBNAME not set
+else
+	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
+endif
+else
+	@$(ECHO) Shared Libraries not supported
+endif
+
+#####################################################################
+# Install rules
+#####################################################################
+
+.PHONY: fpc_showinstallfiles fpc_install
+
+ifdef UNITOBJECTS
+override UNITINSTALLFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRAINSTALLUNITS
+override EXTRAINSTALLFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)))
+endif
+
+fpc_showinstallfiles : all
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))
+endif
+endif
+ifdef LOADEROBJECTS
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
+endif
+ifdef UNITINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(UNITINSTALLFILES))
+endif
+ifdef EXTRAINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(EXTRAINSTALLFILES))
+endif
+
+fpc_install:
+# Create UnitInstallFiles
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	$(MKDIR) $(BININSTALLDIR)
+# Compress the exes if upx is defined
+ifdef UPXPROG
+	-$(UPXPROG) $(EXEFILES)
+endif
+	$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
+endif
+endif
+ifdef LOADEROBJECTS
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
+endif
+ifdef UNITINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(UNITINSTALLFILES) $(UNITINSTALLDIR)
+endif
+ifdef EXTRAINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(EXTRAINSTALLFILES) $(UNITINSTALLDIR)
+endif
+
+#####################################################################
+# Zip
+#####################################################################
+
+.PHONY: fpc_zipinstall fpc_zipinstalladd
+
+# Temporary path to pack a file
+ifndef PACKDIR
+ifndef inlinux
+PACKDIR=pack_tmp
+else
+PACKDIR=/tmp/fpc-pack
+endif
+endif
+
+# Test dir if none specified
+ifndef PACKAGEDIR
+PACKAGEDIR=$(BASEDIR)
+endif
+
+# Add .zip/.tar.gz extension
+ifdef ZIPNAME
+ifndef inlinux
+override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
+endif
+endif
+
+# Default target which is call before zipping
+ifndef ZIPTARGET
+ZIPTARGET=install
+endif
+
+# Note: This will not remove the zipfile first
+fpc_zipinstalladd:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz
+	cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
+	gzip $(PACKAGEDIR)/$(ZIPNAME).tar
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
 endif
 
-override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
-ifeq ($(FPCMAKE),)
-testfpcmake:
-	@echo makefile.fpc not found!
-	@echo Check the FPCMAKE and FPCDIR environment variables.
+# First remove the zip and then install
+fpc_zipinstall:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
 	@exit
 else
-include $(FPCMAKE)
-testfpcmake:
+	$(DEL) $(PACKAGEDIR)/$(ZIPNAME)
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+#####################################################################
+# Clean rules
+#####################################################################
+
+.PHONY: fpc_clean fpc_libsclean fpc_cleanall
+
+ifdef UNITOBJECTS
+override UNITCLEANFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRACLEANUNITS
+override EXTRACLEANFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)))
+endif
+
+fpc_clean:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES) $(EXEOFILES)
 endif
+ifdef LOADEROBJECTS
+	-$(DEL) $(LOADEROFILES)
+endif
+ifdef UNITCLEANFILES
+	-$(DEL) $(UNITCLEANFILES)
+endif
+ifdef EXTRACLEANFILES
+	-$(DEL) $(EXTRACLEANFILES)
+endif
+	-$(DEL) $(PPAS) link.res log
 
+fpc_libsclean: clean
+	-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
 
+fpc_cleanall:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES)
+endif
+	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+	-$(DELTREE) *$(SMARTEXT)
 
 #####################################################################
-# Dependencies
+# Depend rules
 #####################################################################
 
-install:
+.PHONY: fpc_depend
+
+fpc_depend:
+	$(PPDEP) $(UNITOBJECTS)
+
+#####################################################################
+# Info rules
+#####################################################################
+
+.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
+	fpc_dirinfo
+
+fpc_info: $(FPCINFO)
+
+fpc_infocfg:
+	@$(ECHO)
+	@$(ECHO)  == Configuration info ==
+	@$(ECHO)
+	@$(ECHO)  FPC....... $(FPC)
+	@$(ECHO)  Version... $(FPC_VERSION)
+	@$(ECHO)  CPU....... $(CPU_TARGET)
+	@$(ECHO)  Source.... $(OS_SOURCE)
+	@$(ECHO)  Target.... $(OS_TARGET)
+	@$(ECHO)
+
+
+fpc_infoinstall:
+	@$(ECHO)
+	@$(ECHO)  == Install info ==
+	@$(ECHO)
+ifdef DATE
+	@$(ECHO)  DateStr.............. $(DATESTR)
+endif
+	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
+	@$(ECHO)
+	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
+	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
+	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
+	@$(ECHO)  StaticUnitInstallDir. $(STATIC_UNITINSTALLDIR)
+	@$(ECHO)  SharedUnitInstallDir. $(SHARED_UNITINSTALLDIR)
+	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
+	@$(ECHO)  StaticLibInstallDir.. $(STATIC_LIBINSTALLDIR)
+	@$(ECHO)  SharedLibInstallDir.. $(SHARED_LIBINSTALLDIR)
+	@$(ECHO)  MsgInstallDir........ $(MSGINSTALLDIR)
+	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
+	@$(ECHO)
 
-#
-# $Log$
-# Revision 1.2  1999-04-21 09:50:43  michael
-# . Added default dir ../../..
-#
-# Revision 1.1  1999/04/16 20:16:38  michael
-# + Adapted ide Makefiles
-#
-# Revision 1.1  1999/03/16 00:50:29  peter
-#   + init
-#
-#

+ 6 - 0
ide/fake/compiler/Makefile.fpc

@@ -0,0 +1,6 @@
+#
+#   Makefile.fpc for Fake GDB
+#
+
+[targets]
+units=browcol compiler systems version comphook globtype tokens

+ 853 - 78
ide/fake/gdb/Makefile

@@ -1,135 +1,910 @@
 #
-#   $Id$
-#   Copyright (c) 1999 by the Free Pascal Development Team
-#
-#   Makefile for <template> for Free Pascal
-#
-#   See the file COPYING.FPC, included in this distribution,
-#   for details about the copyright.
-#
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:51
 #
 
+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
+ifdef inOS2
+export FPC=ppos2$(EXEEXT)
+else
+export FPC=ppc386$(EXEEXT)
+endif
+endif
+
+# Target OS
+ifndef OS_TARGET
+export OS_TARGET:=$(shell $(FPC) -iTO)
+endif
+
+# Source OS
+ifndef OS_SOURCE
+export OS_SOURCE:=$(shell $(FPC) -iSO)
+endif
+
+# Target CPU
+ifndef CPU_TARGET
+export CPU_TARGET:=$(shell $(FPC) -iTP)
+endif
+
+# Source CPU
+ifndef CPU_SOURCE
+export CPU_SOURCE:=$(shell $(FPC) -iSP)
+endif
+
+# FPC version
+ifndef FPC_VERSION
+export FPC_VERSION:=$(shell $(FPC) -iV)
+endif
 
 #####################################################################
+# Default Settings
+#####################################################################
+
+# Release ? Then force OPT and don't use extra opts via commandline
+ifdef RELEASE
+override OPT:=-Xs -OG2p3 -n
+endif
+
+# Verbose settings (warning,note,info)
+ifdef VERBOSE
+override OPT+=-vwni
+endif
+
+#####################################################################
+# User Settings
+#####################################################################
+
+
+# Targets
+
+UNITOBJECTS=gdbcon gdbint
+
+# Clean
+
+
+# Install
+
+
 # Defaults
+
+
+# Directories
+
+
+# Libraries
+
+
+# Info
+
+FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
+
+#####################################################################
+# Default Directories
 #####################################################################
 
-# Where are the include files located
-INC=
-PROCINC=
-OSINC=
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
 
-# Needed options, without it won't compile
-NEEDOPT=
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
 
-# Needed unit dir, which is searched as the first path
-NEEDUNITDIR=
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
 
-# Where need we to place the executables/ppu/objects
-TARGETDIR=
-UNITTARGETDIR=
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
 
-# As default make only the units
-#DEFAULTUNITS=1
+# 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
 
 #####################################################################
-# Real targets
+# Install Directories based on BASEINSTALLDIR
 #####################################################################
 
-UNITOBJECTS=gdbcon  gdbint
-EXEOBJECTS=
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
 
 
 #####################################################################
-# Common targets
+# Compiler Command Line
 #####################################################################
 
-.PHONY: all clean install info \
-        staticlib sharedlib libsclean \
-        staticinstall sharedinstall libinstall \
-        
-all: testfpcmake fpc_all
+# Load commandline OPTDEF and add FPC_CPU define
+override FPCOPTDEF:=-d$(CPU_TARGET)
 
-clean: testfpcmake fpc_clean
+# Load commandline OPT and add target and unit dir to be sure
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
 
-info: testfpcmake fpc_info
 
-staticlib: testfpcmake fpc_staticlib
+ifdef NEEDOPT
+override FPCOPT+=$(NEEDOPT)
+endif
 
-sharedlib: testfpcmake fpc_sharedlib
+# Smartlinking
+ifeq ($(SMARTLINK),YES)
+override FPCOPT+=-Cx
+endif
 
-libsclean: testfpcmake fpc_libsclean
+# Add commandline options
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+endif
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+endif
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+endif
+
+# Add defines from FPCOPTDEF to FPCOPT
+ifdef FPCOPTDEF
+override FPCOPT+=$(FPCOPTDEF)
+endif
+
+# Was a config file specified ?
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+
+override COMPILER=$(FPC) $(FPCOPT)
+
+#####################################################################
+# Shell tools
+#####################################################################
+
+# To copy pograms
+ifndef COPY
+export COPY:=cp -fp
+endif
+
+# To move pograms
+ifndef MOVE
+export MOVE:=mv -f
+endif
 
-# Empty targets. Nothing to install
-install:
+# Check delete program
+ifndef DEL
+export DEL:=rm -f
+endif
 
-staticinstall:
+# Check deltree program
+ifndef DELTREE
+export DELTREE:=rm -rf
+endif
 
-sharedinstall:
+# To install files
+ifndef INSTALL
+ifdef inlinux
+export INSTALL:=install -m 644
+else
+export INSTALL:=$(COPY)
+endif
+endif
 
-libinstall:
+# 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
 
 #####################################################################
-# Include default makefile
+# Default Tools
 #####################################################################
 
-# test if FPCMAKE is still valid
-ifdef FPCMAKE
-ifeq ($(strip $(wildcard $(FPCMAKE))),)
-FPCDIR=
-FPCMAKE=
+# assembler, redefine it if cross compiling
+ifndef AS
+AS=as
+endif
+
+# linker, but probably not used
+ifndef LD
+LD=ld
+endif
+
+# Where is the ppumove program ?
+ifndef PPUMOVE
+PPUMOVE=ppumove
+endif
+
+# Where is the ppdep program ?
+ifndef PPDEP
+PPDEP=ppdep
+endif
+
+# ppas.bat / ppas.sh
+ifdef inlinux
+PPAS=ppas.sh
+else
+ifdef inOS2
+PPAS=ppas.cmd
+else
+PPAS=ppas.bat
 endif
 endif
 
-ifndef FPCDIR
-ifdef DEFAULTFPCDIR
-FPCDIR=$(DEFAULTFPCDIR)
+# also call ppas if with command option -s
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
 else
-FPCDIR=../../..
+EXECPPAS=@$(PPAS)
 endif
+
+# ldconfig to rebuild .so cache
+ifdef inlinux
+LDCONFIG=ldconfig
+else
+LDCONFIG=
 endif
 
-ifndef FPCMAKE
-ifdef FPCDIR
-FPCMAKE=$(FPCDIR)/makefile.fpc
+# echo
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+export ECHO:=echo
 else
-FPCMAKE=makefile.fpc
+export ECHO:=$(firstword $(ECHO))
 endif
 endif
 
-override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
-ifeq ($(FPCMAKE),)
-testfpcmake:
-	@echo makefile.fpc not found!
-	@echo Check the FPCMAKE and FPCDIR environment variables.
+# 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=
+
+# Go32v1
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+PACKAGESUFFIX=v1
+endif
+
+# Go32v2
+ifeq ($(OS_TARGET),go32v2)
+PACKAGESUFFIX=go32
+endif
+
+# Linux
+ifeq ($(OS_TARGET),linux)
+PACKAGESUFFIX=linux
+endif
+
+# Win32
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=win32
+endif
+
+# OS/2
+ifeq ($(OS_TARGET),os2)
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+SMARTEXT=.so
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=os2
+endif
+
+# library prefix
+LIBPREFIX=lib
+ifeq ($(OS_TARGET),go32v2)
+LIBPREFIX=
+endif
+ifeq ($(OS_TARGET),go32v1)
+LIBPREFIX=
+endif
+
+# determine which .pas extension is used
+ifndef PASEXT
+ifdef EXEOBJECTS
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
+else
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
+endif
+ifeq ($(TESTPAS),)
+PASEXT=.pp
+else
+PASEXT=.pas
+endif
+endif
+
+#####################################################################
+# Default rules
+#####################################################################
+
+.PHONY: defaultrule all staticlib sharedlib showinstall install \
+	staticinstall sharedinstall libinstall zipinstall zipinstalladd \
+	clean cleanall depend info
+
+all: fpc_all
+
+staticlib: fpc_staticlib
+
+sharedlib: fpc_sharedlib
+
+showinstall: fpc_showinstall
+
+install: fpc_install
+
+staticinstall: fpc_staticinstall
+
+sharedinstall: fpc_sharedinstall
+
+libinstall: fpc_libinstall
+
+zipinstall: fpc_zipinstall
+
+zipinstalladd: fpc_zipinstalladd
+
+clean: fpc_clean
+
+clean_all: fpc_clean_all
+
+depend: fpc_depend
+
+info: fpc_info
+
+#####################################################################
+# General compile rules
+#####################################################################
+
+.PHONY: fpc_all fpc_units fpc_exes fpc_loaders
+
+# Create Filenames
+LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
+EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
+EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
+UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
+UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
+UNITAFILES=$(addsuffix $(STATICLIBEXT),$(UNITOBJECTS))
+
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
+
+ifdef DEFAULTUNITS
+fpc_all: fpc_loaders fpc_units
+else
+fpc_all: fpc_loaders fpc_units fpc_exes
+endif
+
+fpc_loaders: $(LOADEROFILES)
+
+fpc_units: $(UNITPPUFILES)
+
+fpc_exes: $(EXEFILES)
+
+# General compile rules, available for both possible PASEXT
+%$(PPUEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(PPUEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(OEXT): %$(LOADEREXT)
+	$(AS) -o $*$(OEXT) $<
+
+#####################################################################
+# Library
+#####################################################################
+
+.PHONY: fpc_staticlib fpc_sharedlib
+
+# Default sharedlib units are all unit objects
+ifndef SHAREDLIBUNITOBJECTS
+SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
+endif
+
+fpc_staticlib:
+	$(MAKE) libsclean
+	$(MAKE) all SMARTLINK=YES
+
+fpc_sharedlib: all
+ifdef inlinux
+ifndef LIBNAME
+	@$(ECHO) LIBNAME not set
+else
+	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
+endif
+else
+	@$(ECHO) Shared Libraries not supported
+endif
+
+#####################################################################
+# Install rules
+#####################################################################
+
+.PHONY: fpc_showinstallfiles fpc_install
+
+ifdef UNITOBJECTS
+override UNITINSTALLFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRAINSTALLUNITS
+override EXTRAINSTALLFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)))
+endif
+
+fpc_showinstallfiles : all
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))
+endif
+endif
+ifdef LOADEROBJECTS
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
+endif
+ifdef UNITINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(UNITINSTALLFILES))
+endif
+ifdef EXTRAINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(EXTRAINSTALLFILES))
+endif
+
+fpc_install:
+# Create UnitInstallFiles
+ifndef DEFAULTUNITS
+ifdef EXEOBJECTS
+	$(MKDIR) $(BININSTALLDIR)
+# Compress the exes if upx is defined
+ifdef UPXPROG
+	-$(UPXPROG) $(EXEFILES)
+endif
+	$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
+endif
+endif
+ifdef LOADEROBJECTS
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
+endif
+ifdef UNITINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(UNITINSTALLFILES) $(UNITINSTALLDIR)
+endif
+ifdef EXTRAINSTALLFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(EXTRAINSTALLFILES) $(UNITINSTALLDIR)
+endif
+
+#####################################################################
+# Zip
+#####################################################################
+
+.PHONY: fpc_zipinstall fpc_zipinstalladd
+
+# Temporary path to pack a file
+ifndef PACKDIR
+ifndef inlinux
+PACKDIR=pack_tmp
+else
+PACKDIR=/tmp/fpc-pack
+endif
+endif
+
+# Test dir if none specified
+ifndef PACKAGEDIR
+PACKAGEDIR=$(BASEDIR)
+endif
+
+# Add .zip/.tar.gz extension
+ifdef ZIPNAME
+ifndef inlinux
+override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
+endif
+endif
+
+# Default target which is call before zipping
+ifndef ZIPTARGET
+ZIPTARGET=install
+endif
+
+# Note: This will not remove the zipfile first
+fpc_zipinstalladd:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz
+	cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
+	gzip $(PACKAGEDIR)/$(ZIPNAME).tar
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+# First remove the zip and then install
+fpc_zipinstall:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
 	@exit
 else
-include $(FPCMAKE)
-testfpcmake:
+	$(DEL) $(PACKAGEDIR)/$(ZIPNAME)
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+#####################################################################
+# Clean rules
+#####################################################################
+
+.PHONY: fpc_clean fpc_libsclean fpc_cleanall
+
+ifdef UNITOBJECTS
+override UNITCLEANFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+endif
+ifdef EXTRACLEANUNITS
+override EXTRACLEANFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)))
+endif
+
+fpc_clean:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES) $(EXEOFILES)
 endif
+ifdef LOADEROBJECTS
+	-$(DEL) $(LOADEROFILES)
+endif
+ifdef UNITCLEANFILES
+	-$(DEL) $(UNITCLEANFILES)
+endif
+ifdef EXTRACLEANFILES
+	-$(DEL) $(EXTRACLEANFILES)
+endif
+	-$(DEL) $(PPAS) link.res log
 
+fpc_libsclean: clean
+	-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
 
+fpc_cleanall:
+ifdef EXEOBJECTS
+	-$(DEL) $(EXEFILES)
+endif
+	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+	-$(DELTREE) *$(SMARTEXT)
 
 #####################################################################
-# Dependencies
+# Depend rules
 #####################################################################
 
-install:
+.PHONY: fpc_depend
 
-#
-# $Log$
-# Revision 1.2  1999-04-21 09:51:17  michael
-# . Added default dir ../../..
-#
-# Revision 1.1  1999/04/16 20:16:38  michael
-# + Adapted ide Makefiles
-#
-# Revision 1.1  1999/03/16 00:50:29  peter
-#   + init
-#
-#
+fpc_depend:
+	$(PPDEP) $(UNITOBJECTS)
+
+#####################################################################
+# Info rules
+#####################################################################
+
+.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
+	fpc_dirinfo
+
+fpc_info: $(FPCINFO)
+
+fpc_infocfg:
+	@$(ECHO)
+	@$(ECHO)  == Configuration info ==
+	@$(ECHO)
+	@$(ECHO)  FPC....... $(FPC)
+	@$(ECHO)  Version... $(FPC_VERSION)
+	@$(ECHO)  CPU....... $(CPU_TARGET)
+	@$(ECHO)  Source.... $(OS_SOURCE)
+	@$(ECHO)  Target.... $(OS_TARGET)
+	@$(ECHO)
+
+
+fpc_infoinstall:
+	@$(ECHO)
+	@$(ECHO)  == Install info ==
+	@$(ECHO)
+ifdef DATE
+	@$(ECHO)  DateStr.............. $(DATESTR)
+endif
+	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
+	@$(ECHO)
+	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
+	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
+	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
+	@$(ECHO)  StaticUnitInstallDir. $(STATIC_UNITINSTALLDIR)
+	@$(ECHO)  SharedUnitInstallDir. $(SHARED_UNITINSTALLDIR)
+	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
+	@$(ECHO)  StaticLibInstallDir.. $(STATIC_LIBINSTALLDIR)
+	@$(ECHO)  SharedLibInstallDir.. $(SHARED_LIBINSTALLDIR)
+	@$(ECHO)  MsgInstallDir........ $(MSGINSTALLDIR)
+	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
+	@$(ECHO)
+
+#####################################################################
+# Users rules
+#####################################################################
+
+
+gdbint$(PPUEXT): gdbint$(PASEXT)
+
+gdbcon$(PPUEXT): gdbcon$(PASEXT) gdbint$(PPUEXT)

+ 11 - 0
ide/fake/gdb/Makefile.fpc

@@ -0,0 +1,11 @@
+#
+#   Makefile.fpc for Fake GDB
+#
+
+[targets]
+units=gdbcon gdbint
+
+[rules]
+gdbint$(PPUEXT): gdbint$(PASEXT)
+
+gdbcon$(PPUEXT): gdbcon$(PASEXT) gdbint$(PPUEXT)

Разлика између датотеке није приказан због своје велике величине
+ 897 - 64
ide/text/Makefile


+ 74 - 0
ide/text/Makefile.fpc

@@ -0,0 +1,74 @@
+#
+#   Makefile.fpc for FP IDE
+#
+
+[targets]
+programs=fp
+
+[dirs]
+fpcdir=../..
+unitdir=../../fv ../../api $(COMPUNITDIR) $(GDBUNITDIR)
+objdir=$(GDBOBJDIR)
+libdir=$(GDBLIBDIR)
+
+[libs]
+libgcc=1
+
+
+[presettings]
+# when making a full version include the compiler
+ifeq ($(FULL),1)
+override COMPUNITDIR+=../../compiler
+override COMPUNITOPT+=-dBrowserCol -dGDB -Sg
+else
+override COMPUNITDIR+=../fake/compiler
+endif
+
+# when including debugger include the gdbinterface
+ifndef GDBINT
+GDBINT=gdbint
+endif
+
+ifeq ($(GDB),1)
+override GDBUNITDIR+=../../$(GDBINT)
+GDBLIBDIR+=../../$(GDBINT)/libgdb/$(OS_TARGET)
+GDBOBJDIR+=../../$(GDBINT)/libgdb/$(OS_TARGET)
+ifeq ($(OS_TARGET),go32v2)
+ifneq ($(DJDIR),)
+GDBLIBDIR+=$(DJDIR)/lib
+endif
+endif
+else
+override GDBUNITDIR+=../fake/gdb
+endif
+
+
+[rules]
+.PHONY: gdb full fullgdb clean_compiler
+
+fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
+
+gdb:
+        $(MAKE) all GDB=1
+
+full:
+        $(MAKE) all FULL=1
+
+fullgdb:
+        $(MAKE) all FULL=1 GDB=1
+
+# This is necessary because we don't have all units separate in the
+# units targets
+clean : testfpcmake fpc_cleanall
+
+#
+# Installation
+#
+install: fpc_install
+        $(INSTALL) $(wildcard *.pt) $(wildcard *.tdf) readme.txt $(BININSTALLDIR)
+
+#
+# Misc
+#
+clean_compiler:
+        $(MAKE) -C ../../compiler clean

+ 149 - 152
install/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-10 00:26
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile help
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: help
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -163,6 +159,151 @@ endif
 # Libraries
 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -343,10 +484,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -388,150 +529,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 149 - 152
install/demo/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-10 00:31
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -159,6 +155,151 @@ endif
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -348,10 +489,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -393,150 +534,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 149 - 152
install/fpinst/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-10 00:36
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -165,6 +161,151 @@ endif
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -354,10 +495,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -399,150 +540,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 2 - 522
rtl/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-10 00:46
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:52
 #
 
-defaultrule: Makefile native
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: native
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -195,282 +191,6 @@ export REDIR REDIRFILE ERRORFILE
 # Libraries
 
 
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-
-ifdef NEEDOPT
-override FPCOPT+=$(NEEDOPT)
-endif
-
-# Smartlinking
-ifeq ($(SMARTLINK),YES)
-override FPCOPT+=-Cx
-endif
-
-# Add commandline options
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-override COMPILER=$(FPC) $(FPCOPT)
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-PACKAGESUFFIX=
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-PACKAGESUFFIX=v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-PACKAGESUFFIX=linux
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=win32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-PACKAGESUFFIX=os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
 #####################################################################
 # Default rules
 #####################################################################
@@ -503,246 +223,6 @@ depend: fpc_depend
 
 info: fpc_info
 
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_all fpc_units fpc_exes fpc_loaders
-
-# Create Filenames
-LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
-EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
-UNITAFILES=$(addsuffix $(STATICLIBEXT),$(UNITOBJECTS))
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-ifdef DEFAULTUNITS
-fpc_all: fpc_loaders fpc_units
-else
-fpc_all: fpc_loaders fpc_units fpc_exes
-endif
-
-fpc_loaders: $(LOADEROFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-fpc_exes: $(EXEFILES)
-
-# General compile rules, available for both possible PASEXT
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPASS)
-
-%$(OEXT): %$(LOADEREXT)
-	$(AS) -o $*$(OEXT) $<
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_staticlib fpc_sharedlib
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
-endif
-
-fpc_staticlib:
-	$(MAKE) libsclean
-	$(MAKE) all SMARTLINK=YES
-
-fpc_sharedlib: all
-ifdef inlinux
-ifndef LIBNAME
-	@$(ECHO) LIBNAME not set
-else
-	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
-endif
-else
-	@$(ECHO) Shared Libraries not supported
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstallfiles fpc_install
-
-ifdef UNITOBJECTS
-override UNITINSTALLFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
-endif
-ifdef EXTRAINSTALLUNITS
-override EXTRAINSTALLFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)))
-endif
-
-fpc_showinstallfiles : all
-ifndef DEFAULTUNITS
-ifdef EXEOBJECTS
-	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))
-endif
-endif
-ifdef LOADEROBJECTS
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
-endif
-ifdef UNITINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(UNITINSTALLFILES))
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install:
-# Create UnitInstallFiles
-ifndef DEFAULTUNITS
-ifdef EXEOBJECTS
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(EXEFILES)
-endif
-	$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
-endif
-endif
-ifdef LOADEROBJECTS
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
-endif
-ifdef UNITINSTALLFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(UNITINSTALLFILES) $(UNITINSTALLDIR)
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(UNITINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall fpc_zipinstalladd
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inlinux
-PACKDIR=pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Test dir if none specified
-ifndef PACKAGEDIR
-PACKAGEDIR=$(BASEDIR)
-endif
-
-# Add .zip/.tar.gz extension
-ifdef ZIPNAME
-ifndef inlinux
-override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
-endif
-endif
-
-# Default target which is call before zipping
-ifndef ZIPTARGET
-ZIPTARGET=install
-endif
-
-# Note: This will not remove the zipfile first
-fpc_zipinstalladd:
-ifndef ZIPNAME
-	@$(ECHO) Please specify ZIPNAME!
-	@exit
-else
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz
-	cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
-	gzip $(PACKAGEDIR)/$(ZIPNAME).tar
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-# First remove the zip and then install
-fpc_zipinstall:
-ifndef ZIPNAME
-	@$(ECHO) Please specify ZIPNAME!
-	@exit
-else
-	$(DEL) $(PACKAGEDIR)/$(ZIPNAME)
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef inlinux
-	cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
-else
-	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_libsclean fpc_cleanall
-
-ifdef UNITOBJECTS
-override UNITCLEANFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
-endif
-ifdef EXTRACLEANUNITS
-override EXTRACLEANFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)))
-endif
-
-fpc_clean:
-ifdef EXEOBJECTS
-	-$(DEL) $(EXEFILES) $(EXEOFILES)
-endif
-ifdef LOADEROBJECTS
-	-$(DEL) $(LOADEROFILES)
-endif
-ifdef UNITCLEANFILES
-	-$(DEL) $(UNITCLEANFILES)
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-	-$(DEL) $(PPAS) link.res log
-
-fpc_libsclean: clean
-	-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-
-fpc_cleanall:
-ifdef EXEOBJECTS
-	-$(DEL) $(EXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-
-#####################################################################
-# Depend rules
-#####################################################################
-
-.PHONY: fpc_depend
-
-fpc_depend:
-	$(PPDEP) $(UNITOBJECTS)
-
 #####################################################################
 # Users rules
 #####################################################################

+ 1 - 2
rtl/Makefile.fpc

@@ -6,8 +6,7 @@
 defaultrule=native
 
 [sections]
-tools=0
-info=0
+none=1
 
 
 [presettings]

Разлика између датотеке није приказан због своје велике величине
+ 907 - 89
rtl/go32v1/Makefile


+ 135 - 0
rtl/go32v1/Makefile.fpc

@@ -0,0 +1,135 @@
+#
+#   Makefile.fpc for Go32v1 RTL
+#
+
+[targets]
+loaders=prt0
+units=$(SYSTEMUNIT) objpas strings \
+      go32 \
+      dos crt objects printer \
+      sysutils math typinfo \
+      cpu mmx getopts heaptrc \
+      msmouse
+
+
+[defaults]
+defaultunits=1
+defaulttarget=go32v1
+defaultcpu=i386
+
+
+[dirs]
+fpcdir=.
+incdir=$(INC) $(PROCINC)
+targetdir=.
+
+
+[presettings]
+RTL=..
+INC=../inc
+PROCINC=../$(CPU_TARGET)
+
+UNITPREFIX=rtl
+
+# Paths
+OBJPASDIR=$(RTL)/objpas
+GRAPHDIR=$(INC)/graph
+
+# Define Go32v2 Units
+SYSTEMUNIT=system
+
+
+[postsettings]
+SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
+
+# Get the system independent include file names.
+# This will set the following variables :
+# SYSINCNAMES
+include $(INC)/makefile.inc
+SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
+
+# Get the processor dependent include file names.
+# This will set the following variables :
+# CPUINCNAMES
+include $(PROCINC)/makefile.cpu
+SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
+
+# Put system unit dependencies together.
+SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
+
+
+[rules]
+vpath %$(PASEXT) $(INC) $(PROCINC)
+
+#
+# Loaders
+#
+
+prt0$(OEXT) : prt0.as
+        $(AS) -o prt0$(OEXT) prt0.as
+
+#
+# Base Units (System, strings, os-dependent-base-unit)
+#
+
+$(SYSTEMPPU) : system.pp $(SYSDEPS)
+        $(COMPILER) -Us -Sg system.pp $(REDIR)
+
+objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMPPU)
+        $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
+
+strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
+                   $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
+                   $(SYSTEMPPU)
+
+#
+# System Dependent Units
+#
+
+go32$(PPUEXT) : go32.pp objpas$(PPUEXT) $(SYSTEMPPU)
+
+#
+# TP7 Compatible RTL Units
+#
+
+dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
+               go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
+
+crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
+
+objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
+
+printer$(PPUEXT) : printer.pp $(SYSTEMPPU)
+
+#
+# Delphi Compatible Units
+#
+
+sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
+                    filutil.inc disk.inc objpas$(PPUEXT) dos$(PPUEXT) go32$(PPUEXT)
+        $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/sysutils.pp $(REDIR)
+
+typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
+        $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
+
+math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
+        $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
+
+#
+# Other system-independent RTL Units
+#
+
+cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
+
+mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
+
+getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
+
+heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
+        $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
+
+#
+# Other system-dependent RTL Units
+#
+
+msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)

+ 149 - 152
rtl/go32v2/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-08 15:25
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:53
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	$(MAKE)
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -193,6 +189,151 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 # Put system unit dependencies together.
 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -383,10 +524,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -428,150 +569,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 152 - 155
rtl/linux/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-10 14:06
+# Makefile generated by fpcmake v0.99.13 on 1999-11-11 00:03
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -142,10 +138,8 @@ GRAPHDIR=$(INC)/graph
 # Define Go32v2 Units
 SYSTEMUNIT=syslinux
 
-# Use new graph unit ? 
-# NEWGRAPH=YES
+#
 # Use LibGGI ?
-# Use 
 #
 ifndef USELIBGGI
 USELIBGGI=NO
@@ -178,6 +172,8 @@ endif
 
 # Libraries
 
+LIBNAME=fprtl
+SHAREDLIBOBJECTUNITS=$(SYSTEMUNIT) objpas strings linux ports dos crt objects printer sysutils typinfo math cpu mmx getopts heaptrc errors sockets gpm ipc
 
 # Info
 
@@ -202,6 +198,151 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 # Put system unit dependencies together.
 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -392,10 +533,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -437,150 +578,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 149 - 152
rtl/os2/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-08 19:32
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:53
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -193,6 +189,151 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 # Put system unit dependencies together.
 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -383,10 +524,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -428,150 +569,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 149 - 152
rtl/win32/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-08 15:25
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:53
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	$(MAKE)
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -198,6 +194,151 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
 # Put system unit dependencies together.
 SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -388,10 +529,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -433,150 +574,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 149 - 152
utils/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-09 16:25
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:53
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -151,6 +147,151 @@ endif
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -340,10 +481,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -385,150 +526,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 71 - 72
utils/fpcmake.ini

@@ -4,10 +4,6 @@
 ; Templates used by fpcmake to create a Makefile from Makefile.fpc
 ;
 
-[makefilerule]
-Makefile: Makefile.fpc
-        fpcmake
-	
 [osdetect]
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -131,6 +127,71 @@ endif
 #####################################################################
 
 
+[dir_default]
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+
+[dir_rtl]
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+
+[dir_units]
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+
+[dir_gcclib]
+# 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
+
+
+[dir_otherlib]
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+
 [command_begin]
 #####################################################################
 # Compiler Command Line
@@ -397,10 +458,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -445,71 +506,6 @@ ZIPEXT=.zip
 endif
 
 
-[dir_default]
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-
-[dir_rtl]
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-
-[dir_units]
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-
-[dir_gcclib]
-# 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
-
-
-[dir_otherlib]
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-
 [dir_install]
 #####################################################################
 # Install Directories based on BASEINSTALLDIR
@@ -1118,7 +1114,10 @@ endif
 
 ;
 ; $Log$
-; Revision 1.4  1999-11-08 22:47:04  peter
+; Revision 1.5  1999-11-10 22:10:48  peter
+;   * fpcmake updated
+;
+; Revision 1.4  1999/11/08 22:47:04  peter
 ;   * remove MAKE call in makefile target
 ;
 ; Revision 1.3  1999/11/08 15:01:39  peter

+ 94 - 35
utils/fpcmake.pp

@@ -67,6 +67,8 @@ type
     DirTarget,
     DirUnitTarget,
     DirInc         : string;
+    LibName,
+    LibUnits       : string;
     LibGCC,
     LibOther       : boolean;
     InfoCfg,
@@ -75,6 +77,16 @@ type
     InfoInstall,
     InfoObjects,
     InfoFiles      : boolean;
+    SectionNone,
+    SectionCompile,
+    SectionDepend,
+    SectionInstall,
+    SectionZipInstall,
+    SectionClean,
+    SectionLibs,
+    SectionCommand,
+    SectionExts,
+    SectionDirs,
     SectionTools,
     SectionInfo    : boolean;
     ToolsSed,
@@ -167,6 +179,8 @@ begin
      DirUnitTarget:=ReadString(sec_dirs,'unittargetdir','');
      DirInc:=ReadString(sec_dirs,'incdir','');
    { libs }
+     LibName:=ReadString(sec_libs,'libname','');
+     LibUnits:=ReadString(sec_libs,'libunits','');
      LibGcc:=ReadBool(sec_libs,'libgcc',false);
      LibOther:=ReadBool(sec_libs,'libother',false);
    { tools }
@@ -177,8 +191,32 @@ begin
      ToolsDate:=ReadBool(sec_tools,'tooldate',true);
      ToolsZip:=ReadBool(sec_tools,'toolzip',true);
    { sections }
+     SectionInstall:=ReadBool(sec_sections,'install',true);
+     SectionZipInstall:=ReadBool(sec_sections,'zipinstall',true);
+     SectionClean:=ReadBool(sec_sections,'clean',true);
      SectionInfo:=ReadBool(sec_sections,'info',true);
      SectionTools:=ReadBool(sec_sections,'tools',true);
+     SectionLibs:=ReadBool(sec_sections,'libs',true);
+     SectionExts:=ReadBool(sec_sections,'exts',true);
+     SectionDirs:=ReadBool(sec_sections,'dirs',true);
+     SectionCompile:=ReadBool(sec_sections,'compile',true);
+     SectionDepend:=ReadBool(sec_sections,'depend',true);
+     SectionCommand:=ReadBool(sec_sections,'command',true);
+     SectionNone:=ReadBool(sec_sections,'none',false);
+     if SectionNone then
+      begin
+        SectionInstall:=false;
+        SectionZipInstall:=false;
+        SectionClean:=false;
+        SectionInfo:=false;
+        SectionTools:=false;
+        SectionLibs:=false;
+        SectionExts:=false;
+        SectionDirs:=false;
+        SectionCompile:=false;
+        SectionDepend:=false;
+        SectionCommand:=false;
+      end;
    { info }
      InfoCfg:=ReadBool(sec_info,'infoconfig',true);
      InfoDirs:=ReadBool(sec_info,'infodirs',false);
@@ -350,12 +388,11 @@ begin
    begin
    { write header & autodetection }
      Add('#');
-     Add('# Makefile generated from Makefile.fpc on '+FormatDateTime(TimeFormat,Now));
+     Add('# Makefile generated by '+title+' on '+FormatDateTime(TimeFormat,Now));
      Add('#');
      Add('');
-     Add('defaultrule: Makefile '+userini.defaultrule);
+     Add('defaultrule: '+userini.defaultrule);
      Add('');
-     AddSection(true,'makefilerule');
      AddSection(true,'osdetect');
 
    { set the forced target os/cpu }
@@ -438,6 +475,10 @@ begin
 
    { Libs }
      AddHead('Libraries');
+     if userini.libname<>'' then
+      Add('LIBNAME='+userini.libname);
+     if userini.libunits<>'' then
+      Add('SHAREDLIBOBJECTUNITS='+userini.libunits);
      if userini.libgcc then
       Add('override NEEDGCCLIB=1');
      if userini.libother then
@@ -470,23 +511,39 @@ begin
         AddStrings(userini.PostSettings);
       end;
 
-   { commandline }
      Add('');
-     AddSection(true,'command_begin');
-     AddSection(true,'command_rtl');
-     AddSection(true,'command_needopt');
-     AddSection((userini.dirfpc<>''),'command_fpcdir');
-     AddSection((userini.dirunit<>''),'command_needunit');
-     AddSection((userini.dirlib<>''),'command_needlib');
-     AddSection((userini.dirobj<>''),'command_needobj');
-     AddSection((userini.dirinc<>''),'command_needinc');
-     AddSection(userini.libgcc,'command_gcclib');
-     AddSection(userini.libother,'command_otherlib');
-     AddSection((userini.dirinc<>''),'command_inc');
-     AddSection((userini.dirtarget<>''),'command_target');
-     AddSection((userini.dirunittarget<>''),'command_unittarget');
-     AddSection(true,'command_smartlink');
-     AddSection(true,'command_end');
+
+   { write dirs }
+     if userini.sectiondirs then
+      begin
+        AddSection(true,'dir_default');
+        AddSection(true,'dir_rtl');
+        AddSection(true,'dir_units');
+        AddSection(true,'dir_gcclib');
+        AddSection(true,'dir_otherlib');
+        AddSection(true,'dir_install');
+      end;
+
+   { commandline }
+     if userini.sectioncommand then
+      begin
+        Add('');
+        AddSection(true,'command_begin');
+        AddSection(true,'command_rtl');
+        AddSection(true,'command_needopt');
+        AddSection((userini.dirfpc<>''),'command_fpcdir');
+        AddSection((userini.dirunit<>''),'command_needunit');
+        AddSection((userini.dirlib<>''),'command_needlib');
+        AddSection((userini.dirobj<>''),'command_needobj');
+        AddSection((userini.dirinc<>''),'command_needinc');
+        AddSection(userini.libgcc,'command_gcclib');
+        AddSection(userini.libother,'command_otherlib');
+        AddSection((userini.dirinc<>''),'command_inc');
+        AddSection((userini.dirtarget<>''),'command_target');
+        AddSection((userini.dirunittarget<>''),'command_unittarget');
+        AddSection(true,'command_smartlink');
+        AddSection(true,'command_end');
+      end;
 
    { write tools }
      if userini.sectiontools then
@@ -501,16 +558,9 @@ begin
         AddSection(userini.toolsdiff,'tool_diff');
       end;
 
-   { write dirs }
-     AddSection(true,'dir_default');
-     AddSection(true,'dir_rtl');
-     AddSection(true,'dir_units');
-     AddSection(true,'dir_gcclib');
-     AddSection(true,'dir_otherlib');
-     AddSection(true,'dir_install');
-
    { extensions }
-     AddSection(true,'extensions');
+     if userini.sectionexts then
+      AddSection(true,'extensions');
 
    { add default rules }
      AddSection(true,'defaultrules');
@@ -530,12 +580,18 @@ begin
      AddRule('info');
 
    { default fpc_ rules }
-     AddSection(true,'compilerules');
-     AddSection(true,'libraryrules');
-     AddSection(true,'installrules');
-     AddSection(true,'zipinstallrules');
-     AddSection(true,'cleanrules');
-     AddSection(true,'dependrules');
+     if userini.SectionCompile then
+      AddSection(true,'compilerules');
+     if userini.SectionLibs then
+      AddSection(true,'libraryrules');
+     if userini.SectionInstall then
+      AddSection(true,'installrules');
+     if userini.SectionZipInstall then
+      AddSection(true,'zipinstallrules');
+     if userini.SectionClean then
+      AddSection(true,'cleanrules');
+     if userini.SectionDepend then
+      AddSection(true,'dependrules');
      if userini.SectionInfo then
       begin
         AddSection(true,'inforules');
@@ -583,7 +639,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.5  1999-11-09 14:38:32  peter
+  Revision 1.6  1999-11-10 22:10:49  peter
+    * fpcmake updated
+
+  Revision 1.5  1999/11/09 14:38:32  peter
     * sections section to leave out whole info/tools
 
   Revision 1.4  1999/11/08 15:01:39  peter

+ 149 - 152
utils/h2pas/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-08 15:25
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:53
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	$(MAKE)
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -148,6 +144,151 @@ endif
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -328,10 +469,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -373,150 +514,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

+ 149 - 152
utils/simulator/Makefile

@@ -1,12 +1,8 @@
 #
-# Makefile generated from Makefile.fpc on 1999-11-09 16:29
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:53
 #
 
-defaultrule: Makefile all
-
-Makefile: Makefile.fpc
-	fpcmake
-	
+defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
@@ -147,6 +143,151 @@ endif
 
 FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
 
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# set the directory to the rtl base
+ifndef RTLDIR
+ifdef RTL
+RTLDIR:=$(RTL)/$(OS_TARGET)
+else
+RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
+endif
+endif
+
+# specify where units are.
+ifndef UNITDIR
+ifdef UNITS
+UNITDIR=$(UNITS)/$(OS_TARGET)
+else
+UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
+UNITDIR=
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories based on BASEINSTALLDIR
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+
+# Linux binary really goes to baseinstalldir
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(BASEINSTALLDIR)
+else
+LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# Where the .msg files will be stored
+ifndef MSGINSTALLDIR
+MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+endif
+
+# Where the .msg files will be stored
+ifndef SOURCEINSTALLDIR
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+########################
+# Unit Directories
+########################
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# set the directory where to install the units.
+ifndef STATIC_UNITINSTALLDIR
+STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
+endif
+
+# set the directory where to install the units.
+ifndef SHARED_UNITINSTALLDIR
+SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef STATIC_LIBINSTALLDIR
+STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
+endif
+
+# set the directory where to install the libs (must exist)
+ifndef SHARED_LIBINSTALLDIR
+ifdef inlinux
+SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
+endif
+endif
+
+
 #####################################################################
 # Compiler Command Line
 #####################################################################
@@ -327,10 +468,10 @@ UPXPROG:=1
 endif
 ifdef UPXPROG
 UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPX),)
+ifeq ($(UPXPROG),)
 UPXPROG=
 else
-export UPXPROG:=$(firstword $(UPX))
+export UPXPROG:=$(firstword $(UPXPROG))
 endif
 else
 UPXPROG=
@@ -372,150 +513,6 @@ ifndef ZIPEXT
 ZIPEXT=.zip
 endif
 
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-export PREFIXINSTALLDIR=/usr
-else
-export PREFIXINSTALLDIR=/pp
-endif
-endif
-
-# set the directory to the rtl base
-ifndef RTLDIR
-ifdef RTL
-RTLDIR:=$(RTL)/$(OS_TARGET)
-else
-RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
-endif
-endif
-
-# specify where units are.
-ifndef UNITDIR
-ifdef UNITS
-UNITDIR=$(UNITS)/$(OS_TARGET)
-else
-UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-endif
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
-#####################################################################
-# Install Directories based on BASEINSTALLDIR
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-
-# Linux binary really goes to baseinstalldir
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(BASEINSTALLDIR)
-else
-LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
-endif
-
-# Where the .msg files will be stored
-ifndef SOURCEINSTALLDIR
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-endif
-
-# set the directory where to install the units.
-ifndef STATIC_UNITINSTALLDIR
-STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
-endif
-
-# set the directory where to install the units.
-ifndef SHARED_UNITINSTALLDIR
-SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef STATIC_LIBINSTALLDIR
-STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
-endif
-
-# set the directory where to install the libs (must exist)
-ifndef SHARED_LIBINSTALLDIR
-ifdef inlinux
-SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
-endif
-endif
-
 #####################################################################
 # Default extensions
 #####################################################################

Неке датотеке нису приказане због велике количине промена