#
# Makefile generated by fpcmake v1.00 [2000/10/27]
#

defaultrule: all

#####################################################################
# Autodetect OS (Linux or Dos or Windows NT)
# define inUnix when running under Unix (Linux,FreeBSD)
# 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
inUnix=1
endif
else
PWD:=$(firstword $(PWD))
endif

# Detect NT - NT sets OS to Windows_NT
# Detect OS/2 - OS/2 has OS2_SHELL defined
ifndef inUnix
ifeq ($(OS),Windows_NT)
inWinNT=1
else
ifdef OS2_SHELL
inOS2=1
endif
endif
endif

# The extension of executables
ifdef inUnix
SRCEXEEXT=
else
SRCEXEEXT=.exe
endif

# The path which is searched separated by spaces
ifdef inUnix
SEARCHPATH=$(subst :, ,$(PATH))
else
SEARCHPATH=$(subst ;, ,$(PATH))
endif

# Base dir
ifdef PWD
BASEDIR:=$(shell $(PWD))
else
BASEDIR=.
endif

#####################################################################
# FPC version/target Detection
#####################################################################

# What compiler to use ?
ifndef FPC
# Compatibility with old makefiles
ifdef PP
FPC=$(PP)
else
FPC=ppc386
endif
endif
override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)

# Target OS
ifndef OS_TARGET
OS_TARGET:=$(shell $(FPC) -iTO)
endif

# Source OS
ifndef OS_SOURCE
OS_SOURCE:=$(shell $(FPC) -iSO)
endif

# Target CPU
ifndef CPU_TARGET
CPU_TARGET:=$(shell $(FPC) -iTP)
endif

# Source CPU
ifndef CPU_SOURCE
CPU_SOURCE:=$(shell $(FPC) -iSP)
endif

# FPC version
ifndef FPC_VERSION
FPC_VERSION:=$(shell $(FPC) -iV)
endif

export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION

#####################################################################
# FPCDIR Setting
#####################################################################

# Test FPCDIR to look if the RTL dir exists
ifdef FPCDIR
override FPCDIR:=$(subst \,/,$(FPCDIR))
ifeq ($(wildcard $(FPCDIR)/rtl),)
ifeq ($(wildcard $(FPCDIR)/units),)
override FPCDIR=wrong
endif
endif
else
override FPCDIR=wrong
endif

# Detect FPCDIR
ifeq ($(FPCDIR),wrong)
ifdef inUnix
override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
ifeq ($(wildcard $(FPCDIR)/units),)
override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
endif
else
override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
override FPCDIR:=$(FPCDIR)/..
ifeq ($(wildcard $(FPCDIR)/rtl),)
ifeq ($(wildcard $(FPCDIR)/units),)
override FPCDIR:=$(FPCDIR)/..
ifeq ($(wildcard $(FPCDIR)/rtl),)
ifeq ($(wildcard $(FPCDIR)/units),)
override FPCDIR=c:/pp
endif
endif
endif
endif
endif
endif

#####################################################################
# User Settings
#####################################################################


# Targets

ifeq ($(OS_TARGET),linux)
override DIROBJECTS+=$(wildcard zlib ncurses x11 gtk syslog inet uncgi mysql ibase postgres opengl forms svgalib ggi utmp paszlib gdbint cmem regexpr zip)
endif
ifeq ($(OS_TARGET),go32v2)
override DIROBJECTS+=$(wildcard uncgi gdbint paszlib zip regexpr)
endif
ifeq ($(OS_TARGET),win32)
override DIROBJECTS+=$(wildcard uncgi gtk gdbint ibase mysql zlib paszlib zip regexpr opengl)
endif

# Clean


# Install

PACKAGENAME=packages
ZIPTARGET=install

# Defaults


# Directories


# Packages


# Libraries


#####################################################################
# Shell tools
#####################################################################

# echo
ifndef ECHO
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
ifeq ($(ECHO),)
ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
ifeq ($(ECHO),)
ECHO:=echo
ECHOE:=echo
else
ECHO:=$(firstword $(ECHO))
ECHOE=$(ECHO) -E
endif
else
ECHO:=$(firstword $(ECHO))
ECHOE=$(ECHO) -E
endif
endif

# To copy pograms
ifndef COPY
COPY:=cp -fp
endif

# Copy a whole tree
ifndef COPYTREE
COPYTREE:=cp -rfp
endif

# To move pograms
ifndef MOVE
MOVE:=mv -f
endif

# Check delete program
ifndef DEL
DEL:=rm -f
endif

# Check deltree program
ifndef DELTREE
DELTREE:=rm -rf
endif

# To install files
ifndef INSTALL
ifdef inUnix
INSTALL:=install -c -m 644
else
INSTALL:=$(COPY)
endif
endif

# To install programs
ifndef INSTALLEXE
ifdef inUnix
INSTALLEXE:=install -c -m 755
else
INSTALLEXE:=$(COPY)
endif
endif

# To make a directory.
ifndef MKDIR
ifdef inUnix
MKDIR:=install -m 755 -d
else
MKDIR:=ginstall -m 755 -d
endif
endif

export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR

#####################################################################
# Default Tools
#####################################################################

# assembler, redefine it if cross compiling
ifndef AS
AS=as
endif

# linker, but probably not used
ifndef LD
LD=ld
endif

# ppas.bat / ppas.sh
ifdef inUnix
PPAS=ppas.sh
else
ifdef inOS2
PPAS=ppas.cmd
else
PPAS=ppas.bat
endif
endif

# ldconfig to rebuild .so cache
ifdef inUnix
LDCONFIG=ldconfig
else
LDCONFIG=
endif

# ZipProg, you can't use Zip as the var name (PFV)
ifndef ZIPPROG
ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
ifeq ($(ZIPPROG),)
ZIPPROG=
else
ZIPPROG:=$(firstword $(ZIPPROG))
endif
endif
export ZIPPROG

ZIPOPT=-9
ZIPEXT=.zip

# Tar
ifndef TARPROG
TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
ifeq ($(TARPROG),)
TARPROG=
else
TARPROG:=$(firstword $(TARPROG))
endif
endif
export TARPROG

ifeq ($(USETAR),bz2)
TAROPT=vI
TAREXT=.tar.bz2
else
TAROPT=vz
TAREXT=.tar.gz
endif



PKGALL=1
ifeq ($(OS_TARGET),linux)
PKGBASE=zlib ncurses x11 regexpr
PKGGTK=gtk
PKGNET=inet uncgi
PKGDB=mysql ibase postgres
PKGGFX=opengl forms svgalib ggi
PKGMISC=utmp syslog gdbint paszlib zip
endif
ifeq ($(OS_TARGET),go32v2)
PKGBAS=paszlib regexpr
PKGNET=uncgi
PKGMIS=gdbint zip
endif
ifeq ($(OS_TARGET),win32)
PKGBAS=paszlib regexpr
PKGGTK=gtk
PKGNET=uncgi
PKGDB=ibase mysql
PKGGFX=opengl
PKGMIS=gdbint zip
endif


# Pkg all

ifdef PKGALL
.PHONY:  pkgall_all pkgall_debug pkgall_examples pkgall_test pkgall_smart pkgall_shared pkgall_showinstall pkgall_install pkgall_sourceinstall pkgall_exampleinstall pkgall_zipinstall pkgall_zipsourceinstall pkgall_zipexampleinstall pkgall_clean pkgall_distclean pkgall_cleanall pkgall_require pkgall_info

pkgall_all: $(addsuffix _all,$(DIROBJECTS))

pkgall_debug: $(addsuffix _debug,$(DIROBJECTS))

pkgall_examples: $(addsuffix _examples,$(DIROBJECTS))

pkgall_test: $(addsuffix _test,$(DIROBJECTS))

pkgall_smart: $(addsuffix _smart,$(DIROBJECTS))

pkgall_shared: $(addsuffix _shared,$(DIROBJECTS))

pkgall_showinstall: $(addsuffix _showinstall,$(DIROBJECTS))

