MG: fixed makefile

git-svn-id: trunk@1567 -
This commit is contained in:
lazarus 2002-03-29 15:52:53 +00:00
parent 93ebbc28eb
commit ec6a50b270
2 changed files with 252 additions and 95 deletions

View File

@ -2,7 +2,7 @@
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/03/28]
#
default: all
MAKEFILETARGETS=linux
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
override PATH:=$(subst \,/,$(PATH))
ifeq ($(findstring ;,$(PATH)),)
inUnix=1
@ -759,6 +759,78 @@ REQUIRE_PACKAGES_REGEXPR=1
REQUIRE_PACKAGES_MYSQL=1
REQUIRE_PACKAGES_IBASE=1
endif
ifeq ($(OS_TARGET),go32v2)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(OS_TARGET),win32)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
REQUIRE_PACKAGES_MYSQL=1
REQUIRE_PACKAGES_IBASE=1
endif
ifeq ($(OS_TARGET),os2)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(OS_TARGET),freebsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_INET=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
REQUIRE_PACKAGES_MYSQL=1
REQUIRE_PACKAGES_IBASE=1
endif
ifeq ($(OS_TARGET),beos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(OS_TARGET),netbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_INET=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(OS_TARGET),amiga)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(OS_TARGET),atari)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(OS_TARGET),sunos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(OS_TARGET),qnx)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(OS_TARGET),netware)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifdef REQUIRE_PACKAGES_RTL
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/$(OS_TARGET)/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_RTL),)

View File

