2002-07-29 17:04:06 +02:00
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
# You may obtain a copy of the Licence at
|
|
|
|
# http://www.gnu.org/licences/lgpl.html
|
2009-12-04 11:05:41 +01:00
|
|
|
#
|
2002-07-29 17:04:06 +02:00
|
|
|
# As a special exception this file can also be included in modules
|
2009-12-04 11:05:41 +01:00
|
|
|
# with other source code as long as that source code has been
|
|
|
|
# released under an Open Source Initiative certificed licence.
|
|
|
|
# More information about OSI certification can be found at:
|
|
|
|
# http://www.opensource.org
|
|
|
|
#
|
2002-07-29 17:04:06 +02:00
|
|
|
# This module is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public Licence for more details.
|
2009-12-04 11:05:41 +01:00
|
|
|
#
|
|
|
|
# This module was created by members of the firebird development
|
|
|
|
# team. All individual contributions remain the Copyright (C) of
|
|
|
|
# those individuals and all rights are reserved. Contributors to
|
|
|
|
# this file are either listed below or can be obtained from a CVS
|
2002-07-29 17:04:06 +02:00
|
|
|
# history command.
|
|
|
|
#
|
|
|
|
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
2009-12-04 11:05:41 +01:00
|
|
|
#
|
2002-07-29 17:04:06 +02:00
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
ROOT=..
|
|
|
|
|
2003-03-27 12:21:47 +01:00
|
|
|
include $(ROOT)/gen/make.defaults
|
2002-09-19 17:25:38 +02:00
|
|
|
include $(ROOT)/gen/make.platform
|
2002-07-29 17:04:06 +02:00
|
|
|
include $(ROOT)/gen/make.rules
|
|
|
|
include $(ROOT)/gen/make.shared.variables
|
|
|
|
|
|
|
|
@SET_MAKE@
|
|
|
|
|
|
|
|
ISC_USER= sysdba
|
|
|
|
ISC_PASSWORD= masterkey
|
|
|
|
#LD_LIBRARY_PATH=/home/odonohue/src/firebird2/gen/firebird/lib:/usr/lib
|
|
|
|
TEST_PATH = @FIREBIRD_BUILD_DIR@
|
2002-12-29 15:59:40 +01:00
|
|
|
# Firebird libs path set at link time (-R) so do not override local requirements - nmcc 28/12/2002
|
|
|
|
#LD_LIBRARY_PATH=$(RealFirebirdPath)/lib
|
2005-05-28 00:45:31 +02:00
|
|
|
LD_LIBRARY_PATH=$(LIB)
|
2010-05-18 15:32:30 +02:00
|
|
|
FIREBIRD_BOOT_BUILD=1
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2002-08-05 09:14:54 +02:00
|
|
|
#export ISC_USER
|
|
|
|
#export ISC_PASSWORD
|
2002-07-29 17:04:06 +02:00
|
|
|
#export INTERBASE
|
|
|
|
export FIREBIRD
|
|
|
|
export DYLD_FRAMEWORK_PATH
|
2005-05-28 00:45:31 +02:00
|
|
|
export LD_LIBRARY_PATH
|
2010-05-18 15:32:30 +02:00
|
|
|
export FIREBIRD_BOOT_BUILD
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2009-04-09 11:57:02 +02:00
|
|
|
CPU = 1
|
|
|
|
CPU_OPTION = -j$(CPU)
|
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
######################################################################
|
|
|
|
########### Build process overview #################################
|
|
|
|
#
|
|
|
|
# Firebird2 has brought with it a new build process. This extended
|
|
|
|
# comment should help explain that process. Keep in mind there are
|
|
|
|
# a number of artifacts left in the makefiles from the previous build
|
|
|
|
# processes.
|
|
|
|
#
|
|
|
|
# The build process starts by building a bootstrap version of gpre.
|
|
|
|
# This is possible because of a special version of gpre_meta.cpp,
|
|
|
|
# gpre_meta_boot.cpp. It is a copy of the gpre_meta.epp file with all
|
|
|
|
# the embeded commands removed. There are pregenerated copy of the
|
2004-05-10 09:21:09 +02:00
|
|
|
# iberror.h and related files in the source tree. These are used for the
|
2002-07-29 17:04:06 +02:00
|
|
|
# entire build process. In the future we should check for the ability
|
2004-05-10 09:21:09 +02:00
|
|
|
# to regenerate iberror.h and friends (ie, a working FB install) and only
|
2002-07-29 17:04:06 +02:00
|
|
|
# use the static files as a last resort.
|
|
|
|
#
|
|
|
|
# The bootstrap version of gpre (gpre_boot) is used to build all the
|
2010-07-15 02:47:24 +02:00
|
|
|
# engine file.
|
2002-07-29 17:04:06 +02:00
|
|
|
# During this phase of the build process the limited version of alt.bin
|
|
|
|
# is used. The full version of alt.bin is compiled later in the build
|
|
|
|
# process after the security database is available. After the
|
|
|
|
# (hopefully pending) redesign of FB security the security database
|
|
|
|
# dependancies should go away.
|
|
|
|
#
|
|
|
|
# The engine objects are placed in the jrd_static.a archive. This archive
|
|
|
|
# contains all the objects needed to create statically linked programs.
|
|
|
|
# A fully functional version of gpre, gpre_static, is then generated
|
|
|
|
# using jrd_static.a. I choose to statically link the few utilities
|
|
|
|
# required to build FB to avoid possible shared library symbol conflicts.
|
|
|
|
#
|
|
|
|
# All of the aforementioned work is done in the
|
|
|
|
# first phase of the compilation. I called it the first phase because
|
2004-05-10 09:21:09 +02:00
|
|
|
# none of the work (except iberror.h and friends) requires database access.
|
2002-07-29 17:04:06 +02:00
|
|
|
# Phase 2 builds all the tools necessary to compile the rest of FB. Those
|
2003-03-05 17:19:08 +01:00
|
|
|
# tools are gbak and the gds.$(SHRLIB_EXT) shared library.
|
2002-07-29 17:04:06 +02:00
|
|
|
#
|
|
|
|
# The .epp files in gbak require the yachts.lnk database. But the only
|
|
|
|
# thing the database is used for is the metadata, so an empty database
|
|
|
|
# will do the job. The create_db program is a small c API utility that
|
|
|
|
# creates an empty database. This utility is statically linked.
|
|
|
|
# Once there is an empty database gbak_static is built. gbak_static is
|
|
|
|
# used later on in the compilation process to restore build databases.
|
|
|
|
#
|
2003-03-05 17:19:08 +01:00
|
|
|
# After gbak_static is built the gds.$(SHRLIB_EXT) library is built. This library is
|
2003-02-24 10:52:33 +01:00
|
|
|
# still missing the security functionality.
|
2002-07-29 17:04:06 +02:00
|
|
|
#
|
|
|
|
# Now we are on phase 3, building the actual DB tools. This is as expected.
|
|
|
|
# We build all tools and link them against the shared library, including
|
2003-03-05 17:19:08 +01:00
|
|
|
# gpre, gbak, and the fully functional gds.$(SHRLIB_EXT).
|
2002-07-29 17:04:06 +02:00
|
|
|
#
|
|
|
|
# John Belardo ~ July 2001
|
|
|
|
#
|
2009-12-04 11:05:41 +01:00
|
|
|
# In the tradition of makefiles, they have evolved even further. But most of
|
|
|
|
# the above is still applies. There now tends to be a Makefile for each
|
2002-07-29 17:04:06 +02:00
|
|
|
# target rather than the more traditional Makefile per directory model.
|
|
|
|
# This was needed to enable super to build corrently. But it also allowed
|
|
|
|
# some of the boot build process to be done simpler as well.
|
|
|
|
# MOD 28-July-2002
|
|
|
|
#
|
|
|
|
########### And now on with the show............
|
|
|
|
#################################################################
|
|
|
|
|
|
|
|
|
|
|
|
#__________________________________________________________________________
|
|
|
|
#
|
2009-12-04 11:05:41 +01:00
|
|
|
# This is the main target for the make. The targets are
|
2002-07-29 17:04:06 +02:00
|
|
|
# firebird_embedded and firebird_server. Or as they used to be known
|
|
|
|
# firebird_classic and firebird_super.
|
|
|
|
|
|
|
|
# (The .PHONY: stuff just means it's a fake target, and make wont go searching
|
2009-12-04 11:05:41 +01:00
|
|
|
# for a real file or directory - but there are a lot of them here
|
2002-07-29 17:04:06 +02:00
|
|
|
# MOD 28-July-2002)
|
2009-12-04 11:05:41 +01:00
|
|
|
.PHONY: all firebird firebird_boot firebird_basic
|
2002-07-29 17:04:06 +02:00
|
|
|
.PHONY: firebird_embedded firebird_server classic_programs super_programs
|
2006-04-19 13:45:05 +02:00
|
|
|
.PHONY: firebird_super firebird_classic btyacc_binary
|
2010-07-23 14:04:18 +02:00
|
|
|
.PHONY: plugins2
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
|
2002-10-07 03:29:13 +02:00
|
|
|
# The main targets are firebird_embedded or firebird_server
|
|
|
|
# or their older names _classic or _super.
|
2009-12-04 11:05:41 +01:00
|
|
|
# The following target is expanded by autoconf process to
|
2002-10-07 03:29:13 +02:00
|
|
|
# either _classic or _super.
|
|
|
|
|
|
|
|
|
2007-03-09 11:32:58 +01:00
|
|
|
firebird : firebird_@FIREBIRD_ARCH_TYPE@ $(PLATFORM_POSTBUILD_TARGET)
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2010-07-23 14:04:18 +02:00
|
|
|
firebird_classic firebird_embedded: firebird_basic classic_targets plugins2
|
|
|
|
firebird_super firebird_server: firebird_basic super_targets plugins2
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-04 11:05:41 +01:00
|
|
|
# In building embedded/server version some targets are common, mainly the
|
2005-03-05 02:44:38 +01:00
|
|
|
# boot kit, security2.fdb database and messages files. Boot builds a number of
|
2009-12-04 11:05:41 +01:00
|
|
|
# static programs gpre_static gbak_static isql_static though an involved
|
2002-07-29 17:04:06 +02:00
|
|
|
# process. These are used to compile the rest of the source, as it saves
|
|
|
|
# some complications particularly for super in needing to start the server
|
|
|
|
# that you are currently building. MOD 28-July-2002
|
|
|
|
|
2010-03-14 14:44:57 +01:00
|
|
|
firebird_basic: btyacc_binary external_libraries export_lists firebird_boot basic_targets
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2009-12-04 11:05:41 +01:00
|
|
|
firebird_boot: updateBuildNum boot_phase1 boot_phase2
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# jrd/build_no.h contains the version and build# fields used throughout the
|
|
|
|
# program and quoted in the tools. This routine will update the build_no.h
|
|
|
|
# file with the auto update build# script file, writeBuildNum.sh. The
|
|
|
|
# writeBuildNum.sh script is autoupdated by CVS checkins.
|
|
|
|
#
|
|
|
|
|
2010-03-14 14:44:57 +01:00
|
|
|
.PHONY: updateBuildNum external_libraries export_lists
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2003-07-08 03:05:22 +02:00
|
|
|
updateBuildNum : jrd/build_no.h $(GEN_ROOT)/Make.Version
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2003-07-08 14:24:12 +02:00
|
|
|
jrd/build_no.h : $(SRC_ROOT)/misc/writeBuildNum.sh
|
2002-07-29 17:04:06 +02:00
|
|
|
(cd ..; ./src/misc/writeBuildNum.sh rebuildHeader)
|
|
|
|
|
2003-07-08 14:24:12 +02:00
|
|
|
$(GEN_ROOT)/Make.Version : $(SRC_ROOT)/misc/writeBuildNum.sh
|
|
|
|
$(SRC_ROOT)/misc/writeBuildNum.sh createMakeVersion $@
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2002-10-07 03:29:13 +02:00
|
|
|
|
2009-12-04 11:05:41 +01:00
|
|
|
#
|
|
|
|
# Libraries that come from outside the project but are built
|
|
|
|
# as part of the project are included here. Currently IBM ICU and
|
2005-05-29 17:27:08 +02:00
|
|
|
# editline are the only externals libraries we have included.
|
2009-12-04 11:05:41 +01:00
|
|
|
#
|
2002-10-07 03:29:13 +02:00
|
|
|
|
2005-06-10 12:32:51 +02:00
|
|
|
external_libraries:
|
2007-04-03 10:25:55 +02:00
|
|
|
ifeq ($(STD_ICU),false)
|
2008-01-10 11:06:22 +01:00
|
|
|
$(MAKE) CFLAGS="@CFLAGS@" -f $(GEN_ROOT)/Makefile.extern.icu
|
2007-04-03 10:25:55 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(STD_EDITLINE),false)
|
2005-06-10 12:32:51 +02:00
|
|
|
ifeq ($(EDITLINE_FLG),Y)
|
2009-04-22 16:02:26 +02:00
|
|
|
$(MAKE) CFLAGS="@CFLAGS@" $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.extern.editline
|
2005-06-10 12:32:51 +02:00
|
|
|
endif
|
2007-04-03 10:25:55 +02:00
|
|
|
endif
|
2002-10-07 03:29:13 +02:00
|
|
|
|
2006-04-19 13:45:05 +02:00
|
|
|
btyacc_binary: $(BTYACC)
|
|
|
|
|
2009-12-04 11:05:41 +01:00
|
|
|
$(BTYACC):
|
2006-04-19 13:45:05 +02:00
|
|
|
$(MAKE) -C $(ROOT)/extern/btyacc
|
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
# Phase1: make a gpre_static from scratch so we can parse .e and .epp files
|
|
|
|
# to build the rest of the system. It goes in two bits make a real simple
|
|
|
|
# gpre_boot one and use that to build a gpre_static one.
|
|
|
|
#
|
|
|
|
# gpre_static has a fair bit more in it and we have now actually built most
|
|
|
|
# of the libraries. With gpre_static we now have enough to build gbak and
|
|
|
|
# start restoring databases.
|
|
|
|
#
|
|
|
|
# if $(BIN)/gpre_static exists then phase1 is complete. phase1 does not then
|
|
|
|
# rebuild automatically gpre_static if some of it's dependancies change. We
|
|
|
|
# only need on gpre_static to boot after we have one we don't care.
|
|
|
|
# (If you really want to rebuild it you need to remove the executable file
|
|
|
|
# $(BIN)/gpre_static).
|
|
|
|
#
|
|
|
|
.PHONY: boot_phase1 boot_phase1_build
|
2005-12-18 18:56:17 +01:00
|
|
|
.PHONY: libfbstatic gpre_boot gpre_static
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
boot_phase1: $(GPRE_STATIC)
|
|
|
|
|
|
|
|
$(GPRE_STATIC):
|
|
|
|
$(MAKE) boot_phase1_build
|
|
|
|
|
2008-01-16 11:36:35 +01:00
|
|
|
boot_phase1_build: gpre_boot libfbstatic gpre_static
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2002-10-07 03:29:13 +02:00
|
|
|
|
2002-08-05 09:14:54 +02:00
|
|
|
gpre_boot:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.boot.gpre $@
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2002-08-05 09:14:54 +02:00
|
|
|
libfbstatic:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.libfbstatic $@
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2002-08-05 09:14:54 +02:00
|
|
|
gpre_static:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.static.gpre $@
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2002-10-29 21:20:44 +01:00
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
#Phase2: We can now start build some of the static utilities needed to build
|
|
|
|
# an empty database (lock manager and create_db). Then we rebuild all the
|
|
|
|
# items we have built in the static library into a dynamic library.
|
|
|
|
# (It's probably possible to directly build the dynamic library - but thats
|
|
|
|
# for another day). We still don't have the security database stuff.
|
|
|
|
#
|
2005-03-05 02:44:38 +01:00
|
|
|
# Phase2 is complete with the building of an security2.fdb user store database
|
2009-12-04 11:05:41 +01:00
|
|
|
# in order to do that isql tool needs to be built without security
|
2002-07-29 17:04:06 +02:00
|
|
|
# to do that a special alt_boot.o is inserted into the shared library.
|
2005-03-05 02:44:38 +01:00
|
|
|
# Again once security2.fdb is built then were not too worried about the
|
2003-02-10 12:01:23 +01:00
|
|
|
# components (in fact some of them have to be rebuilt again to incorperate
|
|
|
|
# the security module)
|
2002-07-29 17:04:06 +02:00
|
|
|
#
|
|
|
|
|
2003-04-07 12:14:17 +02:00
|
|
|
.PHONY: create_db empty_db gbak_static isql_static ref_databases
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2005-12-18 18:56:17 +01:00
|
|
|
boot_phase2 : libfbstatic $(ISC_GDB)
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2008-01-16 11:36:35 +01:00
|
|
|
$(ISC_GDB): create_db empty_db gbak_static isql_static ref_databases
|
|
|
|
|
|
|
|
create_db:
|
|
|
|
$(MAKE) -f $(GEN_ROOT)/Makefile.embed.util $(CREATE_DB)
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2007-07-25 15:13:47 +02:00
|
|
|
gbak_static:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.static.gbak
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2007-07-25 15:13:47 +02:00
|
|
|
isql_static:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.static.isql
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2002-08-05 09:14:54 +02:00
|
|
|
empty_db :
|
2003-07-08 03:05:22 +02:00
|
|
|
$(MAKE) -f $(GEN_ROOT)/Makefile.refDatabases $@
|
2002-08-05 09:14:54 +02:00
|
|
|
|
2004-05-01 01:02:07 +02:00
|
|
|
ref_databases : $(GBAK_STATIC)
|
2003-07-08 03:05:22 +02:00
|
|
|
$(MAKE) -f $(GEN_ROOT)/Makefile.refDatabases $@
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
|
2009-12-04 11:05:41 +01:00
|
|
|
security2.fdb: isql # build the security database
|
2002-07-29 17:04:06 +02:00
|
|
|
$(MAKE) -C utilities $@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
#Phase3: Now we start building the tools we are actually going to use
|
|
|
|
# against the shared library.
|
|
|
|
# an empty database (lock manager and create_db). Then we rebuild all the
|
|
|
|
# items we have built in the static library into a dynamic library.
|
|
|
|
# (It's probably possible to directly build the dynamic library - but thats
|
|
|
|
# for another day). We still don't have the security database stuff.
|
|
|
|
#
|
|
|
|
# Notes:
|
2009-12-04 11:05:41 +01:00
|
|
|
# mainly we need isql to be able to build security2.fdb. I wonder
|
2005-03-05 02:44:38 +01:00
|
|
|
# if we could reduce the tricky dependancy by restoring the security2.fdb
|
2003-02-10 12:01:23 +01:00
|
|
|
# database earlier, then perhaps we could build the jrdlib in one step and
|
|
|
|
# include the security bits and pieces.
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2009-10-21 02:42:38 +02:00
|
|
|
.PHONY: ref_databases msgs msgs_intl generated_headers intl extlib plugins includes
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2005-12-18 18:56:17 +01:00
|
|
|
basic_targets: ref_databases msgs msgs_intl generated_headers \
|
2009-10-21 02:42:38 +02:00
|
|
|
intl extlib plugins includes examples_cp
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2002-10-29 21:20:44 +01:00
|
|
|
# hack to make code regeneration work
|
|
|
|
generated_headers :
|
2003-07-08 03:05:22 +02:00
|
|
|
$(MAKE) -f $(GEN_ROOT)/Makefile.codes $@
|
2002-10-29 21:20:44 +01:00
|
|
|
|
2002-09-20 12:23:15 +02:00
|
|
|
msgs: # messages file for user $(FIREBIRD)/firebird.msg
|
2003-07-08 03:05:22 +02:00
|
|
|
$(MAKE) -f $(GEN_ROOT)/Makefile.msgs $@
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
msgs_intl: # international version of msgs file
|
2003-07-08 03:05:22 +02:00
|
|
|
$(MAKE) -f $(GEN_ROOT)/Makefile.msgs $@
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
intl: # international lang components $(FIREBIRD)/intl/
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.intl
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
extlib: # external programs than can be called
|
2003-07-08 03:05:22 +02:00
|
|
|
$(MAKE) -f $(GEN_ROOT)/Makefile.extlib
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2009-10-21 02:42:38 +02:00
|
|
|
plugins: # plugins
|
|
|
|
$(MAKE) -f $(GEN_ROOT)/Makefile.plugins
|
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
# distribution header include files
|
2009-12-04 11:05:41 +01:00
|
|
|
includes: include_generic
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
# examples still need a good makefile to ship with them
|
2003-07-11 15:31:08 +02:00
|
|
|
examples_cp:
|
2003-08-04 01:18:57 +02:00
|
|
|
$(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
#_ Embedded Firebird Targets (Classic)_______________________________________
|
|
|
|
|
2010-04-15 16:40:27 +02:00
|
|
|
.PHONY: libfbembed fb_smp_server embed_gfix embed_gbak embed_isql
|
2002-07-29 17:04:06 +02:00
|
|
|
.PHONY: embed_gpre embed_util
|
|
|
|
|
2010-04-15 16:40:27 +02:00
|
|
|
classic_targets: $(PLAT_CLASSIC_PRE_TARGET) libfbembed fb_smp_server embed_gfix embed_gbak embed_isql \
|
2009-12-04 11:05:41 +01:00
|
|
|
embed_gpre libfbclient embed_util embed_qli embed_fbudf $(PLAT_CLASSIC_POST_TARGET)
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
libfbembed:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.libfbembed $@
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2008-02-28 19:42:30 +01:00
|
|
|
fb_smp_server:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.smp_server
|
2008-02-28 19:42:30 +01:00
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
embed_gfix:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.embed.gfix
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
embed_gbak:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.embed.gbak
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
embed_isql:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.embed.isql
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
embed_gpre:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.embed.gpre
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
embed_util:
|
2009-12-04 11:05:41 +01:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.embed.util
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
embed_qli:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.embed.qli
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2003-09-28 01:29:07 +02:00
|
|
|
embed_fbudf:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.embed.fbudf
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
#_ Firebird Server Targets (super and super client)__________________________
|
|
|
|
|
2009-12-04 11:05:41 +01:00
|
|
|
.PHONY: fbserver
|
2003-09-28 01:29:07 +02:00
|
|
|
.PHONY: libfbclient client_gfix client_gbak client_isql client_gpre client_util client_fbudf
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2007-06-11 16:21:33 +02:00
|
|
|
super_targets: $(PLAT_SUPER_PRE_TARGET) fbserver libfbclient client_gfix client_gbak client_gsec\
|
2009-12-04 11:05:41 +01:00
|
|
|
client_isql client_gpre client_util client_fbudf client_qli $(PLAT_SUPER_POST_TRAGET)
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
fbserver:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.fbserver $@
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
libfbclient:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.libfbclient $@
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
client_gfix:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.client.gfix
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
client_gbak:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.client.gbak
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2004-11-07 14:47:05 +01:00
|
|
|
client_gsec:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.client.gsec
|
2004-11-07 14:47:05 +01:00
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
client_gpre:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.client.gpre
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
client_isql:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.client.isql
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
client_util:
|
2009-12-04 11:05:41 +01:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.client.util
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2003-09-28 01:29:07 +02:00
|
|
|
client_fbudf:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.client.fbudf
|
2003-09-28 01:29:07 +02:00
|
|
|
|
2009-12-04 11:05:41 +01:00
|
|
|
# Not sure we need this target in super
|
2002-10-07 03:29:13 +02:00
|
|
|
# MOD 04-Oct-2002
|
|
|
|
|
2003-10-20 03:45:06 +02:00
|
|
|
client_qli:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.client.qli
|
2003-10-20 03:45:06 +02:00
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
#sysdba_user gstat: # add sysdba user and build gstat program
|
|
|
|
# $(MAKE) -C utilities $@
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-03 13:03:25 +01:00
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
2010-07-23 14:04:18 +02:00
|
|
|
plugins2:
|
2009-04-09 11:57:02 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.fbtrace
|
2010-07-23 14:04:18 +02:00
|
|
|
$(MAKE) $(CPU_OPTION) -f $(GEN_ROOT)/Makefile.user.management
|
2009-02-03 13:03:25 +01:00
|
|
|
|
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# This target builds the include files for disttribution with the release
|
|
|
|
# Some of the files differ from the ones used internally to compile the
|
|
|
|
# software - mainly they are just flattened out to make the view simpler
|
|
|
|
# from an external point of view.
|
|
|
|
|
|
|
|
INCLUDE_DEST= $(FIREBIRD)/include
|
|
|
|
|
|
|
|
include_generic: $(INCLUDE_DEST)/ib_util.h \
|
|
|
|
$(INCLUDE_DEST)/ibase.h
|
|
|
|
|
|
|
|
# ib_util.h actually is a marker for a number of headers
|
|
|
|
|
2004-04-27 14:38:57 +02:00
|
|
|
# All these files are #includes in ibase.h here we cat them all together
|
2002-07-29 17:04:06 +02:00
|
|
|
# and remove the embedded #includes to make it simpler for external usage.
|
|
|
|
|
2009-12-04 11:05:41 +01:00
|
|
|
IBASE_ExtraFiles = include/types_pub.h include/consts_pub.h dsql/sqlda_pub.h jrd/dsc_pub.h jrd/ibase.h jrd/inf_pub.h jrd/blr.h include/gen/iberror.h
|
2002-07-29 17:04:06 +02:00
|
|
|
SRC_IBASE_ExtraFiles = $(addprefix $(SRC_ROOT)/, $(IBASE_ExtraFiles))
|
2005-12-18 18:56:17 +01:00
|
|
|
MAKE_HEADER_Src = $(addprefix $(SRC_ROOT)/, misc/makeHeader.cpp)
|
|
|
|
MAKE_HEADER_Bin = ./makeHeader
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
$(INCLUDE_DEST)/ibase.h: $(SRC_IBASE_ExtraFiles)
|
2007-12-14 12:32:06 +01:00
|
|
|
$(STATICEXE_LINK) -o $(MAKE_HEADER_Bin) $(MAKE_HEADER_Src)
|
2005-12-18 18:56:17 +01:00
|
|
|
$(CP) $^ .
|
|
|
|
$(MAKE_HEADER_Bin) <ibase.h >$@
|
|
|
|
$(RM) -f ibase.h
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
# Copy all the other headers to the distribution directory. we use
|
|
|
|
# ib_util.h as the marker for all the files.
|
|
|
|
|
|
|
|
OtherDistribHeaders = extlib/ib_util.h \
|
|
|
|
jrd/perf.h \
|
|
|
|
include/gen/iberror.h
|
|
|
|
|
|
|
|
SRC_OtherDistribHeaders = $(addprefix $(SRC_ROOT)/, $(OtherDistribHeaders))
|
|
|
|
|
|
|
|
$(INCLUDE_DEST)/ib_util.h : $(SRC_OtherDistribHeaders)
|
|
|
|
$(CP) $^ $(INCLUDE_DEST)/
|
|
|
|
|
|
|
|
|
|
|
|
# There are also gds*f and gds*ada header files around if someone
|
|
|
|
# wants them. You might need to hunt around in the old cvs tree for them.
|
|
|
|
|
|
|
|
|
2010-03-14 14:44:57 +01:00
|
|
|
#___________________________________________________________________________
|
|
|
|
|
|
|
|
# create platform-specific export lists (version scripts) in gen
|
|
|
|
|
|
|
|
%.vers: ../builds/posix/%.vers
|
|
|
|
sh vers.sh $(firstword $@)
|
|
|
|
|
|
|
|
export_lists: $(ALLVERS)
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
|
2003-03-17 13:06:48 +01:00
|
|
|
# When the msgs.fdb dataabse has changed with new messages a number of header
|
2002-07-29 17:04:06 +02:00
|
|
|
# files need to be regenerated. This is the target to do it. These new
|
|
|
|
# header files (placed in include/gen) then need to be committed since they
|
|
|
|
# are not generally rebuilt from scratch
|
|
|
|
|
|
|
|
rebuild_codes :
|
|
|
|
$(MAKE) -C jrd $@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#___________________________________________________________________________
|
|
|
|
#
|
|
|
|
|
2009-02-05 14:22:31 +01:00
|
|
|
.PHONY: install install-embedded package packages dist srctarfile
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2009-02-05 14:22:31 +01:00
|
|
|
install install-embedded package packages dist:
|
2003-07-08 03:05:22 +02:00
|
|
|
$(MAKE) -f $(GEN_ROOT)/Makefile.install $@
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2004-08-20 07:11:55 +02:00
|
|
|
SrcTarFile=Firebird$(ArchPrefix)-$(Version).tar.bz2
|
|
|
|
|
|
|
|
srctarfile: $(SrcTarFile)
|
|
|
|
|
|
|
|
$(SrcTarFile) :
|
2005-06-10 12:32:51 +02:00
|
|
|
$(SRC_ROOT)/misc/src_bundle.sh
|
2004-08-20 07:11:55 +02:00
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
#___________________________________________________________________________
|
2009-12-04 11:05:41 +01:00
|
|
|
#
|
2005-06-10 12:32:51 +02:00
|
|
|
.PHONY: clean clean_objects clean_dependancies clean_extern_objects clean_build \
|
|
|
|
clean_gpre_gen clean_icu clean_dbs clean_examples clean_makefiles \
|
|
|
|
clean_editline clean_all
|
|
|
|
|
|
|
|
|
|
|
|
clean: clean_objects clean_dependancies clean_extern_objects clean_build \
|
2007-04-02 12:42:14 +02:00
|
|
|
clean_yacc_gen clean_gpre_gen clean_icu clean_dbs clean_examples
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2005-06-10 12:32:51 +02:00
|
|
|
ifeq ($(EDITLINE_FLG),Y)
|
2009-07-22 08:36:33 +02:00
|
|
|
ifeq ($(STD_EDITLINE),false)
|
2005-06-10 12:32:51 +02:00
|
|
|
clean: clean_editline
|
|
|
|
endif
|
2009-07-22 08:36:33 +02:00
|
|
|
endif
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2005-06-10 12:32:51 +02:00
|
|
|
clean_config clean_all: clean clean_makefiles
|
2003-04-10 08:34:24 +02:00
|
|
|
$(RM) $(ROOT)/configure
|
2005-06-10 12:32:51 +02:00
|
|
|
$(RM) $(ROOT)/aclocal.m4
|
|
|
|
$(RM) $(ROOT)/config.log
|
|
|
|
$(RM) $(ROOT)/config.status
|
|
|
|
$(RM) $(ROOT)/libtool
|
2006-06-05 13:10:45 +02:00
|
|
|
$(RM_R) $(ROOT)/autom4te.cache
|
2008-12-28 16:42:05 +01:00
|
|
|
-$(MAKE) -C $(ROOT)/extern/editline distclean
|
|
|
|
-$(MAKE) -C $(ROOT)/extern/icu/source distclean
|
|
|
|
-$(MAKE) -C $(ROOT)/extern/btyacc distclean
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
clean_dbs:
|
2005-06-10 12:32:51 +02:00
|
|
|
$(RM) *.fdb *.FDB msg.timestamp
|
|
|
|
$(RM) yachts.lnk
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2008-01-16 11:36:35 +01:00
|
|
|
|
|
|
|
# The examples are a bit different, since the makefile is included in the directory
|
|
|
|
# and not in the gen directory, deleting it means, make clean; make doesnt work correctly
|
|
|
|
# so the code below deletes all the other stuff but not the Makefile.examples MOD Nov-2007
|
2009-12-04 11:05:41 +01:00
|
|
|
|
2005-06-10 12:32:51 +02:00
|
|
|
clean_examples:
|
2008-01-16 11:36:35 +01:00
|
|
|
$(RM) `find $(GEN_ROOT)/examples/ -type f ! -name 'Make*'`
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2004-05-08 05:28:26 +02:00
|
|
|
clean_editline:
|
2008-12-28 16:42:05 +01:00
|
|
|
-$(MAKE) -C $(ROOT)/extern/editline clean
|
2005-05-29 17:27:08 +02:00
|
|
|
|
|
|
|
clean_icu:
|
2008-12-28 16:42:05 +01:00
|
|
|
-$(MAKE) -C $(ROOT)/extern/icu/source clean
|
2004-05-08 05:28:26 +02:00
|
|
|
|
2002-10-07 03:29:13 +02:00
|
|
|
clean_objects:
|
2008-12-11 11:59:26 +01:00
|
|
|
$(RM) `find $(ROOT)/extern/ -type f -name '*.lo' -print`
|
2005-06-10 12:32:51 +02:00
|
|
|
$(RM) `find $(TMP_ROOT)/ -type f -name '*.o' -print`
|
2002-10-07 03:29:13 +02:00
|
|
|
|
2002-11-05 02:51:24 +01:00
|
|
|
clean_extern_objects:
|
2005-06-10 12:32:51 +02:00
|
|
|
$(RM) `find $(ROOT)/extern/ -type f -name '*.o' -print`
|
2002-10-07 03:29:13 +02:00
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
# Clear out dependancies files created by the gcc compiler
|
2009-12-04 11:05:41 +01:00
|
|
|
# since when .o and other files are deleted the dependant
|
2002-07-29 17:04:06 +02:00
|
|
|
# targets need to be recalculated
|
|
|
|
# MOD 10-July-2002
|
|
|
|
|
|
|
|
clean_dependancies:
|
2005-06-10 12:32:51 +02:00
|
|
|
$(RM) -f `find $(TMP_ROOT)/ -type f -name '*.d' -print`
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
# delete only all of the files of type regular file in $FIREBIRD
|
|
|
|
# leave the directories to make dependacies work still
|
|
|
|
# MOD 11-July-2002
|
|
|
|
|
|
|
|
clean_build:
|
2009-09-08 22:11:30 +02:00
|
|
|
$(RM) `find $(GEN_ROOT)/firebird \( -type f -o -type l \) -print`
|
2003-04-10 08:34:24 +02:00
|
|
|
# $(RM) $(GDSLIB_OBJECTS) $(GDSLIB_PHASE3_OBJECTS)
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2009-12-04 11:05:41 +01:00
|
|
|
#
|
2002-12-09 02:43:21 +01:00
|
|
|
clean_makefiles:
|
2005-06-10 12:32:51 +02:00
|
|
|
$(RM) $(GEN_ROOT)/Make*
|
|
|
|
$(RM) $(GEN_ROOT)/make*
|
2009-09-08 22:11:30 +02:00
|
|
|
$(RM) `find $(GEN_ROOT)/install \( -type f -o -type l \) -print`
|
2008-01-16 11:36:35 +01:00
|
|
|
-$(RM) $(GEN_ROOT)/examples/Make*
|
2005-06-10 12:32:51 +02:00
|
|
|
$(RM) $(ROOT)/Makefile
|
|
|
|
$(RM) $(SRC_ROOT)/include/gen/autoconfig.h
|
2009-08-05 13:45:07 +02:00
|
|
|
$(RM) $(SRC_ROOT)/include/gen/blrtable.h
|
2007-04-03 14:30:26 +02:00
|
|
|
|
2002-12-22 20:45:45 +01:00
|
|
|
clean_gpre_gen:
|
2010-04-15 16:40:27 +02:00
|
|
|
-$(RM) -f `find $(TMP_ROOT)/ -type f -name '*.cpp' -print`
|
2007-04-02 12:42:14 +02:00
|
|
|
|
|
|
|
clean_yacc_gen:
|
|
|
|
$(RM) $(ROOT)/src/dsql/parse.cpp $(ROOT)/src/dsql/dsql.tab.h
|
2002-12-09 02:43:21 +01:00
|
|
|
|
2002-11-11 14:09:20 +01:00
|
|
|
#___________________________________________________________________________
|
2007-03-09 11:32:58 +01:00
|
|
|
# Extra platform specific targets
|
2009-12-04 11:05:41 +01:00
|
|
|
@POSTFIX_INCLUDE@
|