Keith: Win32 fix: Explicit path to C preprocessor defined for RC rule to fix a problem in Win9x

git-svn-id: trunk@1562 -
This commit is contained in:
lazarus 2002-03-28 23:23:34 +00:00
parent 77d8477875
commit f8ec3dfdf6
2 changed files with 227 additions and 231 deletions

456
Makefile
View File

@ -1,7 +1,8 @@
#
# Don't edit, this file is generated by FPCMake Version 1.1 [2001/12/19]
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/03/25]
#
default: all
MAKEFILETARGETS=win32
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,7 +194,7 @@ 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=lazarus
override PACKAGE_VERSION=0.8a
ifndef LCL_PLATFORM
@ -205,6 +249,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
@ -216,6 +265,9 @@ endif
endif
endif
export INSTALL_PREFIX
ifdef INSTALL_FPCSUBDIR
export INSTALL_FPCSUBDIR
endif
ifndef DIST_DESTDIR
DIST_DESTDIR:=$(BASEDIR)
endif
@ -262,41 +314,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
@ -417,11 +471,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=
@ -693,95 +749,28 @@ else
TAROPT=vz
TAREXT=.tar.gz
endif
ifeq ($(OS_TARGET),linux)
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),go32v2)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
override REQUIRE_PACKAGES=rtl fcl regexpr
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
ifdef REQUIRE_PACKAGES_RTL
PACKAGEDIR_RTL:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR)))))
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/$(OS_TARGET)/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
endif
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)))))
@ -796,19 +785,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)))))
@ -822,101 +810,19 @@ ifdef UNITDIR_PASZLIB
override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB)
endif
endif
ifdef REQUIRE_PACKAGES_INET
PACKAGEDIR_INET:=$(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
else
PACKAGEDIR_INET=
UNITDIR_INET:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /inet/Package.fpc,$(UNITSDIR)))))
ifneq ($(UNITDIR_INET),)
UNITDIR_INET:=$(firstword $(UNITDIR_INET))
else
UNITDIR_INET=
endif
endif
ifdef UNITDIR_INET
override COMPILER_UNITDIR+=$(UNITDIR_INET)
endif
endif
ifdef REQUIRE_PACKAGES_FCL
PACKAGEDIR_FCL:=$(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
else
PACKAGEDIR_FCL=
UNITDIR_FCL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl/Package.fpc,$(UNITSDIR)))))
ifneq ($(UNITDIR_FCL),)
UNITDIR_FCL:=$(firstword $(UNITDIR_FCL))
else
UNITDIR_FCL=
endif
endif
ifdef UNITDIR_FCL
override COMPILER_UNITDIR+=$(UNITDIR_FCL)
endif
endif
ifdef REQUIRE_PACKAGES_REGEXPR
PACKAGEDIR_REGEXPR:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /regexpr/Makefile.fpc,$(PACKAGESDIR)))))
ifneq ($(PACKAGEDIR_REGEXPR),)
PACKAGEDIR_REGEXPR:=$(firstword $(PACKAGEDIR_REGEXPR))
ifeq ($(wildcard $(PACKAGEDIR_REGEXPR)/$(FPCMADE)),)
override COMPILEPACKAGES+=package_regexpr
package_regexpr:
$(MAKE) -C $(PACKAGEDIR_REGEXPR) all
endif
ifneq ($(wildcard $(PACKAGEDIR_REGEXPR)/$(OS_TARGET)),)
UNITDIR_REGEXPR=$(PACKAGEDIR_REGEXPR)/$(OS_TARGET)
else
UNITDIR_REGEXPR=$(PACKAGEDIR_REGEXPR)
endif
else
PACKAGEDIR_REGEXPR=
UNITDIR_REGEXPR:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /regexpr/Package.fpc,$(UNITSDIR)))))
ifneq ($(UNITDIR_REGEXPR),)
UNITDIR_REGEXPR:=$(firstword $(UNITDIR_REGEXPR))
else
UNITDIR_REGEXPR=
endif
endif
ifdef UNITDIR_REGEXPR
override COMPILER_UNITDIR+=$(UNITDIR_REGEXPR)
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)))))
@ -931,19 +837,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)))))
@ -957,7 +862,58 @@ ifdef UNITDIR_IBASE
override COMPILER_UNITDIR+=$(UNITDIR_IBASE)
endif
endif
.PHONY: package_rtl package_paszlib package_inet package_fcl package_regexpr package_mysql package_ibase
ifdef REQUIRE_PACKAGES_FCL
PACKAGEDIR_FCL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_FCL),)
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)))))
ifneq ($(UNITDIR_FCL),)
UNITDIR_FCL:=$(firstword $(UNITDIR_FCL))
else
UNITDIR_FCL=
endif
endif
ifdef UNITDIR_FCL
override COMPILER_UNITDIR+=$(UNITDIR_FCL)
endif
endif
ifdef REQUIRE_PACKAGES_REGEXPR
PACKAGEDIR_REGEXPR:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /regexpr/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_REGEXPR),)
ifneq ($(wildcard $(PACKAGEDIR_REGEXPR)/$(OS_TARGET)),)
UNITDIR_REGEXPR=$(PACKAGEDIR_REGEXPR)/$(OS_TARGET)
else
UNITDIR_REGEXPR=$(PACKAGEDIR_REGEXPR)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_REGEXPR)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_REGEXPR) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_REGEXPR)/$(FPCMADE)
endif
else
PACKAGEDIR_REGEXPR=
UNITDIR_REGEXPR:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /regexpr/Package.fpc,$(UNITSDIR)))))
ifneq ($(UNITDIR_REGEXPR),)
UNITDIR_REGEXPR:=$(firstword $(UNITDIR_REGEXPR))
else
UNITDIR_REGEXPR=
endif
endif
ifdef UNITDIR_REGEXPR
override COMPILER_UNITDIR+=$(UNITDIR_REGEXPR)
endif
endif
ifndef NOCPUDEF
override FPCOPTDEF=$(CPU_TARGET)
endif
@ -1104,16 +1060,17 @@ ifdef TARGET_EXAMPLEDIRS
HASEXAMPLES=1
endif
fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIRS))
.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)
@ -1126,6 +1083,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)
@ -1133,6 +1092,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))
@ -1181,7 +1143,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)
@ -1313,12 +1275,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)
@ -1332,11 +1295,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)
@ -1352,7 +1317,7 @@ fpc_info:
@$(ECHO) Ld........ $(LD)
@$(ECHO) Ar........ $(AR)
@$(ECHO) Rc........ $(RC)
@$(ECHO)
@$(ECHO)
@$(ECHO) Mv........ $(MVPROG)
@$(ECHO) Cp........ $(CPPROG)
@$(ECHO) Rm........ $(RMPROG)
@ -1366,12 +1331,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)
@ -1398,6 +1364,22 @@ 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
TARGET_DIRS_LCL=1
TARGET_DIRS_COMPONENTS=1
ifdef TARGET_DIRS_LCL
@ -1407,6 +1389,8 @@ lcl_debug:
$(MAKE) -C lcl debug
lcl_smart:
$(MAKE) -C lcl smart
lcl_release:
$(MAKE) -C lcl release
lcl_examples:
$(MAKE) -C lcl examples
lcl_shared:
@ -1435,9 +1419,11 @@ lcl_cleanall:
$(MAKE) -C lcl cleanall
lcl_info:
$(MAKE) -C lcl info
lcl_makefiles:
$(MAKE) -C lcl makefiles
lcl:
$(MAKE) -C lcl all
.PHONY: lcl_all lcl_debug lcl_smart lcl_examples lcl_shared lcl_install lcl_sourceinstall lcl_exampleinstall lcl_distinstall lcl_zipinstall lcl_zipsourceinstall lcl_zipexampleinstall lcl_zipdistinstall lcl_clean lcl_distclean lcl_cleanall lcl_info lcl
.PHONY: lcl_all lcl_debug lcl_smart lcl_release lcl_examples lcl_shared lcl_install lcl_sourceinstall lcl_exampleinstall lcl_distinstall lcl_zipinstall lcl_zipsourceinstall lcl_zipexampleinstall lcl_zipdistinstall lcl_clean lcl_distclean lcl_cleanall lcl_info lcl_makefiles lcl
endif
ifdef TARGET_DIRS_COMPONENTS
components_all:
@ -1446,6 +1432,8 @@ components_debug:
$(MAKE) -C components debug
components_smart:
$(MAKE) -C components smart
components_release:
$(MAKE) -C components release
components_examples:
$(MAKE) -C components examples
components_shared:
@ -1474,9 +1462,11 @@ components_cleanall:
$(MAKE) -C components cleanall
components_info:
$(MAKE) -C components info
components_makefiles:
$(MAKE) -C components makefiles
components:
$(MAKE) -C components all
.PHONY: components_all components_debug components_smart components_examples components_shared components_install components_sourceinstall components_exampleinstall components_distinstall components_zipinstall components_zipsourceinstall components_zipexampleinstall components_zipdistinstall components_clean components_distclean components_cleanall components_info components
.PHONY: components_all components_debug components_smart components_release components_examples components_shared components_install components_sourceinstall components_exampleinstall components_distinstall components_zipinstall components_zipsourceinstall components_zipexampleinstall components_zipdistinstall components_clean components_distclean components_cleanall components_info components_makefiles components
endif
TARGET_EXAMPLEDIRS_EXAMPLES=1
ifdef TARGET_EXAMPLEDIRS_EXAMPLES
@ -1486,6 +1476,8 @@ examples_debug:
$(MAKE) -C examples debug
examples_smart:
$(MAKE) -C examples smart
examples_release:
$(MAKE) -C examples release
examples_examples:
$(MAKE) -C examples examples
examples_shared:
@ -1514,12 +1506,15 @@ examples_cleanall:
$(MAKE) -C examples cleanall
examples_info:
$(MAKE) -C examples info
examples_makefiles:
$(MAKE) -C examples makefiles
examples:
$(MAKE) -C examples all
.PHONY: examples_all examples_debug examples_smart examples_examples examples_shared examples_install examples_sourceinstall examples_exampleinstall examples_distinstall examples_zipinstall examples_zipsourceinstall examples_zipexampleinstall examples_zipdistinstall examples_clean examples_distclean examples_cleanall examples_info examples
.PHONY: examples_all examples_debug examples_smart examples_release examples_examples examples_shared examples_install examples_sourceinstall examples_exampleinstall examples_distinstall examples_zipinstall examples_zipsourceinstall examples_zipexampleinstall examples_zipdistinstall examples_clean examples_distclean examples_cleanall examples_info examples_makefiles examples
endif
debug: fpc_debug
smart: fpc_smart
release: fpc_release
examples: fpc_examples $(addsuffix _examples,$(TARGET_DIRS))
shared: $(addsuffix _shared,$(TARGET_DIRS))
install: fpc_install $(addsuffix _install,$(TARGET_DIRS))
@ -1533,14 +1528,15 @@ zipdistinstall: fpc_zipdistinstall $(addsuffix _zipdistinstall,$(TARGET_DIRS))
distclean: fpc_distclean $(addsuffix _distclean,$(TARGET_DIRS))
cleanall: fpc_cleanall $(addsuffix _cleanall,$(TARGET_DIRS))
info: fpc_info
.PHONY: debug smart examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall distclean cleanall info
makefiles: fpc_makefiles
.PHONY: debug smart release examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall distclean cleanall info makefiles
ifneq ($(wildcard fpcmake.loc),)
include fpcmake.loc
endif
.PHONY: lcl components ide tools all clean
.SUFFIXES: .rc .res
%.res: %.rc
windres -i $< -o $@ --preprocessor cpp
windres -i $< -o $@ --preprocessor $(strip $(wildcard $(addsuffix /cpp$(SRCEXEEXT), $(SEARCHPATH))))
ide:
ifeq ($(OS_TARGET), win32)
$(MAKE) lazarus.res

View File

@ -44,7 +44,7 @@ endif
.SUFFIXES: .rc .res
%.res: %.rc
windres -i $< -o $@ --preprocessor cpp
windres -i $< -o $@ --preprocessor $(strip $(wildcard $(addsuffix /cpp$(SRCEXEEXT), $(SEARCHPATH))))
ide:
ifeq ($(OS_TARGET), win32)