1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22PRJ=. 23 24PRJNAME=gtest 25TARGET=oo_gtest 26 27# --- Settings ----------------------------------------------------- 28 29.INCLUDE : settings.mk 30.INCLUDE : gtest_version.mk 31 32# --- Files -------------------------------------------------------- 33 34.IF "$(ENABLE_UNIT_TESTS)"!="YES" 35 36all: 37 @echo "Unit tests are disabled. Does not have to be built." 38 39.ELSE 40 41# Assemble the full version number from the parts defined in gtest_version.mk 42LIBGTESTVERSION=$(GTEST_MAJOR).$(GTEST_MINOR).$(GTEST_MICRO) 43 44TARFILE_NAME=$(PRJNAME)-$(LIBGTESTVERSION) 45# This is the SHA1 checksum, not MD5 but tg_ext.mk does not now about this and, 46# thankfully, does not care. 47TARFILE_MD5=2d6ec8ccdf5c46b05ba54a9fd1d130d7 48 49PATCH_FILES= use-own-tuple.patch gtest-python3.patch 50 51.IF "$(OS)"=="WNT" 52 53CONFIGURE_DIR= 54# dirty hack for gbuild whihc relies on .cxx extension for C++ files 55CONFIGURE_ACTION=cp src/gtest-all.cc src/gtest-all.cxx 56CONFIGURE_FLAGS= 57 58BUILD_DIR= 59BUILD_ACTION=$(GNUMAKE) 60BUILD_FLAGS+= -f ../../../../win/Makefile -j$(EXTMAXPROCESS) 61 62.ELIF "$(GUI)" == "OS2" 63 64@all: 65 @echo "using system serf. nothing do do." 66 67.ELSE 68 69.IF "$(OS)"=="LINUX" 70PATCH_FILES+=linux-pthread.patch 71.ENDIF 72 73CONFIGURE_DIR= 74CONFIGURE_ACTION=.$/configure 75 76.IF "$(OS)"=="MACOSX" 77CONFIGURE_FLAGS='CXX=$(CXX)' 78CONFIGURE_FLAGS+='CXXFLAGS=-stdlib=libc++ -U__STRICT_ANSI__ -isysroot $(MACOSX_SDK_PATH)' 79.ENDIF 80 81BUILD_DIR=$(CONFIGURE_DIR) 82BUILD_ACTION=$(GNUMAKE) 83BUILD_FLAGS+= -j$(EXTMAXPROCESS) 84 85 86OUTDIR2INC=include/gtest 87 88.IF "$(OS)"=="MACOSX" 89OUT2LIB=lib/.libs/libgtest.*dylib 90#OUT2LIB+=lib/.libs/libgtest_main.*dylib 91.ELSE 92OUT2LIB=lib/.libs/libgtest.so* 93#OUT2LIB+=lib/.libs/libgtest_main.so* 94.ENDIF 95 96.ENDIF 97 98# --- Targets ------------------------------------------------------ 99 100.INCLUDE : set_ext.mk 101.INCLUDE : target.mk 102.INCLUDE : tg_ext.mk 103 104.ENDIF 105