1# Copyright 2017 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5PKG_CONFIG ?= pkg-config
6DEP_LIBS = libchrome-$(BASE_VER) libcontainer libminijail
7CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(DEP_LIBS))
8CXXFLAGS += -std=gnu++14 -Werror -Wall
9LDFLAGS += $(shell $(PKG_CONFIG) --libs $(DEP_LIBS))
10# Link gtest statically since the DUT does not have libgtest.so
11LDFLAGS += -Wl,-Bstatic -lgtest -Wl,-Bdynamic
12
13TARGET_UNITTEST = libcontainer_target_test
14
15all: $(TARGET_UNITTEST)
16
17$(TARGET_UNITTEST): libcontainer_target_unittest.cc
18	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -g -o $@ $^ $(LDFLAGS)
19
20.PHONY: clean
21clean:
22	$(RM) $(TARGET_UNITTEST)
23