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
|
2012-01-12 16:00:49 +01:00
|
|
|
WFLAGS:=-I$(SRC_ROOT)/include/gen -I$(SRC_ROOT)/include $(CPPFLAGS)
|
2009-02-21 23:09:04 +01:00
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
ifeq ($(TARGET),Release)
|
2010-10-25 17:48:35 +02:00
|
|
|
WFLAGS:= $(PROD_FLAGS) $(WFLAGS)
|
2002-09-19 17:25:38 +02:00
|
|
|
else
|
2010-10-25 17:48:35 +02:00
|
|
|
WFLAGS:= $(DEV_FLAGS) $(WFLAGS) -DDEV_BUILD
|
2002-09-19 17:25:38 +02:00
|
|
|
endif
|
2002-07-29 17:04:06 +02:00
|
|
|
|
2011-10-11 15:42:55 +02:00
|
|
|
WCFLAGS:= $(WFLAGS) $(THR_FLAGS) $(CFLAGS) $(GLOB_OPTIONS)
|
|
|
|
WCXXFLAGS:= $(WFLAGS) $(THR_FLAGS) $(RTTI_FLAG) $(CXXFLAGS) $(GLOB_OPTIONS)
|
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
|
|
|
|
DSQL_GPRE_FLAGS = -m -z -n
|
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
|
|
|
|
2008-12-09 00:45:23 +01:00
|
|
|
$(OBJ)/dsql/%.cpp: $(SRC_ROOT)/dsql/%.epp
|
2002-08-05 09:14:54 +02:00
|
|
|
$(GPRE_CURRENT) $(DSQL_GPRE_FLAGS) $< $@
|
|
|
|
|
2010-10-12 10:02:57 +02:00
|
|
|
$(OBJ)/yvalve/%.cpp: $(SRC_ROOT)/yvalve/%.epp
|
|
|
|
$(GPRE_CURRENT) $(DSQL_GPRE_FLAGS) $< $@
|
|
|
|
|
|
|
|
$(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
|
|
|
|
|
|
|
.SUFFIXES: .lo .o .cpp .c
|
|
|
|
|
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 $@
|
2010-11-30 09:57:10 +01:00
|
|
|
@sed -i -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 $@
|
2010-11-30 09:57:10 +01:00
|
|
|
@sed -i -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 $@
|
2010-11-30 09:57:10 +01:00
|
|
|
@sed -i -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) $< $@
|