-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
28 lines (21 loc) · 1.04 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
PWD ?= $(CURDIR)
OUT ?= $(PWD)/build-opt-local
include common.mk
PC_DEPS = libchrome-$(BASE_VER) libbrillo-$(BASE_VER) openssl
PC_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(PC_DEPS))
PC_LIBS := $(shell $(PKG_CONFIG) --libs $(PC_DEPS))
CXXFLAGS += -I$(SRC)/.. $(PC_CFLAGS)
LDLIBS += $(PC_LIBS)
TEST_OBJS := $(filter %_test.o trunks_testrunner.o mock_%.o, $(CXX_OBJECTS))
SHARED_OBJS := $(filter-out $(TEST_OBJS), $(CXX_OBJECTS))
CXX_BINARY(trunks_testrunner): CXXFLAGS += $(shell gtest-config --cxxflags) \
$(shell gmock-config --cxxflags)
CXX_BINARY(trunks_testrunner): LDLIBS += $(shell gtest-config --libs) \
$(shell gmock-config --libs)
CXX_BINARY(trunks_testrunner): $(TEST_OBJS) $(SHARED_OBJS)
all: $(SHARED_OBJS)
tests: TEST(CXX_BINARY(trunks_testrunner))
clean: CLEAN(CXX_BINARY(trunks_testrunner))