1# 2# Copyright (C) 2014 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17PWD ?= $(CURDIR) 18OUT ?= $(PWD)/build-opt-local 19 20include common.mk 21 22PC_DEPS = libchrome-$(BASE_VER) libbrillo-$(BASE_VER) openssl 23PC_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(PC_DEPS)) 24PC_LIBS := $(shell $(PKG_CONFIG) --libs $(PC_DEPS)) 25 26CXXFLAGS += -I$(SRC)/.. $(PC_CFLAGS) 27LDLIBS += $(PC_LIBS) 28 29TEST_OBJS := $(filter %_test.o trunks_testrunner.o mock_%.o, $(CXX_OBJECTS)) 30SHARED_OBJS := $(filter-out $(TEST_OBJS), $(CXX_OBJECTS)) 31 32CXX_BINARY(trunks_testrunner): CXXFLAGS += $(shell gtest-config --cxxflags) \ 33 $(shell gmock-config --cxxflags) 34CXX_BINARY(trunks_testrunner): LDLIBS += $(shell gtest-config --libs) \ 35 $(shell gmock-config --libs) 36CXX_BINARY(trunks_testrunner): $(TEST_OBJS) $(SHARED_OBJS) 37 38all: $(SHARED_OBJS) 39tests: TEST(CXX_BINARY(trunks_testrunner)) 40clean: CLEAN(CXX_BINARY(trunks_testrunner)) 41