Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(890)

Unified Diff: ports/glibc-compat/Makefile

Issue 1555913002: Build gtest from source rather than using SDK-provided version (Closed) Base URL: https://chromium.googlesource.com/webports.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ports/devenv/pkg_info ('k') | ports/glibc-compat/build.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/glibc-compat/Makefile
diff --git a/ports/glibc-compat/Makefile b/ports/glibc-compat/Makefile
index 72fb15ef916d402cc81d2c7bc5ac2bb41201a999..1c2fb6c628b2d3f18eb6ed5083ad8d39d065f114 100644
--- a/ports/glibc-compat/Makefile
+++ b/ports/glibc-compat/Makefile
@@ -9,6 +9,7 @@ endif
CFLAGS += -Wno-implicit-function-declaration
CPPFLAGS += -Werror -Wno-unused-value -pthread
CPPFLAGS += -DNACL_SDK_VERSION=$(NACL_SDK_VERSION)
+CPPFLAGS += -I$(GTEST_DIR)/include
OUT := out
SOURCES := \
src/alarm.c \
@@ -59,30 +60,33 @@ CC_PREFIX = @echo " CC $@";
AR_PREFIX = @echo " AR $@";
endif
-
ifeq ($(LIBC),newlib)
LIB = $(OUT)/libglibc-compat.a
CPPFLAGS += -Iinclude -Isrc -D_LIBC
endif
+all: $(LIB) $(OUT)/glibc_compat_test
+
$(OUT)/%.o : src/%.c
@mkdir -p $(OUT)
$(CC_PREFIX)$(CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS)
+$(OUT)/gtest-all.o : $(GTEST_DIR)/src/gtest-all.cc
+ @mkdir -p $(OUT)
+ $(CXX_PREFIX)$(CXX) -o $@ -c $< $(CXXFLAGS) $(CPPFLAGS) -I$(GTEST_DIR)
+
$(OUT)/%.o : src/%.cc
@mkdir -p $(OUT)
$(CXX_PREFIX)$(CXX) -o $@ -c $< $(CXXFLAGS) $(CPPFLAGS)
-all: $(LIB) $(OUT)/glibc_compat_test
-
$(OUT)/libglibc-compat.a: $(OBJS)
$(AR_PREFIX)$(AR) rcs $@ $^
-TEST_LIBS=$(LIB) -lgtest -lpthread
+TEST_LIBS=$(LIB) $(OUT)/gtest-all.o -lpthread
-$(OUT)/glibc_compat_test: $(OUT)/test.o $(LIB)
+$(OUT)/glibc_compat_test: $(OUT)/test.o $(OUT)/gtest-all.o $(LIB)
@mkdir -p $(OUT)
- $(CXX_PREFIX)$(CXX) -o $@ $< -L$(OUT) $(LDFLAGS) $(TEST_LIBS)
+ $(CXX_PREFIX)$(CXX) -o $@ $^ -L$(OUT) $(LDFLAGS) -pthread
test: $(OUT)/glibc_compat_test
« no previous file with comments | « ports/devenv/pkg_info ('k') | ports/glibc-compat/build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698