pkgall_install: $(addsuffix _install,$(DIROBJECTS))

pkgall_sourceinstall: $(addsuffix _sourceinstall,$(DIROBJECTS))

pkgall_exampleinstall: $(addsuffix _exampleinstall,$(DIROBJECTS))

pkgall_zipinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=all ZIPTARGET=pkgall_install

pkgall_zipsourceinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=all PACKAGESUFFIX=src ZIPTARGET=pkgall_sourceinstall

pkgall_clean: $(addsuffix _clean,$(DIROBJECTS))

pkgall_distclean: $(addsuffix _distclean,$(DIROBJECTS))

pkgall_cleanall: $(addsuffix _cleanall,$(DIROBJECTS))

pkgall_require: $(addsuffix _require,$(DIROBJECTS))

endif

# Pkg base

ifdef PKGBASE
.PHONY:  pkgbase_all pkgbase_debug pkgbase_examples pkgbase_test pkgbase_smart pkgbase_shared pkgbase_showinstall pkgbase_install pkgbase_sourceinstall pkgbase_exampleinstall pkgbase_zipinstall pkgbase_zipsourceinstall pkgbase_zipexampleinstall pkgbase_clean pkgbase_distclean pkgbase_cleanall pkgbase_require pkgbase_info

override PKGOBJECTS+=pkgbase
pkgbase_all: $(addsuffix _all,$(PKGBASE))

pkgbase_debug: $(addsuffix _debug,$(PKGBASE))

pkgbase_examples: $(addsuffix _examples,$(PKGBASE))

pkgbase_test: $(addsuffix _test,$(PKGBASE))

pkgbase_smart: $(addsuffix _smart,$(PKGBASE))

pkgbase_shared: $(addsuffix _shared,$(PKGBASE))

pkgbase_showinstall: $(addsuffix _showinstall,$(PKGBASE))

pkgbase_install: $(addsuffix _install,$(PKGBASE))

pkgbase_sourceinstall: $(addsuffix _sourceinstall,$(PKGBASE))

pkgbase_exampleinstall: $(addsuffix _exampleinstall,$(PKGBASE))

pkgbase_zipinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=base ZIPTARGET=pkgbase_install

pkgbase_zipsourceinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=base PACKAGESUFFIX=src ZIPTARGET=pkgbase_sourceinstall

pkgbase_clean: $(addsuffix _clean,$(PKGBASE))

pkgbase_distclean: $(addsuffix _distclean,$(PKGBASE))

pkgbase_cleanall: $(addsuffix _cleanall,$(PKGBASE))

pkgbase_require: $(addsuffix _require,$(PKGBASE))

endif

# Pkg gtk

ifdef PKGGTK
.PHONY:  pkggtk_all pkggtk_debug pkggtk_examples pkggtk_test pkggtk_smart pkggtk_shared pkggtk_showinstall pkggtk_install pkggtk_sourceinstall pkggtk_exampleinstall pkggtk_zipinstall pkggtk_zipsourceinstall pkggtk_zipexampleinstall pkggtk_clean pkggtk_distclean pkggtk_cleanall pkggtk_require pkggtk_info

override PKGOBJECTS+=pkggtk
pkggtk_all: $(addsuffix _all,$(PKGGTK))

pkggtk_debug: $(addsuffix _debug,$(PKGGTK))

pkggtk_examples: $(addsuffix _examples,$(PKGGTK))

pkggtk_test: $(addsuffix _test,$(PKGGTK))

pkggtk_smart: $(addsuffix _smart,$(PKGGTK))

pkggtk_shared: $(addsuffix _shared,$(PKGGTK))

pkggtk_showinstall: $(addsuffix _showinstall,$(PKGGTK))

pkggtk_install: $(addsuffix _install,$(PKGGTK))

pkggtk_sourceinstall: $(addsuffix _sourceinstall,$(PKGGTK))

pkggtk_exampleinstall: $(addsuffix _exampleinstall,$(PKGGTK))

pkggtk_zipinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=gtk ZIPTARGET=pkggtk_install

pkggtk_zipsourceinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=gtk PACKAGESUFFIX=src ZIPTARGET=pkggtk_sourceinstall

pkggtk_clean: $(addsuffix _clean,$(PKGGTK))

pkggtk_distclean: $(addsuffix _distclean,$(PKGGTK))

pkggtk_cleanall: $(addsuffix _cleanall,$(PKGGTK))

pkggtk_require: $(addsuffix _require,$(PKGGTK))

endif

# Pkg net

ifdef PKGNET
.PHONY:  pkgnet_all pkgnet_debug pkgnet_examples pkgnet_test pkgnet_smart pkgnet_shared pkgnet_showinstall pkgnet_install pkgnet_sourceinstall pkgnet_exampleinstall pkgnet_zipinstall pkgnet_zipsourceinstall pkgnet_zipexampleinstall pkgnet_clean pkgnet_distclean pkgnet_cleanall pkgnet_require pkgnet_info

override PKGOBJECTS+=pkgnet
pkgnet_all: $(addsuffix _all,$(PKGNET))

pkgnet_debug: $(addsuffix _debug,$(PKGNET))

pkgnet_examples: $(addsuffix _examples,$(PKGNET))

pkgnet_test: $(addsuffix _test,$(PKGNET))

pkgnet_smart: $(addsuffix _smart,$(PKGNET))

pkgnet_shared: $(addsuffix _shared,$(PKGNET))

pkgnet_showinstall: $(addsuffix _showinstall,$(PKGNET))

pkgnet_install: $(addsuffix _install,$(PKGNET))

pkgnet_sourceinstall: $(addsuffix _sourceinstall,$(PKGNET))

pkgnet_exampleinstall: $(addsuffix _exampleinstall,$(PKGNET))

pkgnet_zipinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=net ZIPTARGET=pkgnet_install

pkgnet_zipsourceinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=net PACKAGESUFFIX=src ZIPTARGET=pkgnet_sourceinstall

pkgnet_clean: $(addsuffix _clean,$(PKGNET))

pkgnet_distclean: $(addsuffix _distclean,$(PKGNET))

pkgnet_cleanall: $(addsuffix _cleanall,$(PKGNET))

pkgnet_require: $(addsuffix _require,$(PKGNET))

endif

# Pkg db

ifdef PKGDB
.PHONY:  pkgdb_all pkgdb_debug pkgdb_examples pkgdb_test pkgdb_smart pkgdb_shared pkgdb_showinstall pkgdb_install pkgdb_sourceinstall pkgdb_exampleinstall pkgdb_zipinstall pkgdb_zipsourceinstall pkgdb_zipexampleinstall pkgdb_clean pkgdb_distclean pkgdb_cleanall pkgdb_require pkgdb_info

override PKGOBJECTS+=pkgdb
pkgdb_all: $(addsuffix _all,$(PKGDB))

pkgdb_debug: $(addsuffix _debug,$(PKGDB))

pkgdb_examples: $(addsuffix _examples,$(PKGDB))

pkgdb_test: $(addsuffix _test,$(PKGDB))

pkgdb_smart: $(addsuffix _smart,$(PKGDB))

pkgdb_shared: $(addsuffix _shared,$(PKGDB))

pkgdb_showinstall: $(addsuffix _showinstall,$(PKGDB))

pkgdb_install: $(addsuffix _install,$(PKGDB))

pkgdb_sourceinstall: $(addsuffix _sourceinstall,$(PKGDB))

pkgdb_exampleinstall: $(addsuffix _exampleinstall,$(PKGDB))

pkgdb_zipinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=db ZIPTARGET=pkgdb_install

pkgdb_zipsourceinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=db PACKAGESUFFIX=src ZIPTARGET=pkgdb_sourceinstall

pkgdb_clean: $(addsuffix _clean,$(PKGDB))

pkgdb_distclean: $(addsuffix _distclean,$(PKGDB))

pkgdb_cleanall: $(addsuffix _cleanall,$(PKGDB))

