2003-07-09 00:59:57 +02:00
|
|
|
#
|
2008-05-07 18:34:47 +02:00
|
|
|
# The contents of this file are subject to the Initial
|
|
|
|
# Developer's Public License Version 1.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
|
|
|
# http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed AS IS,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing rights
|
|
|
|
# and limitations under the License.
|
|
|
|
#
|
|
|
|
# The Original Code was created by Mark O'Donohue
|
|
|
|
# for the Firebird Open Source RDBMS project.
|
|
|
|
#
|
|
|
|
# Copyright (c) Mark O'Donohue <mark.odonohue@ludwig.edu.au>
|
|
|
|
# and all contributors signed below.
|
|
|
|
#
|
|
|
|
# All Rights Reserved.
|
|
|
|
# Contributor(s): ______________________________________.
|
2003-07-09 00:59:57 +02:00
|
|
|
#
|
2022-08-30 13:47:47 +02:00
|
|
|
#
|
2003-07-09 00:59:57 +02:00
|
|
|
#
|
|
|
|
ROOT=..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include $(ROOT)/gen/make.defaults
|
|
|
|
include $(ROOT)/gen/make.platform
|
|
|
|
include $(ROOT)/gen/make.rules
|
|
|
|
include $(ROOT)/gen/make.shared.variables
|
|
|
|
|
|
|
|
|
|
|
|
@SET_MAKE@
|
|
|
|
|
2011-01-17 18:38:25 +01:00
|
|
|
.PHONY: install dist packages tarfile
|
2004-01-29 07:32:09 +01:00
|
|
|
.PHONY: buildTarDir buildImageDir buildRoot buildDebugInfo
|
2003-07-09 00:59:57 +02:00
|
|
|
|
|
|
|
# Some of these targets are run from the root tree of the build.
|
|
|
|
# those need to know where the install subdirectory is kept.
|
|
|
|
# Others are run locally these need to know the path back to the
|
|
|
|
# root of the build tree.
|
|
|
|
|
|
|
|
BuildRoot=$(GEN_ROOT)
|
|
|
|
|
|
|
|
InstallRoot=.
|
|
|
|
|
|
|
|
BuildVersion=$(FirebirdVersion).$(BuildNum)
|
|
|
|
|
|
|
|
Version=$(BuildVersion)-$(PackageVersion)
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-27 16:55:14 +01:00
|
|
|
# This means something like: FirebirdCS-*.0.0-*.i386.tar.gz
|
2003-07-09 00:59:57 +02:00
|
|
|
|
2022-08-30 13:47:47 +02:00
|
|
|
TarDir=Firebird-$(Version)-linux-$(CpuType)
|
|
|
|
TarFile=Firebird-$(Version)-linux-$(CpuType).tar.gz
|
|
|
|
DebugDir=Firebird-$(Version)-linux-$(CpuType)-debugSymbols
|
|
|
|
DebugFile=Firebird-$(Version)-linux-$(CpuType)-debugSymbols.tar.gz
|
2003-07-09 00:59:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
PkgSrcDir=$(InstallRoot)/$(ArchType)
|
2016-09-15 14:21:54 +02:00
|
|
|
fb_install_prefix=@prefix@
|
|
|
|
MiscDir=$(shell echo @FB_MISCDIR@)
|
2013-11-28 17:37:00 +01:00
|
|
|
DebugManifest=manifest_debug.txt
|
2003-07-09 00:59:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
TarInstallDir=$(GEN_ROOT)/install
|
|
|
|
|
2008-01-09 16:47:45 +01:00
|
|
|
#Curses library
|
|
|
|
TermLib=@TERMLIB@.so
|
2003-07-09 00:59:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
dist : packages
|
|
|
|
|
2011-01-17 18:38:25 +01:00
|
|
|
packages: tarfile debugfile
|
2003-07-09 00:59:57 +02:00
|
|
|
|
|
|
|
tarfile: $(TarFile)
|
|
|
|
|
|
|
|
$(TarFile) : buildTarDir
|
|
|
|
(cd $(GEN_ROOT); tar -czf $(TarFile) $(TarDir))
|
|
|
|
|
2003-12-30 03:06:13 +01:00
|
|
|
debugfile: $(DebugFile)
|
2003-07-09 00:59:57 +02:00
|
|
|
|
2003-12-30 03:06:13 +01:00
|
|
|
$(DebugFile) : buildImageDir
|
2013-11-28 17:37:00 +01:00
|
|
|
(cd $(GEN_ROOT)/$(DebugDir); tar -czf ../$(DebugFile) .)
|
2003-12-30 03:06:13 +01:00
|
|
|
|
2004-01-29 07:32:09 +01:00
|
|
|
buildRoot:
|
2003-07-09 00:59:57 +02:00
|
|
|
(cd $(GEN_ROOT); ./install/makeInstallImage.sh)
|
2004-01-29 07:32:09 +01:00
|
|
|
|
|
|
|
buildDebugInfo: buildRoot
|
2003-12-30 03:06:13 +01:00
|
|
|
mkdir -p $(GEN_ROOT)/$(DebugDir)
|
|
|
|
for x in `(cd $(GEN_ROOT)/buildroot; find)`; do \
|
|
|
|
FIL=$(GEN_ROOT)/buildroot/$$x; \
|
|
|
|
D_FIL=$(GEN_ROOT)/$(DebugDir)/`dirname $${x}`/.debug/`basename $${x}`.debug; \
|
2022-09-24 02:25:52 +02:00
|
|
|
if [ ! -h $$FIL ] && $(READELF) -h $$FIL > /dev/null 2> /dev/null; then \
|
2003-12-30 03:06:13 +01:00
|
|
|
mkdir -p $(GEN_ROOT)/$(DebugDir)/`dirname $$x`/.debug; \
|
|
|
|
echo Generating external debug info for $$x; \
|
2004-04-06 04:45:54 +02:00
|
|
|
cp $${FIL} $${D_FIL}; \
|
2022-09-24 02:25:52 +02:00
|
|
|
$(OBJCOPY) --add-gnu-debuglink=$${D_FIL} $${FIL}; \
|
2003-12-30 03:06:13 +01:00
|
|
|
echo Stripping unneeded symbols from $${x}; \
|
2022-09-24 02:25:52 +02:00
|
|
|
$(OBJCOPY) --strip-debug --strip-unneeded $${FIL}; \
|
2003-12-30 03:06:13 +01:00
|
|
|
fi; \
|
|
|
|
done
|
2013-11-28 17:37:00 +01:00
|
|
|
(cd $(GEN_ROOT)/$(DebugDir); mkdir -p ./$(MiscDir); \
|
|
|
|
find . -type f -name '*.debug' -print >./$(MiscDir)/$(DebugManifest))
|
2003-07-09 00:59:57 +02:00
|
|
|
|
2004-01-29 07:32:09 +01:00
|
|
|
# Use this line if you don't want to use separate debug info
|
|
|
|
#buildImageDir: buildRoot
|
|
|
|
buildImageDir: buildDebugInfo
|
|
|
|
|
2003-07-09 00:59:57 +02:00
|
|
|
|
|
|
|
buildTarDir: buildImageDir
|
|
|
|
mkdir -p $(GEN_ROOT)/$(TarDir)
|
2016-09-15 14:21:54 +02:00
|
|
|
cp -r $(GEN_ROOT)/install/install.sh $(GEN_ROOT)/$(TarDir)
|
|
|
|
chmod a+x $(GEN_ROOT)/$(TarDir)/*.sh
|
2003-07-09 00:59:57 +02:00
|
|
|
(cd $(GEN_ROOT)/$(TarDir); tar -C ../buildroot -czf buildroot.tar.gz . )
|
|
|
|
(cd $(GEN_ROOT)/$(TarDir); tar -tzf buildroot.tar.gz > manifest.txt )
|
|
|
|
|
|
|
|
|
|
|
|
install: buildTarDir
|
2011-10-06 11:31:22 +02:00
|
|
|
(cd $(GEN_ROOT)/$(TarDir); FIREBIRD= FIREBIRD_LOCK= ./install.sh)
|
|
|
|
cp -r $(GEN_ROOT)/$(DebugDir)/* /
|
|
|
|
|
|
|
|
silent_install: buildTarDir
|
|
|
|
(cd $(GEN_ROOT)/$(TarDir); FIREBIRD= FIREBIRD_LOCK= ./install.sh -silent)
|
2003-12-30 03:06:13 +01:00
|
|
|
cp -r $(GEN_ROOT)/$(DebugDir)/* /
|