mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-28 02:43:03 +01:00
116 lines
3.3 KiB
Makefile
116 lines
3.3 KiB
Makefile
#
|
|
# The contents of this file are subject to the Mozilla Public
|
|
# License Version 1.1 (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.mozilla.org/MPL/
|
|
# Alternatively, the contents of this file may be used under the
|
|
# terms of the GNU General Public License Version 2 or later (the
|
|
# "GPL"), in which case the provisions of the GPL are applicable
|
|
# instead of those above. You may obtain a copy of the Licence at
|
|
# http://www.gnu.org/copyleft/gpl.html
|
|
#
|
|
# This program 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
|
|
# Relevant for more details.
|
|
#
|
|
# This file was created by members of the firebird development team.
|
|
# All individual contributions remain the Copyright (C) of those
|
|
# individuals. Contributors to this file are either listed here or
|
|
# can be obtained from a CVS history command.
|
|
#
|
|
# All rights reserved.
|
|
#
|
|
# Created by: Mark O'Donohue <mark.odonohue@ludwig.edu.au>
|
|
#
|
|
# Contributor(s):
|
|
#
|
|
#
|
|
# $Id: Makefile.in.gpre,v 1.11 2002-07-04 09:34:19 skywalker Exp $
|
|
#
|
|
|
|
ROOT=../..
|
|
|
|
include $(ROOT)/src/make.rules
|
|
include $(ROOT)/src/make.defaults
|
|
include $(ROOT)/src/make.platform
|
|
include $(ROOT)/src/make.shared.variables
|
|
|
|
@SET_MAKE@
|
|
|
|
|
|
|
|
|
|
GPRECommon_Sources = cmd.cpp cme.cpp cmp.cpp c_cxx.cpp exp.cpp gpre.cpp \
|
|
hsh.cpp int.cpp int_cxx.cpp jrdmet.cpp movg.cpp msc.cpp par.cpp \
|
|
pat.cpp pretty.cpp sqe.cpp sql.cpp cob.cpp noform.cpp
|
|
|
|
GPREBoot_Sources= gpre_meta_boot.cpp ../common/fb_exception.cpp
|
|
GPRE_Sources= gpre_meta.cpp
|
|
|
|
GPRECommon_Objects = $(GPRECommon_Sources:%.cpp=$(OBJ)/%.o)
|
|
GPREBoot_Objects = $(GPREBoot_Sources:%.cpp=$(OBJ)/%.o)
|
|
GPRE_Objects = $(GPRE_Sources:%.cpp=$(OBJ)/%.o)
|
|
|
|
|
|
AllObjects = $(GPRECommon_Objects) $(GPREBoot_Objects) $(GPRE_Objects) \
|
|
$(GPRELIB_Objects)
|
|
|
|
|
|
Dependencies = $(AllObjects:.o=.d)
|
|
|
|
|
|
|
|
|
|
.PHONY: gpre_boot gpre_static gpre
|
|
|
|
# As we build each of the gpre targets we change the link in $(GPRE_CURRENT)
|
|
# to point to the latest one, that way the .epp.cpp rule is kept simple
|
|
# and we always end up using the correct one at each bootstrap stage.
|
|
|
|
gpre_boot : $(GPRE_BOOT)
|
|
|
|
gpre_static : $(GPRE_STATIC)
|
|
|
|
gpre : $(GPRE)
|
|
|
|
|
|
$(GPRE_BOOT): $(GPRECommon_Objects) $(GPREBoot_Objects) $(LIB)/jrd_boot.a $(LIB)/fbutil_boot.a $(LIB)/fbmem_boot.a
|
|
$(STATICEXE_LINK) -o $(GPRE_BOOT) $^ $(STATICLINK_LIBS)
|
|
-$(RM) $(GPRE_CURRENT)
|
|
$(LN) $(@F) $(GPRE_CURRENT)
|
|
|
|
|
|
$(GPRE_STATIC):$(GPRECommon_Objects) $(GPRE_Objects) $(BOOT_GDSLIB_Objects)
|
|
$(STATICEXE_LINK) $(LINK_OPTS) $^ -o $@ $(STATICLINK_LIBS)
|
|
$(CHMOD_7) $@
|
|
-$(RM) $(GPRE_CURRENT)
|
|
$(LN) $(@F) $(GPRE_CURRENT)
|
|
|
|
|
|
$(GPRE):$(GPRECommon_Objects) $(GPRE_Objects) $(LIBGDS_DEP)
|
|
$(EXE_LINK) $(LINK_OPTS) $(LIBGDS_LINK) $^ -o $@ $(LINK_LIBS)
|
|
$(CHMOD_7) $@
|
|
-$(RM) $(GPRE_CURRENT)
|
|
$(LN) $(@F) $(GPRE_CURRENT)
|
|
|
|
|
|
|
|
# gpre_meta needs a special boot build since there is no database.
|
|
$(SRC)/gpre_meta.cpp: $(SRC)/gpre_meta.epp
|
|
$(GPRE_BOOT) -lang_internal $(GPRE_FLAGS) $< $@
|
|
|
|
|
|
# In phase2 we add the same objects as before, we just rebuild them as
|
|
# portable and load them into a shared libgds.so library.
|
|
|
|
.PHONY: jrdlib_dependencies
|
|
|
|
|
|
jrdlib_dependencies: $(GPRELIB_Objects)
|
|
|
|
|
|
FORCE:
|
|
|
|
-include $(Dependencies)
|