pkgdb_require: $(addsuffix _require,$(PKGDB))

endif

# Pkg gfx

ifdef PKGGFX
.PHONY:  pkggfx_all pkggfx_debug pkggfx_examples pkggfx_test pkggfx_smart pkggfx_shared pkggfx_showinstall pkggfx_install pkggfx_sourceinstall pkggfx_exampleinstall pkggfx_zipinstall pkggfx_zipsourceinstall pkggfx_zipexampleinstall pkggfx_clean pkggfx_distclean pkggfx_cleanall pkggfx_require pkggfx_info

override PKGOBJECTS+=pkggfx
pkggfx_all: $(addsuffix _all,$(PKGGFX))

pkggfx_debug: $(addsuffix _debug,$(PKGGFX))

pkggfx_examples: $(addsuffix _examples,$(PKGGFX))

pkggfx_test: $(addsuffix _test,$(PKGGFX))

pkggfx_smart: $(addsuffix _smart,$(PKGGFX))

pkggfx_shared: $(addsuffix _shared,$(PKGGFX))

pkggfx_showinstall: $(addsuffix _showinstall,$(PKGGFX))

pkggfx_install: $(addsuffix _install,$(PKGGFX))

pkggfx_sourceinstall: $(addsuffix _sourceinstall,$(PKGGFX))

pkggfx_exampleinstall: $(addsuffix _exampleinstall,$(PKGGFX))

pkggfx_zipinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=gfx ZIPTARGET=pkggfx_install

pkggfx_zipsourceinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=gfx PACKAGESUFFIX=src ZIPTARGET=pkggfx_sourceinstall

pkggfx_clean: $(addsuffix _clean,$(PKGGFX))

pkggfx_distclean: $(addsuffix _distclean,$(PKGGFX))

pkggfx_cleanall: $(addsuffix _cleanall,$(PKGGFX))

pkggfx_require: $(addsuffix _require,$(PKGGFX))

endif

# Pkg misc

ifdef PKGMISC
.PHONY:  pkgmisc_all pkgmisc_debug pkgmisc_examples pkgmisc_test pkgmisc_smart pkgmisc_shared pkgmisc_showinstall pkgmisc_install pkgmisc_sourceinstall pkgmisc_exampleinstall pkgmisc_zipinstall pkgmisc_zipsourceinstall pkgmisc_zipexampleinstall pkgmisc_clean pkgmisc_distclean pkgmisc_cleanall pkgmisc_require pkgmisc_info

override PKGOBJECTS+=pkgmisc
pkgmisc_all: $(addsuffix _all,$(PKGMISC))

pkgmisc_debug: $(addsuffix _debug,$(PKGMISC))

pkgmisc_examples: $(addsuffix _examples,$(PKGMISC))

pkgmisc_test: $(addsuffix _test,$(PKGMISC))

pkgmisc_smart: $(addsuffix _smart,$(PKGMISC))

pkgmisc_shared: $(addsuffix _shared,$(PKGMISC))

pkgmisc_showinstall: $(addsuffix _showinstall,$(PKGMISC))

pkgmisc_install: $(addsuffix _install,$(PKGMISC))

pkgmisc_sourceinstall: $(addsuffix _sourceinstall,$(PKGMISC))

pkgmisc_exampleinstall: $(addsuffix _exampleinstall,$(PKGMISC))

pkgmisc_zipinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=misc ZIPTARGET=pkgmisc_install

pkgmisc_zipsourceinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=misc PACKAGESUFFIX=src ZIPTARGET=pkgmisc_sourceinstall

pkgmisc_clean: $(addsuffix _clean,$(PKGMISC))

pkgmisc_distclean: $(addsuffix _distclean,$(PKGMISC))

pkgmisc_cleanall: $(addsuffix _cleanall,$(PKGMISC))

pkgmisc_require: $(addsuffix _require,$(PKGMISC))

endif

# Pkg bas

ifdef PKGBAS
.PHONY:  pkgbas_all pkgbas_debug pkgbas_examples pkgbas_test pkgbas_smart pkgbas_shared pkgbas_showinstall pkgbas_install pkgbas_sourceinstall pkgbas_exampleinstall pkgbas_zipinstall pkgbas_zipsourceinstall pkgbas_zipexampleinstall pkgbas_clean pkgbas_distclean pkgbas_cleanall pkgbas_require pkgbas_info

override PKGOBJECTS+=pkgbas
pkgbas_all: $(addsuffix _all,$(PKGBAS))

pkgbas_debug: $(addsuffix _debug,$(PKGBAS))

pkgbas_examples: $(addsuffix _examples,$(PKGBAS))

pkgbas_test: $(addsuffix _test,$(PKGBAS))

pkgbas_smart: $(addsuffix _smart,$(PKGBAS))

pkgbas_shared: $(addsuffix _shared,$(PKGBAS))

pkgbas_showinstall: $(addsuffix _showinstall,$(PKGBAS))

pkgbas_install: $(addsuffix _install,$(PKGBAS))

pkgbas_sourceinstall: $(addsuffix _sourceinstall,$(PKGBAS))

pkgbas_exampleinstall: $(addsuffix _exampleinstall,$(PKGBAS))

pkgbas_zipinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=bas ZIPTARGET=pkgbas_install

pkgbas_zipsourceinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=bas PACKAGESUFFIX=src ZIPTARGET=pkgbas_sourceinstall

pkgbas_clean: $(addsuffix _clean,$(PKGBAS))

pkgbas_distclean: $(addsuffix _distclean,$(PKGBAS))

pkgbas_cleanall: $(addsuffix _cleanall,$(PKGBAS))

pkgbas_require: $(addsuffix _require,$(PKGBAS))

endif

# Pkg mis

ifdef PKGMIS
.PHONY:  pkgmis_all pkgmis_debug pkgmis_examples pkgmis_test pkgmis_smart pkgmis_shared pkgmis_showinstall pkgmis_install pkgmis_sourceinstall pkgmis_exampleinstall pkgmis_zipinstall pkgmis_zipsourceinstall pkgmis_zipexampleinstall pkgmis_clean pkgmis_distclean pkgmis_cleanall pkgmis_require pkgmis_info

override PKGOBJECTS+=pkgmis
pkgmis_all: $(addsuffix _all,$(PKGMIS))

pkgmis_debug: $(addsuffix _debug,$(PKGMIS))

pkgmis_examples: $(addsuffix _examples,$(PKGMIS))

pkgmis_test: $(addsuffix _test,$(PKGMIS))

pkgmis_smart: $(addsuffix _smart,$(PKGMIS))

pkgmis_shared: $(addsuffix _shared,$(PKGMIS))

pkgmis_showinstall: $(addsuffix _showinstall,$(PKGMIS))

pkgmis_install: $(addsuffix _install,$(PKGMIS))

pkgmis_sourceinstall: $(addsuffix _sourceinstall,$(PKGMIS))

pkgmis_exampleinstall: $(addsuffix _exampleinstall,$(PKGMIS))

pkgmis_zipinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=mis ZIPTARGET=pkgmis_install

pkgmis_zipsourceinstall:
	$(MAKE) fpc_zipinstall PACKAGENAME=mis PACKAGESUFFIX=src ZIPTARGET=pkgmis_sourceinstall

pkgmis_clean: $(addsuffix _clean,$(PKGMIS))

pkgmis_distclean: $(addsuffix _distclean,$(PKGMIS))

pkgmis_cleanall: $(addsuffix _cleanall,$(PKGMIS))

pkgmis_require: $(addsuffix _require,$(PKGMIS))

endif

#####################################################################
# Default Directories
#####################################################################

# Linux and freebsd use unix dirs with /usr/bin, /usr/lib
# When zipping use the target as default, when normal install then
# use the source os as default
ifdef ZIPNAME
# Zipinstall
ifeq ($(OS_TARGET),linux)
UNIXINSTALLDIR=1
endif
ifeq ($(OS_TARGET),freebsd)
UNIXINSTALLDIR=1
endif
else
# Normal install
ifeq ($(OS_SOURCE),linux)
UNIXINSTALLDIR=1
endif
ifeq ($(OS_SOURCE),freebsd)
UNIXINSTALLDIR=1
endif
endif