@ -1,7 +1,8 @@
#
# Don't edit, this file is generated by FPCMake Version 1.1 [2001/12/31]
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/03/28]
#
default: all
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
override PATH:=$(subst \,/,$(PATH))
ifeq ($(findstring ;,$(PATH)),)
inUnix=1
@ -13,10 +14,7 @@ PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
ifeq ($(PWD),)
PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
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
$(error You need the GNU utils package to use this Makefile)
else
PWD:=$(firstword $(PWD))
SRCEXEEXT=
@ -70,6 +68,22 @@ endif
else
BASEDIR=.
endif
ifdef inOS2
ifndef ECHO
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
ifeq ($(ECHO),)
ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
ifeq ($(ECHO),)
ECHO=echo
else
ECHO:=$(firstword $(ECHO))
endif
else
ECHO:=$(firstword $(ECHO))
endif
endif
export ECHO
endif
ifndef FPC
ifdef PP
FPC=$(PP)
@ -93,23 +107,45 @@ ifndef FPC_VERSION
FPC_VERSION:=$(shell $(FPC) -iV)
endif
export FPC FPC_VERSION
unexport CHECKDEPEND ALLDEPENDENCIES
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
COMPILERINFO:=$(shell $(FPC) -iSP -iTP -iSO -iTO)
ifndef CPU_SOURCE
CPU_SOURCE:=$(word 1,$(COMPILERINFO))
endif
ifndef CPU_TARGET
CPU_TARGET:=$(word 2,$(COMPILERINFO))
endif
ifndef OS_SOURCE
OS_SOURCE:=$(word 3,$(COMPILERINFO))
endif
ifndef OS_TARGET
OS_TARGET:=$(word 4,$(COMPILERINFO))
endif
else
ifndef CPU_SOURCE
CPU_SOURCE:=$(shell $(FPC) -iSP)
endif
ifndef CPU_TARGET
CPU_TARGET:=$(shell $(FPC) -iTP)
endif
ifndef CPU_SOURCE
CPU_SOURCE:=$(shell $(FPC) -iSP)
ifndef OS_SOURCE
OS_SOURCE:=$(shell $(FPC) -iSO)
endif
ifndef OS_TARGET
OS_TARGET:=$(shell $(FPC) -iTO)
endif
ifndef OS_SOURCE
OS_SOURCE:=$(shell $(FPC) -iSO)
endif
FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
ifneq ($(FULL_TARGET),$(FULL_SOURCE))
CROSSCOMPILE=1
endif
ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
ifeq ($(findstring $(OS_TARGET),$(MAKEFILETARGETS)),)
$(error The Makefile doesn't support target $(OS_TARGET), please run fpcmake first)
endif
endif
export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE CROSSCOMPILE
ifdef FPCDIR
override FPCDIR:=$(subst \,/,$(FPCDIR))
@ -119,6 +155,14 @@ endif
else
override FPCDIR=wrong
endif
ifdef DEFAULT_FPCDIR
ifeq ($(FPCDIR),wrong)
override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
override FPCDIR=wrong
endif
endif
endif
ifeq ($(FPCDIR),wrong)
ifdef inUnix
override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
@ -150,10 +194,11 @@ endif
else
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
endif
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
override PACKAGE_NAME=codetools
override PACKAGE_VERSION=0.8a
override TARGET_UNITS+=allcodetoolunits
override TARGET_IMPLICITUNITS+=codetoolsstrconsts avl_tree basiccodetools codecache sourcelog customcodetool pascalparsertool finddeclarationtool stdcodetools methodjumptool eventcodetool codecompletiontool codeatom codetree definetemplates expreval keywordfunclists linkscanner sourcechanger fileprocs
override COMPILER_OPTIONS+=-gl
override COMPILER_UNITDIR+=.
override COMPILER_UNITTARGETDIR+=../units
@ -191,6 +236,11 @@ UNIXINSTALLDIR=1
endif
endif
ifndef INSTALL_PREFIX
ifdef PREFIX
INSTALL_PREFIX=$(PREFIX)
endif
endif
ifndef INSTALL_PREFIX
ifdef UNIXINSTALLDIR
INSTALL_PREFIX=/usr/local
else
@ -202,6 +252,9 @@ endif
endif
endif
export INSTALL_PREFIX
ifdef INSTALL_FPCSUBDIR
export INSTALL_FPCSUBDIR
endif
ifndef DIST_DESTDIR
DIST_DESTDIR:=$(BASEDIR)
endif
@ -248,41 +301,43 @@ endif
endif
ifndef INSTALL_SOURCEDIR
ifdef UNIXINSTALLDIR
ifdef BSDhier
SRCPREFIXDIR=share/src
else
SRCPREFIXDIR=src
endif
ifdef INSTALL_FPCPACKAGE
ifdef BSDhier
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/share/src/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
ifdef INSTALL_FPCSUBDIR
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
else
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/src/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
endif
else
ifdef BSDhier
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/share/src/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
else
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/src/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
endif
INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
endif
else
ifdef INSTALL_FPCPACKAGE
ifdef INSTALL_FPCSUBDIR
INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
else
INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
endif
else
INSTALL_SOURCEDIRL:=$(INSTALL_BASEDIR)/source
INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
endif
endif
endif
ifndef INSTALL_DOCDIR
ifdef UNIXINSTALLDIR
ifdef BSDhier
DOCPREFIXDIR=share/doc
else
DOCPREFIXDIR=doc
endif
ifdef INSTALL_FPCPACKAGE
ifdef BSDhier
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/share/doc/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
else
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
endif
else
ifdef BSDhier
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/share/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
else
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
endif
INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
endif
else
ifdef INSTALL_FPCPACKAGE
@ -403,11 +458,13 @@ PPUEXT=.ppo
ASMEXT=.so2
OEXT=.oo2
AOUTEXT=.out
SMARTEXT=.so
SMARTEXT=.sl2
STATICLIBPREFIX=
STATICLIBEXT=.ao2
SHAREDLIBEXT=.dll
FPCMADE=fpcmade.os2
ZIPSUFFIX=emx
ECHO=echo
endif
ifeq ($(OS_TARGET),amiga)
EXEEXT=
@ -679,6 +736,7 @@ else
TAROPT=vz
TAREXT=.tar.gz
endif
override REQUIRE_PACKAGES=rtl fcl
ifeq ($(OS_TARGET),linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
@ -743,20 +801,24 @@ REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
endif
ifdef REQUIRE_PACKAGES_RTL
PACKAGEDIR_RTL:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR)))))
ifneq ($(PACKAGEDIR_RTL),)
PACKAGEDIR_RTL:=$(firstword $(PACKAGEDIR_RTL))
ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
override COMPILEPACKAGES+=package_rtl
package_rtl:
$(MAKE) -C $(PACKAGEDIR_RTL) all
ifeq ($(OS_TARGET),netware)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
endif
ifdef REQUIRE_PACKAGES_RTL
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/$(OS_TARGET)/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_RTL),)
ifneq ($(wildcard $(PACKAGEDIR_RTL)/$(OS_TARGET)),)
UNITDIR_RTL=$(PACKAGEDIR_RTL)/$(OS_TARGET)
else
UNITDIR_RTL=$(PACKAGEDIR_RTL)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_RTL)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
endif
else
PACKAGEDIR_RTL=
UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
@ -771,19 +833,18 @@ override COMPILER_UNITDIR+=$(UNITDIR_RTL)
endif
endif
ifdef REQUIRE_PACKAGES_PASZLIB
PACKAGEDIR_PASZLIB:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR)))))
PACKAGEDIR_PASZLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_PASZLIB),)
PACKAGEDIR_PASZLIB:=$(firstword $(PACKAGEDIR_PASZLIB))
ifeq ($(wildcard $(PACKAGEDIR_PASZLIB)/$(FPCMADE)),)
override COMPILEPACKAGES+=package_paszlib
package_paszlib:
$(MAKE) -C $(PACKAGEDIR_PASZLIB) all
endif
ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/$(OS_TARGET)),)
UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)/$(OS_TARGET)
else
UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_PASZLIB)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_PASZLIB) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_PASZLIB)/$(FPCMADE)
endif
else
PACKAGEDIR_PASZLIB=
UNITDIR_PASZLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Package.fpc,$(UNITSDIR)))))
@ -798,19 +859,18 @@ override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB)
endif
endif
ifdef REQUIRE_PACKAGES_INET
PACKAGEDIR_INET:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /inet/Makefile.fpc,$(PACKAGESDIR)))))
PACKAGEDIR_INET:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /inet/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_INET),)
PACKAGEDIR_INET:=$(firstword $(PACKAGEDIR_INET))
ifeq ($(wildcard $(PACKAGEDIR_INET)/$(FPCMADE)),)
override COMPILEPACKAGES+=package_inet
package_inet:
$(MAKE) -C $(PACKAGEDIR_INET) all
endif
ifneq ($(wildcard $(PACKAGEDIR_INET)/$(OS_TARGET)),)
UNITDIR_INET=$(PACKAGEDIR_INET)/$(OS_TARGET)
else
UNITDIR_INET=$(PACKAGEDIR_INET)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_INET)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_INET) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_INET)/$(FPCMADE)
endif
else
PACKAGEDIR_INET=
UNITDIR_INET:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /inet/Package.fpc,$(UNITSDIR)))))
@ -825,19 +885,18 @@ override COMPILER_UNITDIR+=$(UNITDIR_INET)
endif
endif
ifdef REQUIRE_PACKAGES_FCL
PACKAGEDIR_FCL:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR)))))
PACKAGEDIR_FCL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_FCL),)
PACKAGEDIR_FCL:=$(firstword $(PACKAGEDIR_FCL))
ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),)
override COMPILEPACKAGES+=package_fcl
package_fcl:
$(MAKE) -C $(PACKAGEDIR_FCL) all
endif
ifneq ($(wildcard $(PACKAGEDIR_FCL)/$(OS_TARGET)),)
UNITDIR_FCL=$(PACKAGEDIR_FCL)/$(OS_TARGET)
else
UNITDIR_FCL=$(PACKAGEDIR_FCL)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_FCL)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_FCL) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL)/$(FPCMADE)
endif
else
PACKAGEDIR_FCL=
UNITDIR_FCL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl/Package.fpc,$(UNITSDIR)))))
@ -852,19 +911,18 @@ override COMPILER_UNITDIR+=$(UNITDIR_FCL)
endif
endif
ifdef REQUIRE_PACKAGES_MYSQL
PACKAGEDIR_MYSQL:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /mysql/Makefile.fpc,$(PACKAGESDIR)))))
PACKAGEDIR_MYSQL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /mysql/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_MYSQL),)
PACKAGEDIR_MYSQL:=$(firstword $(PACKAGEDIR_MYSQL))
ifeq ($(wildcard $(PACKAGEDIR_MYSQL)/$(FPCMADE)),)
override COMPILEPACKAGES+=package_mysql
package_mysql:
$(MAKE) -C $(PACKAGEDIR_MYSQL) all
endif
ifneq ($(wildcard $(PACKAGEDIR_MYSQL)/$(OS_TARGET)),)
UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)/$(OS_TARGET)
else
UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_MYSQL)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_MYSQL) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_MYSQL)/$(FPCMADE)
endif
else
PACKAGEDIR_MYSQL=
UNITDIR_MYSQL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /mysql/Package.fpc,$(UNITSDIR)))))
@ -879,19 +937,18 @@ override COMPILER_UNITDIR+=$(UNITDIR_MYSQL)
endif
endif
ifdef REQUIRE_PACKAGES_IBASE
PACKAGEDIR_IBASE:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ibase/Makefile.fpc,$(PACKAGESDIR)))))
PACKAGEDIR_IBASE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ibase/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_IBASE),)
PACKAGEDIR_IBASE:=$(firstword $(PACKAGEDIR_IBASE))
ifeq ($(wildcard $(PACKAGEDIR_IBASE)/$(FPCMADE)),)
override COMPILEPACKAGES+=package_ibase
package_ibase:
$(MAKE) -C $(PACKAGEDIR_IBASE) all
endif
ifneq ($(wildcard $(PACKAGEDIR_IBASE)/$(OS_TARGET)),)
UNITDIR_IBASE=$(PACKAGEDIR_IBASE)/$(OS_TARGET)
else
UNITDIR_IBASE=$(PACKAGEDIR_IBASE)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_IBASE)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_IBASE) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_IBASE)/$(FPCMADE)
endif
else
PACKAGEDIR_IBASE=
UNITDIR_IBASE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /ibase/Package.fpc,$(UNITSDIR)))))
@ -905,7 +962,6 @@ ifdef UNITDIR_IBASE
override COMPILER_UNITDIR+=$(UNITDIR_IBASE)
endif
endif
.PHONY: package_rtl package_paszlib package_inet package_fcl package_mysql package_ibase
ifndef NOCPUDEF
override FPCOPTDEF=$(CPU_TARGET)
endif
@ -1025,24 +1081,26 @@ endif
ifdef TARGET_UNITS
override ALLTARGET+=fpc_units
override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
override INSTALLPPUFILES+=$(UNITPPUFILES)
override CLEANPPUFILES+=$(UNITPPUFILES)
override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
endif
fpc_units: $(UNITPPUFILES)
ifdef TARGET_RSTS
override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
override CLEANRSTFILES+=$(RSTFILES)
endif
.PHONY: fpc_packages fpc_all fpc_smart fpc_debug
$(FPCMADE): $(ALLTARGET)
.PHONY: fpc_all fpc_smart fpc_debug fpc_release
$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
@$(ECHOREDIR) Compiled > $(FPCMADE)
fpc_packages: $(COMPILEPACKAGES)
fpc_all: fpc_packages $(FPCMADE)
fpc_all: $(FPCMADE)
fpc_smart:
$(MAKE) all LINKSMART=1 CREATESMART=1
fpc_debug:
$(MAKE) all DEBUG=1
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
fpc_release:
$(MAKE) all RELEASE=1
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp .rc .res
%$(PPUEXT): %.pp
$(COMPILER) $<
$(EXECPPAS)
@ -1055,6 +1113,8 @@ fpc_debug:
%$(EXEEXT): %.pas
$(COMPILER) $<
$(EXECPPAS)
%.res: %.rc
windres -i $< -o $@
vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
@ -1062,6 +1122,9 @@ vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
ifdef INSTALL_UNITS
override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
endif
ifdef INSTALL_BUILDUNIT
override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
endif
ifdef INSTALLPPUFILES
override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
@ -1110,7 +1173,7 @@ ifdef INSTALL_FILES
endif
fpc_sourceinstall: distclean
$(MKDIR) $(INSTALL_SOURCEDIR)
$(COPYTREE) $(BASEDIR) $(INSTALL_SOURCEDIR)
$(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
ifdef HASEXAMPLES
$(MKDIR) $(INSTALL_EXAMPLEDIR)
@ -1242,12 +1305,13 @@ ifdef CLEANEXEFILES
endif
-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-$(DELTREE) *$(SMARTEXT)
-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
ifdef AOUTEXT
-$(DEL) *$(AOUTEXT)
endif
.PHONY: fpc_info
fpc_info:
.PHONY: fpc_baseinfo
override INFORULES+=fpc_baseinfo
fpc_baseinfo:
@$(ECHO)
@$(ECHO) == Package info ==
@$(ECHO) Package Name..... $(PACKAGE_NAME)
@ -1261,11 +1325,13 @@ fpc_info:
@$(ECHO) Target CPU... $(CPU_TARGET)
@$(ECHO) Source OS.... $(OS_SOURCE)
@$(ECHO) Target OS.... $(OS_TARGET)
@$(ECHO) Full Target.. $(FULL_SOURCE)
@$(ECHO) Full Source.. $(FULL_TARGET)
@$(ECHO) Full Source.. $(FULL_SOURCE)
@$(ECHO) Full Target.. $(FULL_TARGET)
@$(ECHO)
@$(ECHO) == Directory info ==
@$(ECHO)
@$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
@$(ECHO)
@$(ECHO) Basedir......... $(BASEDIR)
@$(ECHO) FPCDir.......... $(FPCDIR)
@$(ECHO) CrossBinDir..... $(CROSSBINDIR)
@ -1295,12 +1361,13 @@ fpc_info:
@$(ECHO)
@$(ECHO) == Object info ==
@$(ECHO)
@$(ECHO) Target Loaders...... $(TARGET_LOADERS)
@$(ECHO) Target Units........ $(TARGET_UNITS)
@$(ECHO) Target Programs..... $(TARGET_PROGRAMS)
@$(ECHO) Target Dirs......... $(TARGET_DIRS)
@$(ECHO) Target Examples..... $(TARGET_EXAMPLES)
@$(ECHO) Target ExampleDirs.. $(TARGET_EXAMPLEDIRS)
@$(ECHO) Target Loaders........ $(TARGET_LOADERS)
@$(ECHO) Target Units.......... $(TARGET_UNITS)
@$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
@$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
@$(ECHO) Target Dirs........... $(TARGET_DIRS)
@$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
@$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
@$(ECHO)
@$(ECHO) Clean Units......... $(CLEAN_UNITS)
@$(ECHO) Clean Files......... $(CLEAN_FILES)
@ -1327,8 +1394,25 @@ fpc_info:
@$(ECHO) Dist destination dir. $(DIST_DESTDIR)
@$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
@$(ECHO)
.PHONY: fpc_info
fpc_info: $(INFORULES)
.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
fpc_makefile_dirs
fpc_makefile:
$(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
fpc_makefile_sub1:
ifdef TARGET_DIRS
$(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
endif
ifdef TARGET_EXAMPLEDIRS
$(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
endif
fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
fpc_makefiles: fpc_makefile fpc_makefile_dirs
debug: fpc_debug
smart: fpc_smart
release: fpc_release
examples:
shared:
install: fpc_install
@ -1343,7 +1427,8 @@ clean: fpc_clean
distclean: fpc_distclean
cleanall: fpc_cleanall
info: fpc_info
.PHONY: debug smart examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info
makefiles: fpc_makefiles
.PHONY: debug smart release examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
ifneq ($(wildcard fpcmake.loc),)
include fpcmake.loc
endif