Home | History | Annotate | Download | only in src
      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 
      5 PKG_CONFIG ?= pkg-config
      6 DEP_LIBS = libchrome-$(BASE_VER) libcontainer libminijail
      7 CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(DEP_LIBS))
      8 CXXFLAGS += -std=gnu++14 -Werror -Wall
      9 LDFLAGS += $(shell $(PKG_CONFIG) --libs $(DEP_LIBS))
     10 # Link gtest statically since the DUT does not have libgtest.so
     11 LDFLAGS += -Wl,-Bstatic -lgtest -Wl,-Bdynamic
     12 
     13 TARGET_UNITTEST = libcontainer_target_test
     14 
     15 all: $(TARGET_UNITTEST)
     16 
     17 $(TARGET_UNITTEST): libcontainer_target_unittest.cc
     18 	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -g -o $@ $^ $(LDFLAGS)
     19 
     20 .PHONY: clean
     21 clean:
     22 	$(RM) $(TARGET_UNITTEST)
     23