xref: /trunk/ext_libraries/gtest/makefile.mk (revision 09a7098b)
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=
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
69CONFIGURE_DIR=
70CONFIGURE_ACTION=.$/configure
71
72.IF "$(OS)"=="MACOSX"
73CONFIGURE_FLAGS='CXX=$(CXX)'
74CONFIGURE_FLAGS+='CXXFLAGS=-stdlib=libc++ -U__STRICT_ANSI__'
75.ENDIF
76
77BUILD_DIR=$(CONFIGURE_DIR)
78BUILD_ACTION=$(GNUMAKE)
79BUILD_FLAGS+= -j$(EXTMAXPROCESS)
80
81
82OUTDIR2INC=include/gtest
83
84.IF "$(OS)"=="MACOSX"
85OUT2LIB=lib/.libs/libgtest.*dylib
86#OUT2LIB+=lib/.libs/libgtest_main.*dylib
87.ELSE
88OUT2LIB=lib/.libs/libgtest.so*
89#OUT2LIB+=lib/.libs/libgtest_main.so*
90.ENDIF
91
92.ENDIF
93
94# --- Targets ------------------------------------------------------
95
96.INCLUDE : set_ext.mk
97.INCLUDE : target.mk
98.INCLUDE : tg_ext.mk
99
100.ENDIF
101