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 6BASE_VER = $(shell cat $(SYSROOT)/usr/share/libchrome/BASE_VER) 7DEP_LIBS = libchrome libcontainer libminijail 8CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(DEP_LIBS)) 9CXXFLAGS += -std=gnu++14 -Werror -Wall 10LDFLAGS += $(shell $(PKG_CONFIG) --libs $(DEP_LIBS)) 11LDFLAGS += -lgtest 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