diff options
author | Mike Frysinger <vapier@chromium.org> | 2012-03-07 17:08:02 -0500 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-03-08 13:21:54 -0800 |
commit | c0c41663ecad1f10f2acc048fd78532f7003ab0e (patch) | |
tree | 12c1cc95841bc5422aef217561d66659a8648170 | |
parent | d355d9b6aff489fe3f04b9dd9090ccba7dde48fa (diff) | |
download | vboot-c0c41663ecad1f10f2acc048fd78532f7003ab0e.tar.gz |
convert to SLOT-ed libbase
We need to use the .pc file to get the compiling/linking details,
so switch over to that.
While we're here, fix the hardcoded `ar` to use $(AR) from the env.
BUG=chromium-os:16623
TEST=`emerge-x86-alex vboot_reference` builds & links CgptManagerTests against newer libbase
Change-Id: I20865138fdfd1725415d737ad5fdbc4c134079a7
Reviewed-on: https://gerrit.chromium.org/gerrit/17533
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
-rw-r--r-- | tests/Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/Makefile b/tests/Makefile index 32a733b8..fc4041d5 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -2,6 +2,13 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +PKG_CONFIG ?= pkg-config + +BASE_VER = 85268 +PC_DEPS = libchrome-$(BASE_VER) +PC_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(PC_DEPS)) +PC_LIBS := $(shell $(PKG_CONFIG) --libs $(PC_DEPS)) + ifeq ($(FIRMWARE_ARCH),) CFLAGS += -DCHROMEOS_ENVIRONMENT CXXFLAGS += -DCHROMEOS_ENVIRONMENT @@ -12,7 +19,8 @@ INCLUDES += -I./include \ -I$(FWDIR)/lib/cgptlib/include \ -I$(FWDIR)/lib/cryptolib/include \ -I$(FWDIR)/lib/tpm_lite/include \ - -I$(HOSTDIR)/include + -I$(HOSTDIR)/include \ + $(PC_CFLAGS) BUILD_ROOT = ${BUILD}/tests @@ -63,7 +71,7 @@ cgptmanager_tests: $(BUILD_ROOT)/CgptManagerTests ${TEST_LIB}: ${TEST_LIB_OBJS} rm -f $@ - ar qc $@ $^ + $(AR) rc $@ $^ ${BUILD_ROOT}/CgptManagerTests.o: CgptManagerTests.cc @@ -71,7 +79,7 @@ ${BUILD_ROOT}/CgptManagerTests.o: CgptManagerTests.cc ${BUILD_ROOT}/CgptManagerTests: ${BUILD_ROOT}/CgptManagerTests.o $(CXX) $(CXXFLAGS) $(INCLUDES) $(LDFLAGS) -lgtest -lgflags $^ \ - ${BUILD}/cgpt/libcgpt-cc.a -lbase -lpthread -lrt -o $@ + ${BUILD}/cgpt/libcgpt-cc.a $(PC_LIBS) -o $@ ${BUILD_ROOT}/vboot_audio_for_test.o : $(FWDIR)/lib/vboot_audio.c $(CC) $(CFLAGS) -DCUSTOM_MUSIC $(INCLUDES) \ |