2002-07-29 17:04:06 +02:00
|
|
|
#
|
|
|
|
# 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):
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
#____________________________________________________________________________
|
|
|
|
|
|
|
|
|
2002-11-05 02:49:39 +01:00
|
|
|
# Please don't use compiler/platform specific flags here - nmcc 02-Nov-2002
|
2021-09-14 13:08:46 +02:00
|
|
|
WFLAGS =-I$(SRC_ROOT)/include/gen -I$(SRC_ROOT)/include $(CPPFLAGS) $(LTCSOURCE)
|
2009-02-21 23:09:04 +01:00
|
|
|
|
2022-07-18 13:12:23 +02:00
|
|
|
ifneq ($(SYSTEM_BOOST_FLG),Y)
|
|
|
|
WFLAGS += -I$(ROOT)/extern/boost
|
|
|
|
endif
|
|
|
|
|
2022-10-08 19:54:55 +02:00
|
|
|
WFLAGS += -I$(LIBCDS_INC) -D$(LIBCDS_DEF)
|
|
|
|
|
2017-09-06 18:32:12 +02:00
|
|
|
ifeq ($(TOMMATH_BUILD_FLG),Y)
|
2016-04-24 17:09:48 +02:00
|
|
|
WFLAGS += -I$(TOMMATH_INC)
|
|
|
|
endif
|
|
|
|
|
2017-09-06 18:32:12 +02:00
|
|
|
ifeq ($(TOMCRYPT_BUILD_FLG),Y)
|
|
|
|
WFLAGS += -I$(TOMCRYPT_INC)
|
|
|
|
endif
|
|
|
|
|
2021-09-14 13:08:46 +02:00
|
|
|
ifeq ($(RE2_BUILD_FLG),Y)
|
|
|
|
WFLAGS += -I$(ROOT)/extern/re2
|
|
|
|
endif
|
|
|
|
|
2021-09-22 12:11:06 +02:00
|
|
|
ifeq ($(ABSEIL_BUILD_FLG),Y)
|
|
|
|
WFLAGS += -I$(ROOT)/extern/int128
|
|
|
|
endif
|
|
|
|
|
2016-05-25 14:14:01 +02:00
|
|
|
ifeq ($(LSB_FLG),Y)
|
|
|
|
WFLAGS += -DLSB_BUILD
|
|
|
|
endif
|
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
ifeq ($(TARGET),Release)
|
2016-03-05 13:28:04 +01:00
|
|
|
WFLAGS += $(PROD_FLAGS)
|
2002-09-19 17:25:38 +02:00
|
|
|
else
|
2016-03-05 13:28:04 +01:00
|
|
|
WFLAGS += $(DEV_FLAGS) -DDEV_BUILD
|
2002-09-19 17:25:38 +02:00
|
|
|
endif
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2019-01-11 18:12:16 +01:00
|
|
|
WCFLAGS = $(WFLAGS) $(CFLAGS) $(AC_CFLAGS) $(GLOB_OPTIONS)
|
2020-12-30 10:31:53 +01:00
|
|
|
WCXXFLAGS = $(WFLAGS) $(PLUSPLUS_FLAGS) $(PLATFORM_PLUSPLUS_FLAGS) $(CXXFLAGS) $(AC_CXXFLAGS) $(GLOB_OPTIONS)
|
2023-08-24 04:09:49 +02:00
|
|
|
WLDFLAGS = $(LDFLAGS) $(AC_LDFLAGS)
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2024-04-19 03:01:08 +02:00
|
|
|
ifneq ($(PLATFORM),DARWIN)
|
|
|
|
WLDFLAGS += -static-libstdc++
|
|
|
|
endif
|
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
# Here we have definitions for using the preprocessor.
|
|
|
|
|
|
|
|
# The GPRE_FLAGS is overwritten in Makefile.in.jrd Makefile.in.gpre and
|
|
|
|
# since they do something extra to allow the boot build to work.
|
|
|
|
#
|
|
|
|
# One other point is that sometimes a failure in compile with gpre does not
|
|
|
|
# result in an error being generated. The generated source file still
|
|
|
|
# compiles and throws the make off the path.
|
|
|
|
#
|
|
|
|
# This bit of code is part of unfinished bit to let make determine if
|
|
|
|
# gpre gpre_static or gpre_boot should be used based on which ones exist.
|
|
|
|
#
|
|
|
|
# testgpre = $(shell if [ -f $(GPRE) ]; then; echo $(GPRE); else; echo ""; fi)
|
|
|
|
#test1:
|
2003-04-10 08:34:24 +02:00
|
|
|
# $(ECHO) $(testgpre)
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
|
2010-01-01 19:39:42 +01:00
|
|
|
GPRE_FLAGS= -m -z -n
|
|
|
|
JRD_GPRE_FLAGS = -n -z -gds_cxx -ids
|
2018-02-19 11:38:28 +01:00
|
|
|
OBJECT_GPRE_FLAGS = -m -z -n -ocxx
|
2002-08-05 09:14:54 +02:00
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
|
|
|
|
.SUFFIXES: .c .e .epp .cpp
|
|
|
|
|
|
|
|
.e.c:
|
|
|
|
$(GPRE_CURRENT) $(GPRE_FLAGS) $< $@
|
|
|
|
|
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
$(OBJ)/jrd/%.cpp: $(SRC_ROOT)/jrd/%.epp
|
2008-12-09 00:45:23 +01:00
|
|
|
$(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $(firstword $<) $@
|
2002-08-05 09:14:54 +02:00
|
|
|
|
Implemented CORE-4317: Make ISQL use new object API with 32-bit length for object sizes (messages, SQL statements, etc.)
Implementation also includes changes in GPRE, but this utility is not complete - only commands, used in ISQL,
are working in code generator for new API.
New interface IUtl is added - it performs tasks, related with database objects (attachment, transaction, etc.),
but not requiring routing in YValve, i.e. client only tasks.
2014-01-15 14:02:08 +01:00
|
|
|
$(OBJ)/isql/%.cpp: $(SRC_ROOT)/isql/%.epp
|
2018-02-19 11:38:28 +01:00
|
|
|
$(GPRE_CURRENT) $(OBJECT_GPRE_FLAGS) $< $@
|
|
|
|
|
|
|
|
$(OBJ)/burp/%.cpp: $(SRC_ROOT)/burp/%.epp
|
|
|
|
$(GPRE_CURRENT) $(OBJECT_GPRE_FLAGS) $< $@
|
2010-10-12 10:02:57 +02:00
|
|
|
|
|
|
|
$(OBJ)/%.cpp: $(SRC_ROOT)/%.epp
|
2008-12-09 00:45:23 +01:00
|
|
|
$(GPRE_CURRENT) $(GPRE_FLAGS) $(firstword $<) $@
|
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2020-05-15 17:03:52 +02:00
|
|
|
.SUFFIXES: .lo .o .cpp .c .cc
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2012-06-22 13:39:24 +02:00
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(WCFLAGS) -c $(firstword $<) -o $@
|
|
|
|
|
2020-05-15 17:03:52 +02:00
|
|
|
%.o: %.cc
|
2021-09-27 20:40:42 +02:00
|
|
|
$(CXX) $(WCFLAGS) -c $(firstword $<) -o $@
|
2020-05-15 17:03:52 +02:00
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
$(OBJ)/%.o: $(SRC_ROOT)/%.c
|
2009-04-03 13:57:43 +02:00
|
|
|
$(CC) $(WCFLAGS) -c $(firstword $<) -o $@
|
2012-02-24 17:55:18 +01:00
|
|
|
@sed $(INLINE_EDIT_SED) -e "1,2s/:/: \$$(wildcard/" -e "\$$s/\(.*\)/\\1)/" $(patsubst %.o,%.d,$@)
|
2021-03-02 17:08:42 +01:00
|
|
|
|
|
|
|
$(OBJ)/%.o: $(SRC_ROOT)/%.m
|
|
|
|
$(CC) $(WCFLAGS) -c $(firstword $<) -o $@
|
|
|
|
@sed $(INLINE_EDIT_SED) -e "1,2s/:/: \$$(wildcard/" -e "\$$s/\(.*\)/\\1)/" $(patsubst %.o,%.d,$@)
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
$(OBJ)/%.o: $(OBJ)/%.cpp
|
2009-04-03 13:57:43 +02:00
|
|
|
$(CXX) $(WCXXFLAGS) -c $(firstword $<) -o $@
|
2012-02-24 17:55:18 +01:00
|
|
|
@sed $(INLINE_EDIT_SED) -e "1,2s/:/: \$$(wildcard/" -e "\$$s/\(.*\)/\\1)/" $(patsubst %.o,%.d,$@)
|
2008-12-09 00:45:23 +01:00
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
$(OBJ)/%.o: $(SRC_ROOT)/%.cpp
|
2009-04-03 13:57:43 +02:00
|
|
|
$(CXX) $(WCXXFLAGS) -c $(firstword $<) -o $@
|
2012-02-24 17:55:18 +01:00
|
|
|
@sed $(INLINE_EDIT_SED) -e "1,2s/:/: \$$(wildcard/" -e "\$$s/\(.*\)/\\1)/" $(patsubst %.o,%.d,$@)
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2017-11-03 12:43:17 +01:00
|
|
|
$(OBJ)/%.o: $(ROOT)/%.cpp
|
2021-09-27 20:40:42 +02:00
|
|
|
$(CXX) $(WCFLAGS) -c $(firstword $<) -o $@
|
2017-11-03 12:43:17 +01:00
|
|
|
@sed $(INLINE_EDIT_SED) -e "1,2s/:/: \$$(wildcard/" -e "\$$s/\(.*\)/\\1)/" $(patsubst %.o,%.d,$@)
|
|
|
|
|
2002-07-29 17:04:06 +02:00
|
|
|
.SUFFIXES: .epp .e
|
|
|
|
|
2003-03-28 12:29:18 +01:00
|
|
|
# Rules for making resource files
|
|
|
|
|
|
|
|
$(GEN_ROOT)/%.res: $(SRC_ROOT)/%.rc
|
|
|
|
windres --output-format=coff --include-dir=$(<D) $< $@
|
2015-01-27 11:46:48 +01:00
|
|
|
|
|
|
|
# Rule for making gbak files when cross-compiling
|
|
|
|
|
|
|
|
.SUFFIXES: .gbak .fdb
|
|
|
|
|
|
|
|
$(GEN_ROOT)/$(TARGET)/%.gbak: $(GEN_ROOT)/Native/%.fdb
|
|
|
|
$(RUN_GBAK) -b $(firstword $<) $(firstword $@)
|
|
|
|
|
|
|
|
$(GEN_ROOT)/%.gbak: $(GEN_ROOT)/%.fdb
|
|
|
|
$(RUN_GBAK) -b $(firstword $<) $(firstword $@)
|