# set the prefix directory where to install everything
ifndef PREFIXINSTALLDIR
ifdef UNIXINSTALLDIR
PREFIXINSTALLDIR=/usr
else
PREFIXINSTALLDIR=/pp
endif
endif
export PREFIXINSTALLDIR

# Where to place the resulting zip files
ifndef DESTZIPDIR
DESTZIPDIR:=$(BASEDIR)
endif
export DESTZIPDIR

#####################################################################
# Install Directories
#####################################################################

# set the base directory where to install everything
ifndef BASEINSTALLDIR
ifdef UNIXINSTALLDIR
BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
else
BASEINSTALLDIR=$(PREFIXINSTALLDIR)
endif
endif

# set the directory where to install the binaries
ifndef BININSTALLDIR
ifdef UNIXINSTALLDIR
BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
else
BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
endif
endif

# set the directory where to install the units.
ifndef UNITINSTALLDIR
UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
ifdef UNITSUBDIR
UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
endif
endif

# Where to install shared libraries
ifndef LIBINSTALLDIR
ifdef UNIXINSTALLDIR
LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
else
LIBINSTALLDIR=$(UNITINSTALLDIR)
endif
endif

# Where the source files will be stored
ifndef SOURCEINSTALLDIR
ifdef UNIXINSTALLDIR
SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
else
SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
endif
ifdef SOURCESUBDIR
SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
endif
endif

# Where the doc files will be stored
ifndef DOCINSTALLDIR
ifdef UNIXINSTALLDIR
DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
else
DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
endif
endif

# Where to install the examples, under linux we use the doc dir
# because the copytree command will create a subdir itself
ifndef EXAMPLEINSTALLDIR
ifdef UNIXINSTALLDIR
EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
else
EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
endif
ifdef EXAMPLESUBDIR
EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
endif
endif

# Where the some extra (data)files will be stored
ifndef DATAINSTALLDIR
DATAINSTALLDIR=$(BASEINSTALLDIR)
endif

#####################################################################
# Redirection
#####################################################################

ifndef REDIRFILE
REDIRFILE=log
endif

ifdef REDIR
ifndef inUnix
override FPC=redir -eo $(FPC)
endif
# set the verbosity to max
override FPCOPT+=-va
override REDIR:= >> $(REDIRFILE)
endif

#####################################################################
# Standard rules
#####################################################################

all: $(addsuffix _all,$(DIROBJECTS))

debug: $(addsuffix _debug,$(DIROBJECTS))

examples: $(addsuffix _examples,$(DIROBJECTS))

test: $(addsuffix _test,$(DIROBJECTS))

smart: $(addsuffix _smart,$(DIROBJECTS))

shared: $(addsuffix _shared,$(DIROBJECTS))

showinstall: $(addsuffix _showinstall,$(DIROBJECTS))

install: $(addsuffix _install,$(DIROBJECTS))

sourceinstall: fpc_sourceinstall

exampleinstall: fpc_exampleinstall $(addsuffix _exampleinstall,$(DIROBJECTS))

zipinstall: $(addsuffix _zipinstall,$(PKGOBJECTS))

zipsourceinstall: fpc_zipsourceinstall

zipexampleinstall: fpc_zipexampleinstall

clean: $(addsuffix _clean,$(DIROBJECTS))

distclean: $(addsuffix _distclean,$(DIROBJECTS))

cleanall: $(addsuffix _cleanall,$(DIROBJECTS))

require: $(addsuffix _require,$(DIROBJECTS))

.PHONY:  all debug examples test smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall require

#####################################################################
# SourceInstall rules
#####################################################################

.PHONY: fpc_sourceinstall

ifndef SOURCETOPDIR
SOURCETOPDIR=$(BASEDIR)
endif

fpc_sourceinstall: clean
	$(MKDIR) $(SOURCEINSTALLDIR)
	$(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)

#####################################################################
# exampleinstall rules
#####################################################################

.PHONY: fpc_exampleinstall

fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
ifdef EXAMPLESOURCEFILES
	$(MKDIR) $(EXAMPLEINSTALLDIR)
	$(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
endif
ifdef EXAMPLEDIROBJECTS
ifndef EXAMPLESOURCEFILES
	$(MKDIR) $(EXAMPLEINSTALLDIR)
endif
	$(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
endif

#####################################################################
# Zip
#####################################################################

.PHONY: fpc_zipinstall

# Create suffix to add
ifndef PACKAGESUFFIX
PACKAGESUFFIX=$(OS_TARGET)
ifeq ($(OS_TARGET),go32v2)
PACKAGESUFFIX=go32
endif
ifeq ($(OS_TARGET),win32)
PACKAGESUFFIX=w32
endif
endif

# Temporary path to pack a file
ifndef PACKDIR
ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp
else
PACKDIR=/tmp/fpc-pack
endif
endif

# Maybe create default zipname from packagename
ifndef ZIPNAME
ifdef PACKAGENAME
ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
endif
endif

# Use tar by default under linux
ifndef USEZIP
ifdef inUnix
USETAR=1
endif
endif

fpc_zipinstall:
ifndef ZIPNAME
	@$(ECHO) "Please specify ZIPNAME!"
	@exit 1
else
	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
ifdef USETAR
	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
	cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
else
	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
	cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
endif
	$(DELTREE) $(PACKDIR)
endif

.PHONY:  fpc_zipsourceinstall

fpc_zipsourceinstall:
	$(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src

.PHONY:  fpc_zipexampleinstall

fpc_zipexampleinstall:
	$(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm

#####################################################################
# Directories
#####################################################################

ifeq ($(OS_TARGET),linux)
OBJECTDIRZLIB=1
OBJECTDIRNCURSES=1
OBJECTDIRX11=1
OBJECTDIRGTK=1
OBJECTDIRSYSLOG=1
OBJECTDIRINET=1
OBJECTDIRUNCGI=1
OBJECTDIRMYSQL=1
OBJECTDIRIBASE=1
OBJECTDIRPOSTGRES=1
OBJECTDIROPENGL=1
OBJECTDIRFORMS=1
OBJECTDIRSVGALIB=1
OBJECTDIRGGI=1
OBJECTDIRUTMP=1
OBJECTDIRPASZLIB=1
OBJECTDIRGDBINT=1
OBJECTDIRCMEM=1
OBJECTDIRREGEXPR=1
OBJECTDIRZIP=1
endif
ifeq ($(OS_TARGET),go32v2)
OBJECTDIRUNCGI=1
OBJECTDIRGDBINT=1
OBJECTDIRPASZLIB=1
OBJECTDIRZIP=1
OBJECTDIRREGEXPR=1
endif
ifeq ($(OS_TARGET),win32)
OBJECTDIRUNCGI=1
OBJECTDIRGTK=1
OBJECTDIRGDBINT=1
OBJECTDIRIBASE=1
OBJECTDIRMYSQL=1
OBJECTDIRZLIB=1
OBJECTDIRPASZLIB=1
OBJECTDIRZIP=1
OBJECTDIRREGEXPR=1
OBJECTDIROPENGL=1
endif

# Dir zlib

ifdef OBJECTDIRZLIB
.PHONY:  zlib_all zlib_debug zlib_examples zlib_test zlib_smart zlib_shared zlib_showinstall zlib_install zlib_sourceinstall zlib_exampleinstall zlib_zipinstall zlib_zipsourceinstall zlib_zipexampleinstall zlib_clean zlib_distclean zlib_cleanall zlib_require zlib_info

zlib_all:
	$(MAKE) -C zlib all

zlib_debug:
	$(MAKE) -C zlib debug

zlib_examples:
	$(MAKE) -C zlib examples

zlib_test:
	$(MAKE) -C zlib test

zlib_smart:
	$(MAKE) -C zlib smart

zlib_shared:
	$(MAKE) -C zlib shared

zlib_showinstall:
	$(MAKE) -C zlib showinstall

zlib_install:
	$(MAKE) -C zlib install

zlib_sourceinstall:
	$(MAKE) -C zlib sourceinstall

zlib_exampleinstall:
	$(MAKE) -C zlib exampleinstall

zlib_zipinstall:
	$(MAKE) -C zlib zipinstall

zlib_zipsourceinstall:
	$(MAKE) -C zlib zipsourceinstall

zlib_zipexampleinstall:
	$(MAKE) -C zlib zipexampleinstall

zlib_clean:
	$(MAKE) -C zlib clean

zlib_distclean:
	$(MAKE) -C zlib distclean

zlib_cleanall:
	$(MAKE) -C zlib cleanall

zlib_require:
	$(MAKE) -C zlib require

zlib_info:
	$(MAKE) -C zlib info
endif

# Dir ncurses

ifdef OBJECTDIRNCURSES
.PHONY:  ncurses_all ncurses_debug ncurses_examples ncurses_test ncurses_smart ncurses_shared ncurses_showinstall ncurses_install ncurses_sourceinstall ncurses_exampleinstall ncurses_zipinstall ncurses_zipsourceinstall ncurses_zipexampleinstall ncurses_clean ncurses_distclean ncurses_cleanall ncurses_require ncurses_info

ncurses_all:
	$(MAKE) -C ncurses all

ncurses_debug:
	$(MAKE) -C ncurses debug

ncurses_examples:
	$(MAKE) -C ncurses examples

ncurses_test:
	$(MAKE) -C ncurses test

ncurses_smart:
	$(MAKE) -C ncurses smart

ncurses_shared:
	$(MAKE) -C ncurses shared

ncurses_showinstall:
	$(MAKE) -C ncurses showinstall

ncurses_install:
	$(MAKE) -C ncurses install

ncurses_sourceinstall:
	$(MAKE) -C ncurses sourceinstall

ncurses_exampleinstall:
	$(MAKE) -C ncurses exampleinstall

ncurses_zipinstall:
	$(MAKE) -C ncurses zipinstall

ncurses_zipsourceinstall:
	$(MAKE) -C ncurses zipsourceinstall

ncurses_zipexampleinstall:
	$(MAKE) -C ncurses zipexampleinstall

ncurses_clean:
	$(MAKE) -C ncurses clean

ncurses_distclean:
	$(MAKE) -C ncurses distclean

ncurses_cleanall:
	$(MAKE) -C ncurses cleanall

ncurses_require:
	$(MAKE) -C ncurses require

ncurses_info:
	$(MAKE) -C ncurses info
endif

# Dir x11

ifdef OBJECTDIRX11
.PHONY:  x11_all x11_debug x11_examples x11_test x11_smart x11_shared x11_showinstall x11_install x11_sourceinstall x11_exampleinstall x11_zipinstall x11_zipsourceinstall x11_zipexampleinstall x11_clean x11_distclean x11_cleanall x11_require x11_info

x11_all:
	$(MAKE) -C x11 all

x11_debug:
	$(MAKE) -C x11 debug

x11_examples:
	$(MAKE) -C x11 examples

x11_test:
	$(MAKE) -C x11 test

x11_smart:
	$(MAKE) -C x11 smart

x11_shared:
	$(MAKE) -C x11 shared

x11_showinstall:
	$(MAKE) -C x11 showinstall

x11_install:
	$(MAKE) -C x11 install

x11_sourceinstall:
	$(MAKE) -C x11 sourceinstall

x11_exampleinstall:
	$(MAKE) -C x11 exampleinstall

x11_zipinstall:
	$(MAKE) -C x11 zipinstall

x11_zipsourceinstall:
	$(MAKE) -C x11 zipsourceinstall

x11_zipexampleinstall:
	$(MAKE) -C x11 zipexampleinstall

x11_clean:
	$(MAKE) -C x11 clean

x11_distclean:
	$(MAKE) -C x11 distclean

x11_cleanall:
	$(MAKE) -C x11 cleanall

x11_require:
	$(MAKE) -C x11 require

x11_info:
	$(MAKE) -C x11 info
endif

# Dir gtk

ifdef OBJECTDIRGTK
.PHONY:  gtk_all gtk_debug gtk_examples gtk_test gtk_smart gtk_shared gtk_showinstall gtk_install gtk_sourceinstall gtk_exampleinstall gtk_zipinstall gtk_zipsourceinstall gtk_zipexampleinstall gtk_clean gtk_distclean gtk_cleanall gtk_require gtk_info

gtk_all:
	$(MAKE) -C gtk all

gtk_debug:
	$(MAKE) -C gtk debug

gtk_examples:
	$(MAKE) -C gtk examples

gtk_test:
	$(MAKE) -C gtk test

gtk_smart:
	$(MAKE) -C gtk smart

gtk_shared:
	$(MAKE) -C gtk shared

gtk_showinstall:
	$(MAKE) -C gtk showinstall

gtk_install:
	$(MAKE) -C gtk install

gtk_sourceinstall:
	$(MAKE) -C gtk sourceinstall

gtk_exampleinstall:
	$(MAKE) -C gtk exampleinstall

gtk_zipinstall:
	$(MAKE) -C gtk zipinstall

gtk_zipsourceinstall:
	$(MAKE) -C gtk zipsourceinstall

gtk_zipexampleinstall:
	$(MAKE) -C gtk zipexampleinstall

gtk_clean:
	$(MAKE) -C gtk clean

gtk_distclean:
	$(MAKE) -C gtk distclean

gtk_cleanall:
	$(MAKE) -C gtk cleanall

gtk_require:
	$(MAKE) -C gtk require

gtk_info:
	$(MAKE) -C gtk info
endif

# Dir syslog

ifdef OBJECTDIRSYSLOG
.PHONY:  syslog_all syslog_debug syslog_examples syslog_test syslog_smart syslog_shared syslog_showinstall syslog_install syslog_sourceinstall syslog_exampleinstall syslog_zipinstall syslog_zipsourceinstall syslog_zipexampleinstall syslog_clean syslog_distclean syslog_cleanall syslog_require syslog_info

syslog_all:
	$(MAKE) -C syslog all

syslog_debug:
	$(MAKE) -C syslog debug

syslog_examples:
	$(MAKE) -C syslog examples

syslog_test:
	$(MAKE) -C syslog test

syslog_smart:
	$(MAKE) -C syslog smart

syslog_shared:
	$(MAKE) -C syslog shared

syslog_showinstall:
	$(MAKE) -C syslog showinstall

syslog_install:
	$(MAKE) -C syslog install

syslog_sourceinstall:
	$(MAKE) -C syslog sourceinstall

syslog_exampleinstall:
	$(MAKE) -C syslog exampleinstall

syslog_zipinstall:
	$(MAKE) -C syslog zipinstall

syslog_zipsourceinstall:
	$(MAKE) -C syslog zipsourceinstall

syslog_zipexampleinstall:
	$(MAKE) -C syslog zipexampleinstall

syslog_clean:
	$(MAKE) -C syslog clean

syslog_distclean:
	$(MAKE) -C syslog distclean

syslog_cleanall:
	$(MAKE) -C syslog cleanall

syslog_require:
	$(MAKE) -C syslog require

syslog_info:
	$(MAKE) -C syslog info
endif

# Dir inet

ifdef OBJECTDIRINET
.PHONY:  inet_all inet_debug inet_examples inet_test inet_smart inet_shared inet_showinstall inet_install inet_sourceinstall inet_exampleinstall inet_zipinstall inet_zipsourceinstall inet_zipexampleinstall inet_clean inet_distclean inet_cleanall inet_require inet_info

inet_all:
	$(MAKE) -C inet all

inet_debug:
	$(MAKE) -C inet debug

inet_examples:
	$(MAKE) -C inet examples

inet_test:
	$(MAKE) -C inet test

inet_smart:
	$(MAKE) -C inet smart

inet_shared:
	$(MAKE) -C inet shared

inet_showinstall:
	$(MAKE) -C inet showinstall

inet_install:
	$(MAKE) -C inet install

inet_sourceinstall:
	$(MAKE) -C inet sourceinstall

inet_exampleinstall:
	$(MAKE) -C inet exampleinstall

inet_zipinstall:
	$(MAKE) -C inet zipinstall

inet_zipsourceinstall:
	$(MAKE) -C inet zipsourceinstall

inet_zipexampleinstall:
	$(MAKE) -C inet zipexampleinstall

inet_clean:
	$(MAKE) -C inet clean

inet_distclean:
	$(MAKE) -C inet distclean

inet_cleanall:
	$(MAKE) -C inet cleanall

inet_require:
	$(MAKE) -C inet require

inet_info:
	$(MAKE) -C inet info
endif

# Dir uncgi

ifdef OBJECTDIRUNCGI
.PHONY:  uncgi_all uncgi_debug uncgi_examples uncgi_test uncgi_smart uncgi_shared uncgi_showinstall uncgi_install uncgi_sourceinstall uncgi_exampleinstall uncgi_zipinstall uncgi_zipsourceinstall uncgi_zipexampleinstall uncgi_clean uncgi_distclean uncgi_cleanall uncgi_require uncgi_info

uncgi_all:
	$(MAKE) -C uncgi all

uncgi_debug:
	$(MAKE) -C uncgi debug

uncgi_examples:
	$(MAKE) -C uncgi examples

uncgi_test:
	$(MAKE) -C uncgi test

uncgi_smart:
	$(MAKE) -C uncgi smart

uncgi_shared:
	$(MAKE) -C uncgi shared

uncgi_showinstall:
	$(MAKE) -C uncgi showinstall

uncgi_install:
	$(MAKE) -C uncgi install

uncgi_sourceinstall:
	$(MAKE) -C uncgi sourceinstall

uncgi_exampleinstall:
	$(MAKE) -C uncgi exampleinstall

uncgi_zipinstall:
	$(MAKE) -C uncgi zipinstall

uncgi_zipsourceinstall:
	$(MAKE) -C uncgi zipsourceinstall

uncgi_zipexampleinstall:
	$(MAKE) -C uncgi zipexampleinstall

uncgi_clean:
	$(MAKE) -C uncgi clean

uncgi_distclean:
	$(MAKE) -C uncgi distclean

uncgi_cleanall:
	$(MAKE) -C uncgi cleanall

uncgi_require:
	$(MAKE) -C uncgi require

uncgi_info:
	$(MAKE) -C uncgi info
endif

# Dir mysql

ifdef OBJECTDIRMYSQL
.PHONY:  mysql_all mysql_debug mysql_examples mysql_test mysql_smart mysql_shared mysql_showinstall mysql_install mysql_sourceinstall mysql_exampleinstall mysql_zipinstall mysql_zipsourceinstall mysql_zipexampleinstall mysql_clean mysql_distclean mysql_cleanall mysql_require mysql_info

mysql_all:
	$(MAKE) -C mysql all

mysql_debug:
	$(MAKE) -C mysql debug

mysql_examples:
	$(MAKE) -C mysql examples

mysql_test:
	$(MAKE) -C mysql test

mysql_smart:
	$(MAKE) -C mysql smart

mysql_shared:
	$(MAKE) -C mysql shared

mysql_showinstall:
	$(MAKE) -C mysql showinstall

mysql_install:
	$(MAKE) -C mysql install

mysql_sourceinstall:
	$(MAKE) -C mysql sourceinstall

mysql_exampleinstall:
	$(MAKE) -C mysql exampleinstall

mysql_zipinstall:
	$(MAKE) -C mysql zipinstall

mysql_zipsourceinstall:
	$(MAKE) -C mysql zipsourceinstall

mysql_zipexampleinstall:
	$(MAKE) -C mysql zipexampleinstall

mysql_clean:
	$(MAKE) -C mysql clean

mysql_distclean:
	$(MAKE) -C mysql distclean

mysql_cleanall:
	$(MAKE) -C mysql cleanall

mysql_require:
	$(MAKE) -C mysql require

mysql_info:
	$(MAKE) -C mysql info
endif

# Dir ibase

ifdef OBJECTDIRIBASE
.PHONY:  ibase_all ibase_debug ibase_examples ibase_test ibase_smart ibase_shared ibase_showinstall ibase_install ibase_sourceinstall ibase_exampleinstall ibase_zipinstall ibase_zipsourceinstall ibase_zipexampleinstall ibase_clean ibase_distclean ibase_cleanall ibase_require ibase_info

ibase_all:
	$(MAKE) -C ibase all

ibase_debug:
	$(MAKE) -C ibase debug

ibase_examples:
	$(MAKE) -C ibase examples

ibase_test:
	$(MAKE) -C ibase test

ibase_smart:
	$(MAKE) -C ibase smart

ibase_shared:
	$(MAKE) -C ibase shared

ibase_showinstall:
	$(MAKE) -C ibase showinstall

ibase_install:
	$(MAKE) -C ibase install

ibase_sourceinstall:
	$(MAKE) -C ibase sourceinstall

ibase_exampleinstall:
	$(MAKE) -C ibase exampleinstall

ibase_zipinstall:
	$(MAKE) -C ibase zipinstall

ibase_zipsourceinstall:
	$(MAKE) -C ibase zipsourceinstall

ibase_zipexampleinstall:
	$(MAKE) -C ibase zipexampleinstall

ibase_clean:
	$(MAKE) -C ibase clean

ibase_distclean:
	$(MAKE) -C ibase distclean

ibase_cleanall:
	$(MAKE) -C ibase cleanall

ibase_require:
	$(MAKE) -C ibase require

ibase_info:
	$(MAKE) -C ibase info
endif

# Dir postgres

ifdef OBJECTDIRPOSTGRES
.PHONY:  postgres_all postgres_debug postgres_examples postgres_test postgres_smart postgres_shared postgres_showinstall postgres_install postgres_sourceinstall postgres_exampleinstall postgres_zipinstall postgres_zipsourceinstall postgres_zipexampleinstall postgres_clean postgres_distclean postgres_cleanall postgres_require postgres_info

postgres_all:
	$(MAKE) -C postgres all

postgres_debug:
	$(MAKE) -C postgres debug

postgres_examples:
	$(MAKE) -C postgres examples

postgres_test:
	$(MAKE) -C postgres test

postgres_smart:
	$(MAKE) -C postgres smart

postgres_shared:
	$(MAKE) -C postgres shared

postgres_showinstall:
	$(MAKE) -C postgres showinstall

postgres_install:
	$(MAKE) -C postgres install

postgres_sourceinstall:
	$(MAKE) -C postgres sourceinstall

postgres_exampleinstall:
	$(MAKE) -C postgres exampleinstall

postgres_zipinstall:
	$(MAKE) -C postgres zipinstall

postgres_zipsourceinstall:
	$(MAKE) -C postgres zipsourceinstall

postgres_zipexampleinstall:
	$(MAKE) -C postgres zipexampleinstall

postgres_clean:
	$(MAKE) -C postgres clean

postgres_distclean:
	$(MAKE) -C postgres distclean

postgres_cleanall:
	$(MAKE) -C postgres cleanall

postgres_require:
	$(MAKE) -C postgres require

postgres_info:
	$(MAKE) -C postgres info
endif

# Dir opengl

ifdef OBJECTDIROPENGL
.PHONY:  opengl_all opengl_debug opengl_examples opengl_test opengl_smart opengl_shared opengl_showinstall opengl_install opengl_sourceinstall opengl_exampleinstall opengl_zipinstall opengl_zipsourceinstall opengl_zipexampleinstall opengl_clean opengl_distclean opengl_cleanall opengl_require opengl_info

opengl_all:
	$(MAKE) -C opengl all

opengl_debug:
	$(MAKE) -C opengl debug

opengl_examples:
	$(MAKE) -C opengl examples

opengl_test:
	$(MAKE) -C opengl test

opengl_smart:
	$(MAKE) -C opengl smart

opengl_shared:
	$(MAKE) -C opengl shared

opengl_showinstall:
	$(MAKE) -C opengl showinstall

opengl_install:
	$(MAKE) -C opengl install

opengl_sourceinstall:
	$(MAKE) -C opengl sourceinstall

opengl_exampleinstall:
	$(MAKE) -C opengl exampleinstall

opengl_zipinstall:
	$(MAKE) -C opengl zipinstall

opengl_zipsourceinstall:
	$(MAKE) -C opengl zipsourceinstall

opengl_zipexampleinstall:
	$(MAKE) -C opengl zipexampleinstall

opengl_clean:
	$(MAKE) -C opengl clean

opengl_distclean:
	$(MAKE) -C opengl distclean

opengl_cleanall:
	$(MAKE) -C opengl cleanall

opengl_require:
	$(MAKE) -C opengl require

opengl_info:
	$(MAKE) -C opengl info
endif

# Dir forms

ifdef OBJECTDIRFORMS
.PHONY:  forms_all forms_debug forms_examples forms_test forms_smart forms_shared forms_showinstall forms_install forms_sourceinstall forms_exampleinstall forms_zipinstall forms_zipsourceinstall forms_zipexampleinstall forms_clean forms_distclean forms_cleanall forms_require forms_info

forms_all:
	$(MAKE) -C forms all

forms_debug:
	$(MAKE) -C forms debug

forms_examples:
	$(MAKE) -C forms examples

forms_test:
	$(MAKE) -C forms test

forms_smart:
	$(MAKE) -C forms smart

forms_shared:
	$(MAKE) -C forms shared

forms_showinstall:
	$(MAKE) -C forms showinstall

forms_install:
	$(MAKE) -C forms install

forms_sourceinstall:
	$(MAKE) -C forms sourceinstall

forms_exampleinstall:
	$(MAKE) -C forms exampleinstall

forms_zipinstall:
	$(MAKE) -C forms zipinstall

forms_zipsourceinstall:
	$(MAKE) -C forms zipsourceinstall

forms_zipexampleinstall:
	$(MAKE) -C forms zipexampleinstall

forms_clean:
	$(MAKE) -C forms clean

forms_distclean:
	$(MAKE) -C forms distclean

forms_cleanall:
	$(MAKE) -C forms cleanall

forms_require:
	$(MAKE) -C forms require

forms_info:
	$(MAKE) -C forms info
endif

# Dir svgalib

ifdef OBJECTDIRSVGALIB
.PHONY:  svgalib_all svgalib_debug svgalib_examples svgalib_test svgalib_smart svgalib_shared svgalib_showinstall svgalib_install svgalib_sourceinstall svgalib_exampleinstall svgalib_zipinstall svgalib_zipsourceinstall svgalib_zipexampleinstall svgalib_clean svgalib_distclean svgalib_cleanall svgalib_require svgalib_info

svgalib_all:
	$(MAKE) -C svgalib all

svgalib_debug:
	$(MAKE) -C svgalib debug

svgalib_examples:
	$(MAKE) -C svgalib examples

svgalib_test:
	$(MAKE) -C svgalib test

svgalib_smart:
	$(MAKE) -C svgalib smart

svgalib_shared:
	$(MAKE) -C svgalib shared

svgalib_showinstall:
	$(MAKE) -C svgalib showinstall

svgalib_install:
	$(MAKE) -C svgalib install

svgalib_sourceinstall:
	$(MAKE) -C svgalib sourceinstall

svgalib_exampleinstall:
	$(MAKE) -C svgalib exampleinstall

svgalib_zipinstall:
	$(MAKE) -C svgalib zipinstall

svgalib_zipsourceinstall:
	$(MAKE) -C svgalib zipsourceinstall

svgalib_zipexampleinstall:
	$(MAKE) -C svgalib zipexampleinstall

svgalib_clean:
	$(MAKE) -C svgalib clean

svgalib_distclean:
	$(MAKE) -C svgalib distclean

svgalib_cleanall:
	$(MAKE) -C svgalib cleanall

svgalib_require:
	$(MAKE) -C svgalib require

svgalib_info:
	$(MAKE) -C svgalib info
endif

# Dir ggi

ifdef OBJECTDIRGGI
.PHONY:  ggi_all ggi_debug ggi_examples ggi_test ggi_smart ggi_shared ggi_showinstall ggi_install ggi_sourceinstall ggi_exampleinstall ggi_zipinstall ggi_zipsourceinstall ggi_zipexampleinstall ggi_clean ggi_distclean ggi_cleanall ggi_require ggi_info

ggi_all:
	$(MAKE) -C ggi all

ggi_debug:
	$(MAKE) -C ggi debug

ggi_examples:
	$(MAKE) -C ggi examples

ggi_test:
	$(MAKE) -C ggi test

ggi_smart:
	$(MAKE) -C ggi smart

ggi_shared:
	$(MAKE) -C ggi shared

ggi_showinstall:
	$(MAKE) -C ggi showinstall

ggi_install:
	$(MAKE) -C ggi install

ggi_sourceinstall:
	$(MAKE) -C ggi sourceinstall

ggi_exampleinstall:
	$(MAKE) -C ggi exampleinstall

ggi_zipinstall:
	$(MAKE) -C ggi zipinstall

ggi_zipsourceinstall:
	$(MAKE) -C ggi zipsourceinstall

ggi_zipexampleinstall:
	$(MAKE) -C ggi zipexampleinstall

ggi_clean:
	$(MAKE) -C ggi clean

ggi_distclean:
	$(MAKE) -C ggi distclean

ggi_cleanall:
	$(MAKE) -C ggi cleanall

ggi_require:
	$(MAKE) -C ggi require

ggi_info:
	$(MAKE) -C ggi info
endif

# Dir utmp

ifdef OBJECTDIRUTMP
.PHONY:  utmp_all utmp_debug utmp_examples utmp_test utmp_smart utmp_shared utmp_showinstall utmp_install utmp_sourceinstall utmp_exampleinstall utmp_zipinstall utmp_zipsourceinstall utmp_zipexampleinstall utmp_clean utmp_distclean utmp_cleanall utmp_require utmp_info

utmp_all:
	$(MAKE) -C utmp all

utmp_debug:
	$(MAKE) -C utmp debug

utmp_examples:
	$(MAKE) -C utmp examples

utmp_test:
	$(MAKE) -C utmp test

utmp_smart:
	$(MAKE) -C utmp smart

utmp_shared:
	$(MAKE) -C utmp shared

utmp_showinstall:
	$(MAKE) -C utmp showinstall

utmp_install:
	$(MAKE) -C utmp install

utmp_sourceinstall:
	$(MAKE) -C utmp sourceinstall

utmp_exampleinstall:
	$(MAKE) -C utmp exampleinstall

utmp_zipinstall:
	$(MAKE) -C utmp zipinstall

utmp_zipsourceinstall:
	$(MAKE) -C utmp zipsourceinstall

utmp_zipexampleinstall:
	$(MAKE) -C utmp zipexampleinstall

utmp_clean:
	$(MAKE) -C utmp clean

utmp_distclean:
	$(MAKE) -C utmp distclean

utmp_cleanall:
	$(MAKE) -C utmp cleanall

utmp_require:
	$(MAKE) -C utmp require

utmp_info:
	$(MAKE) -C utmp info
endif

# Dir paszlib

ifdef OBJECTDIRPASZLIB
.PHONY:  paszlib_all paszlib_debug paszlib_examples paszlib_test paszlib_smart paszlib_shared paszlib_showinstall paszlib_install paszlib_sourceinstall paszlib_exampleinstall paszlib_zipinstall paszlib_zipsourceinstall paszlib_zipexampleinstall paszlib_clean paszlib_distclean paszlib_cleanall paszlib_require paszlib_info

paszlib_all:
	$(MAKE) -C paszlib all

paszlib_debug:
	$(MAKE) -C paszlib debug

paszlib_examples:
	$(MAKE) -C paszlib examples

paszlib_test:
	$(MAKE) -C paszlib test

paszlib_smart:
	$(MAKE) -C paszlib smart

paszlib_shared:
	$(MAKE) -C paszlib shared

paszlib_showinstall:
	$(MAKE) -C paszlib showinstall

paszlib_install:
	$(MAKE) -C paszlib install

paszlib_sourceinstall:
	$(MAKE) -C paszlib sourceinstall

paszlib_exampleinstall:
	$(MAKE) -C paszlib exampleinstall

paszlib_zipinstall:
	$(MAKE) -C paszlib zipinstall

paszlib_zipsourceinstall:
	$(MAKE) -C paszlib zipsourceinstall

paszlib_zipexampleinstall:
	$(MAKE) -C paszlib zipexampleinstall

paszlib_clean:
	$(MAKE) -C paszlib clean

paszlib_distclean:
	$(MAKE) -C paszlib distclean

paszlib_cleanall:
	$(MAKE) -C paszlib cleanall

paszlib_require:
	$(MAKE) -C paszlib require

paszlib_info:
	$(MAKE) -C paszlib info
endif

# Dir gdbint

ifdef OBJECTDIRGDBINT
.PHONY:  gdbint_all gdbint_debug gdbint_examples gdbint_test gdbint_smart gdbint_shared gdbint_showinstall gdbint_install gdbint_sourceinstall gdbint_exampleinstall gdbint_zipinstall gdbint_zipsourceinstall gdbint_zipexampleinstall gdbint_clean gdbint_distclean gdbint_cleanall gdbint_require gdbint_info

gdbint_all:
	$(MAKE) -C gdbint all

gdbint_debug:
	$(MAKE) -C gdbint debug

gdbint_examples:
	$(MAKE) -C gdbint examples

gdbint_test:
	$(MAKE) -C gdbint test

gdbint_smart:
	$(MAKE) -C gdbint smart

gdbint_shared:
	$(MAKE) -C gdbint shared

gdbint_showinstall:
	$(MAKE) -C gdbint showinstall

gdbint_install:
	$(MAKE) -C gdbint install

gdbint_sourceinstall:
	$(MAKE) -C gdbint sourceinstall

gdbint_exampleinstall:
	$(MAKE) -C gdbint exampleinstall

gdbint_zipinstall:
	$(MAKE) -C gdbint zipinstall

gdbint_zipsourceinstall:
	$(MAKE) -C gdbint zipsourceinstall

gdbint_zipexampleinstall:
	$(MAKE) -C gdbint zipexampleinstall

gdbint_clean:
	$(MAKE) -C gdbint clean

gdbint_distclean:
	$(MAKE) -C gdbint distclean

gdbint_cleanall:
	$(MAKE) -C gdbint cleanall

gdbint_require:
	$(MAKE) -C gdbint require

gdbint_info:
	$(MAKE) -C gdbint info
endif

# Dir cmem

ifdef OBJECTDIRCMEM
.PHONY:  cmem_all cmem_debug cmem_examples cmem_test cmem_smart cmem_shared cmem_showinstall cmem_install cmem_sourceinstall cmem_exampleinstall cmem_zipinstall cmem_zipsourceinstall cmem_zipexampleinstall cmem_clean cmem_distclean cmem_cleanall cmem_require cmem_info

cmem_all:
	$(MAKE) -C cmem all

cmem_debug:
	$(MAKE) -C cmem debug

cmem_examples:
	$(MAKE) -C cmem examples

cmem_test:
	$(MAKE) -C cmem test

cmem_smart:
	$(MAKE) -C cmem smart

cmem_shared:
	$(MAKE) -C cmem shared

cmem_showinstall:
	$(MAKE) -C cmem showinstall

cmem_install:
	$(MAKE) -C cmem install

cmem_sourceinstall:
	$(MAKE) -C cmem sourceinstall

cmem_exampleinstall:
	$(MAKE) -C cmem exampleinstall

cmem_zipinstall:
	$(MAKE) -C cmem zipinstall

cmem_zipsourceinstall:
	$(MAKE) -C cmem zipsourceinstall

cmem_zipexampleinstall:
	$(MAKE) -C cmem zipexampleinstall

cmem_clean:
	$(MAKE) -C cmem clean

cmem_distclean:
	$(MAKE) -C cmem distclean

cmem_cleanall:
	$(MAKE) -C cmem cleanall

cmem_require:
	$(MAKE) -C cmem require

cmem_info:
	$(MAKE) -C cmem info
endif

# Dir regexpr

ifdef OBJECTDIRREGEXPR
.PHONY:  regexpr_all regexpr_debug regexpr_examples regexpr_test regexpr_smart regexpr_shared regexpr_showinstall regexpr_install regexpr_sourceinstall regexpr_exampleinstall regexpr_zipinstall regexpr_zipsourceinstall regexpr_zipexampleinstall regexpr_clean regexpr_distclean regexpr_cleanall regexpr_require regexpr_info

regexpr_all:
	$(MAKE) -C regexpr all

regexpr_debug:
	$(MAKE) -C regexpr debug

regexpr_examples:
	$(MAKE) -C regexpr examples

regexpr_test:
	$(MAKE) -C regexpr test

regexpr_smart:
	$(MAKE) -C regexpr smart

regexpr_shared:
	$(MAKE) -C regexpr shared

regexpr_showinstall:
	$(MAKE) -C regexpr showinstall

regexpr_install:
	$(MAKE) -C regexpr install

regexpr_sourceinstall:
	$(MAKE) -C regexpr sourceinstall

regexpr_exampleinstall:
	$(MAKE) -C regexpr exampleinstall

regexpr_zipinstall:
	$(MAKE) -C regexpr zipinstall

regexpr_zipsourceinstall:
	$(MAKE) -C regexpr zipsourceinstall

regexpr_zipexampleinstall:
	$(MAKE) -C regexpr zipexampleinstall

regexpr_clean:
	$(MAKE) -C regexpr clean

regexpr_distclean:
	$(MAKE) -C regexpr distclean

regexpr_cleanall:
	$(MAKE) -C regexpr cleanall

regexpr_require:
	$(MAKE) -C regexpr require

regexpr_info:
	$(MAKE) -C regexpr info
endif

# Dir zip

ifdef OBJECTDIRZIP
.PHONY:  zip_all zip_debug zip_examples zip_test zip_smart zip_shared zip_showinstall zip_install zip_sourceinstall zip_exampleinstall zip_zipinstall zip_zipsourceinstall zip_zipexampleinstall zip_clean zip_distclean zip_cleanall zip_require zip_info

zip_all:
	$(MAKE) -C zip all

zip_debug:
	$(MAKE) -C zip debug

zip_examples:
	$(MAKE) -C zip examples

zip_test:
	$(MAKE) -C zip test

zip_smart:
	$(MAKE) -C zip smart

zip_shared:
	$(MAKE) -C zip shared

zip_showinstall:
	$(MAKE) -C zip showinstall

zip_install:
	$(MAKE) -C zip install

zip_sourceinstall:
	$(MAKE) -C zip sourceinstall

zip_exampleinstall:
	$(MAKE) -C zip exampleinstall

zip_zipinstall:
	$(MAKE) -C zip zipinstall

zip_zipsourceinstall:
	$(MAKE) -C zip zipsourceinstall

zip_zipexampleinstall:
	$(MAKE) -C zip zipexampleinstall

zip_clean:
	$(MAKE) -C zip clean

zip_distclean:
	$(MAKE) -C zip distclean

zip_cleanall:
	$(MAKE) -C zip cleanall

zip_require:
	$(MAKE) -C zip require

zip_info:
	$(MAKE) -C zip info
endif

#####################################################################
# Local Makefile
#####################################################################

ifneq ($(wildcard fpcmake.loc),)
include fpcmake.loc
endif

