2001-10-26 05:57:55 -05:00
|
|
|
#*************************************************************************
|
|
|
|
#
|
2008-04-10 11:38:46 -05:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
2010-02-12 08:01:35 -06:00
|
|
|
# Copyright 2000, 2010 Oracle and/or its affiliates.
|
2001-10-26 05:57:55 -05:00
|
|
|
#
|
2008-04-10 11:38:46 -05:00
|
|
|
# OpenOffice.org - a multi-platform office productivity suite
|
2001-10-26 05:57:55 -05:00
|
|
|
#
|
2008-04-10 11:38:46 -05:00
|
|
|
# This file is part of OpenOffice.org.
|
2001-10-26 05:57:55 -05:00
|
|
|
#
|
2008-04-10 11:38:46 -05:00
|
|
|
# OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
# only, as published by the Free Software Foundation.
|
2001-10-26 05:57:55 -05:00
|
|
|
#
|
2008-04-10 11:38:46 -05:00
|
|
|
# OpenOffice.org 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 License version 3 for more details
|
|
|
|
# (a copy is included in the LICENSE file that accompanied this code).
|
2001-10-26 05:57:55 -05:00
|
|
|
#
|
2008-04-10 11:38:46 -05:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# version 3 along with OpenOffice.org. If not, see
|
|
|
|
# <http://www.openoffice.org/license.html>
|
|
|
|
# for a copy of the LGPLv3 License.
|
2001-10-26 05:57:55 -05:00
|
|
|
#
|
|
|
|
#*************************************************************************
|
|
|
|
|
2009-09-07 08:35:07 -05:00
|
|
|
COMPVERMK:=$(SOLARINCDIR)/comp_ver.mk
|
2002-01-08 07:57:10 -06:00
|
|
|
|
|
|
|
.INCLUDE .IGNORE : $(COMPVERMK)
|
|
|
|
|
2009-04-23 10:52:08 -05:00
|
|
|
.IF "$(COMNAME)"=="" || "$(COMPATH:s!\!/!)"!="$(COMPATH_STORED)"
|
2001-12-18 07:25:21 -06:00
|
|
|
.IF "$(L10N_framework)"==""
|
|
|
|
|
2001-10-26 07:17:43 -05:00
|
|
|
COMNAME:=
|
|
|
|
|
2001-10-26 05:57:55 -05:00
|
|
|
.IF "$(COM)"=="GCC"
|
|
|
|
CFLAGSVERSION=-dumpversion
|
2002-03-01 06:21:33 -06:00
|
|
|
CFLAGSVERSION_CMD=-dumpversion
|
2009-09-07 08:35:07 -05:00
|
|
|
CFLAGSNUMVERSION_CMD=-dumpversion $(PIPEERROR) $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
|
|
|
|
#CFLAGSNUMVERSION_CMD=-dumpversion | 2>&1 $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
|
2001-10-26 05:57:55 -05:00
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
.IF "$(COM)"=="MSC"
|
2002-03-01 06:21:33 -06:00
|
|
|
CFLAGSVERSION=
|
2009-09-07 08:35:07 -05:00
|
|
|
CFLAGSVERSION_CMD= $(PIPEERROR) $(AWK) -f $(SOLARENV)/bin/getcompver.awk
|
|
|
|
CFLAGSNUMVERSION_CMD= $(PIPEERROR) $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
|
2001-10-26 05:57:55 -05:00
|
|
|
.ENDIF
|
|
|
|
|
2003-07-02 07:43:49 -05:00
|
|
|
.IF "$(COM)"=="C55" || "$(COM)"=="C54" || "$(COM)"=="C52" || "$(COM)"=="C40" || "$(COM)"=="sunpro"
|
2002-03-01 06:21:33 -06:00
|
|
|
CFLAGSVERSION= -V
|
2009-09-07 08:35:07 -05:00
|
|
|
CFLAGSVERSION_CMD= -V $(PIPEERROR) $(AWK) -f $(SOLARENV)/bin/getcompver.awk
|
|
|
|
CFLAGSNUMVERSION_CMD= -V $(PIPEERROR) $(AWK) -v num=true -f $(SOLARENV)/bin/getcompver.awk
|
2001-10-26 05:57:55 -05:00
|
|
|
.ENDIF
|
|
|
|
|
2003-12-17 11:06:26 -06:00
|
|
|
.IF "$(COM)"=="C730"
|
|
|
|
CFLAGSVERSION= -version
|
|
|
|
CFLAGSVERSION_CMD= -version |& cut -d" " -f4-
|
|
|
|
CFLAGSNUMVERSION_CMD= -version |& cut -d" " -f4-
|
|
|
|
.ENDIF
|
|
|
|
|
2001-10-26 05:57:55 -05:00
|
|
|
# that's the version known by the specific
|
2002-03-01 06:21:33 -06:00
|
|
|
# compiler
|
2007-11-06 08:45:32 -06:00
|
|
|
CCVER:=$(shell @-$(CXX) $(CFLAGSVERSION_CMD))
|
2001-10-26 05:57:55 -05:00
|
|
|
|
|
|
|
# and a computed integer for comparing
|
|
|
|
# each point seperated token blown up to 4 digits
|
2007-11-06 08:45:32 -06:00
|
|
|
CCNUMVER:=$(shell @-$(CXX) $(CFLAGSNUMVERSION_CMD))
|
2001-10-26 05:57:55 -05:00
|
|
|
|
|
|
|
.IF "$(COM)"=="MSC"
|
|
|
|
.IF "$(CCNUMVER)">="001200000000"
|
|
|
|
COMID=MSC
|
|
|
|
COMNAME=msci
|
|
|
|
.ENDIF
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
.IF "$(COM)"=="GCC"
|
2002-08-29 08:12:44 -05:00
|
|
|
|
|
|
|
SHORTSTDCPP3:=
|
|
|
|
|
2001-10-26 07:17:43 -05:00
|
|
|
.IF "$(CCNUMVER)">="000200910000"
|
2001-10-26 05:57:55 -05:00
|
|
|
COMID=GCC
|
|
|
|
COMNAME=gcc2
|
|
|
|
.ENDIF
|
2002-08-29 08:12:44 -05:00
|
|
|
|
2001-10-26 05:57:55 -05:00
|
|
|
.IF "$(CCNUMVER)">="000300000001"
|
2002-08-29 08:12:44 -05:00
|
|
|
|
2001-10-26 05:57:55 -05:00
|
|
|
COMID=gcc3
|
|
|
|
COMNAME=gcc3
|
2002-08-29 08:12:44 -05:00
|
|
|
|
2003-06-12 04:00:41 -05:00
|
|
|
.IF "$(CCNUMVER)">="000300000001"
|
2002-08-29 08:12:44 -05:00
|
|
|
SHORTSTDCPP3="3"
|
|
|
|
.ENDIF
|
|
|
|
|
2003-06-12 04:00:41 -05:00
|
|
|
.IF "$(CCNUMVER)">="000300010000"
|
2002-08-29 08:12:44 -05:00
|
|
|
SHORTSTDCPP3="4"
|
|
|
|
.ENDIF
|
|
|
|
|
2003-06-12 04:00:41 -05:00
|
|
|
.IF "$(CCNUMVER)">="000300020000"
|
2003-04-28 10:43:53 -05:00
|
|
|
SHORTSTDCPP3="5"
|
2003-03-27 04:48:49 -06:00
|
|
|
.ENDIF
|
|
|
|
|
2004-06-16 04:35:02 -05:00
|
|
|
.IF "$(CCNUMVER)">="000300040000"
|
|
|
|
SHORTSTDCPP3="6"
|
|
|
|
.ENDIF
|
|
|
|
|
2001-10-26 05:57:55 -05:00
|
|
|
.ENDIF
|
|
|
|
.ENDIF
|
|
|
|
|
2003-07-02 07:43:49 -05:00
|
|
|
.IF "$(COM)"=="C55" || "$(COM)" == "C54" || "$(COM)"=="C52" || "$(COM)"=="C40" || "$(COM)"=="sunpro"
|
2001-10-26 05:57:55 -05:00
|
|
|
.IF "$(CCNUMVER)">="00050002"
|
|
|
|
COMID=C52
|
|
|
|
COMNAME=sunpro5
|
|
|
|
.ENDIF
|
|
|
|
.ENDIF
|
|
|
|
|
2003-12-17 11:06:26 -06:00
|
|
|
.IF "$(COM)"=="C730"
|
|
|
|
COMID=C730
|
|
|
|
COMNAME=MipsPro
|
|
|
|
.ENDIF
|
|
|
|
|
2001-10-26 07:17:43 -05:00
|
|
|
.IF "$(COMNAME)"==""
|
|
|
|
|
|
|
|
# "EXCEPTIONSFILES" get compiled before this, but shouldn't
|
|
|
|
# appear in the first n modules.
|
|
|
|
|
|
|
|
compiler_version_error:
|
2006-10-05 04:38:48 -05:00
|
|
|
@echo ++++++++++++++++++++++++++++++++++++
|
|
|
|
@echo ERROR!
|
|
|
|
@echo Could not detect compiler version!
|
|
|
|
@echo Please extend tg_compv.mk in
|
|
|
|
@echo "solenv/inc".
|
|
|
|
@echo ++++++++++++++++++++++++++++++++++++
|
|
|
|
@echo "$(CXX) $(CFLAGSVERSION)" returns
|
2007-01-25 05:53:27 -06:00
|
|
|
@$(CXX) $(CFLAGSVERSION)
|
2006-10-05 04:38:48 -05:00
|
|
|
@echo ++++++++++++++++++++++++++++++++++++
|
2007-01-25 05:53:27 -06:00
|
|
|
force_dmake_to_error
|
2001-10-26 07:17:43 -05:00
|
|
|
|
|
|
|
.ENDIF # "$(COMNAME)"==""
|
|
|
|
|
2001-10-26 05:57:55 -05:00
|
|
|
CDEFS+=-DCPPU_ENV=$(COMNAME)
|
|
|
|
|
2001-12-18 07:25:21 -06:00
|
|
|
.ENDIF # "$(L10N_framework)"==""
|
2002-01-08 07:57:10 -06:00
|
|
|
.ENDIF # "$(COMNAME)"==""
|