143feee13SJuergen Schmidt#************************************************************** 243feee13SJuergen Schmidt# 343feee13SJuergen Schmidt# Licensed to the Apache Software Foundation (ASF) under one 443feee13SJuergen Schmidt# or more contributor license agreements. See the NOTICE file 543feee13SJuergen Schmidt# distributed with this work for additional information 643feee13SJuergen Schmidt# regarding copyright ownership. The ASF licenses this file 743feee13SJuergen Schmidt# to you under the Apache License, Version 2.0 (the 843feee13SJuergen Schmidt# "License"); you may not use this file except in compliance 943feee13SJuergen Schmidt# with the License. You may obtain a copy of the License at 1043feee13SJuergen Schmidt# 1143feee13SJuergen Schmidt# http://www.apache.org/licenses/LICENSE-2.0 1243feee13SJuergen Schmidt# 1343feee13SJuergen Schmidt# Unless required by applicable law or agreed to in writing, 1443feee13SJuergen Schmidt# software distributed under the License is distributed on an 1543feee13SJuergen Schmidt# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1643feee13SJuergen Schmidt# KIND, either express or implied. See the License for the 1743feee13SJuergen Schmidt# specific language governing permissions and limitations 1843feee13SJuergen Schmidt# under the License. 1943feee13SJuergen Schmidt# 2043feee13SJuergen Schmidt#************************************************************** 2143feee13SJuergen Schmidt 2243feee13SJuergen SchmidtPRJ=. 2343feee13SJuergen Schmidt 2443feee13SJuergen SchmidtPRJNAME=gtest 2543feee13SJuergen SchmidtTARGET=oo_gtest 2643feee13SJuergen Schmidt 2743feee13SJuergen Schmidt# --- Settings ----------------------------------------------------- 2843feee13SJuergen Schmidt 2943feee13SJuergen Schmidt.INCLUDE : settings.mk 3043feee13SJuergen Schmidt.INCLUDE : gtest_version.mk 3143feee13SJuergen Schmidt 3243feee13SJuergen Schmidt# --- Files -------------------------------------------------------- 3343feee13SJuergen Schmidt 3443feee13SJuergen Schmidt.IF "$(ENABLE_UNIT_TESTS)"!="YES" 3543feee13SJuergen Schmidt 3643feee13SJuergen Schmidtall: 3743feee13SJuergen Schmidt @echo "Unit tests are disabled. Does not have to be built." 3843feee13SJuergen Schmidt 3943feee13SJuergen Schmidt.ELSE 4043feee13SJuergen Schmidt 4143feee13SJuergen Schmidt# Assemble the full version number from the parts defined in gtest_version.mk 4243feee13SJuergen SchmidtLIBGTESTVERSION=$(GTEST_MAJOR).$(GTEST_MINOR).$(GTEST_MICRO) 4343feee13SJuergen Schmidt 4443feee13SJuergen SchmidtTARFILE_NAME=$(PRJNAME)-$(LIBGTESTVERSION) 4543feee13SJuergen Schmidt# This is the SHA1 checksum, not MD5 but tg_ext.mk does not now about this and, 4643feee13SJuergen Schmidt# thankfully, does not care. 4743feee13SJuergen SchmidtTARFILE_MD5=2d6ec8ccdf5c46b05ba54a9fd1d130d7 4843feee13SJuergen Schmidt 49d76c79b2SHerbert DürrPATCH_FILES= use-own-tuple.patch 5043feee13SJuergen Schmidt 5143feee13SJuergen Schmidt.IF "$(OS)"=="WNT" 5243feee13SJuergen Schmidt 5343feee13SJuergen SchmidtCONFIGURE_DIR= 5443feee13SJuergen Schmidt# dirty hack for gbuild whihc relies on .cxx extension for C++ files 5543feee13SJuergen SchmidtCONFIGURE_ACTION=cp src/gtest-all.cc src/gtest-all.cxx 5643feee13SJuergen SchmidtCONFIGURE_FLAGS= 5743feee13SJuergen Schmidt 5843feee13SJuergen SchmidtBUILD_DIR= 5943feee13SJuergen SchmidtBUILD_ACTION=$(GNUMAKE) 6043feee13SJuergen SchmidtBUILD_FLAGS+= -f ../../../../win/Makefile -j$(EXTMAXPROCESS) 6143feee13SJuergen Schmidt 6243feee13SJuergen Schmidt.ELIF "$(GUI)" == "OS2" 6343feee13SJuergen Schmidt 6443feee13SJuergen Schmidt@all: 6543feee13SJuergen Schmidt @echo "using system serf. nothing do do." 6643feee13SJuergen Schmidt 6743feee13SJuergen Schmidt.ELSE 6843feee13SJuergen Schmidt 69*4e651fabSdamjan.IF "$(OS)"=="LINUX" 70*4e651fabSdamjanPATCH_FILES+=linux-pthread.patch 71*4e651fabSdamjan.ENDIF 72*4e651fabSdamjan 7343feee13SJuergen SchmidtCONFIGURE_DIR= 7409a7098bSHerbert DürrCONFIGURE_ACTION=.$/configure 7543feee13SJuergen Schmidt 7643feee13SJuergen Schmidt.IF "$(OS)"=="MACOSX" 7743feee13SJuergen SchmidtCONFIGURE_FLAGS='CXX=$(CXX)' 7810edccc7SHerbert DürrCONFIGURE_FLAGS+='CXXFLAGS=-stdlib=libc++ -U__STRICT_ANSI__ -isysroot $(MACOSX_SDK_PATH)' 7943feee13SJuergen Schmidt.ENDIF 8043feee13SJuergen Schmidt 8143feee13SJuergen SchmidtBUILD_DIR=$(CONFIGURE_DIR) 8243feee13SJuergen SchmidtBUILD_ACTION=$(GNUMAKE) 8343feee13SJuergen SchmidtBUILD_FLAGS+= -j$(EXTMAXPROCESS) 8443feee13SJuergen Schmidt 8543feee13SJuergen Schmidt 8643feee13SJuergen SchmidtOUTDIR2INC=include/gtest 8743feee13SJuergen Schmidt 8843feee13SJuergen Schmidt.IF "$(OS)"=="MACOSX" 8943feee13SJuergen SchmidtOUT2LIB=lib/.libs/libgtest.*dylib 9043feee13SJuergen Schmidt#OUT2LIB+=lib/.libs/libgtest_main.*dylib 9143feee13SJuergen Schmidt.ELSE 9243feee13SJuergen SchmidtOUT2LIB=lib/.libs/libgtest.so* 9343feee13SJuergen Schmidt#OUT2LIB+=lib/.libs/libgtest_main.so* 9443feee13SJuergen Schmidt.ENDIF 9543feee13SJuergen Schmidt 9643feee13SJuergen Schmidt.ENDIF 9743feee13SJuergen Schmidt 9843feee13SJuergen Schmidt# --- Targets ------------------------------------------------------ 9943feee13SJuergen Schmidt 10043feee13SJuergen Schmidt.INCLUDE : set_ext.mk 10143feee13SJuergen Schmidt.INCLUDE : target.mk 10243feee13SJuergen Schmidt.INCLUDE : tg_ext.mk 10343feee13SJuergen Schmidt 10443feee13SJuergen Schmidt.ENDIF 105