mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
ut: add googletest (gtest) install rules
See: http://code.google.com/p/googletest/
This commit is contained in:
parent
264d76382b
commit
06f805b00e
@ -318,3 +318,42 @@ android_sdk_update:
|
||||
$(V0) @echo " UPDATE $(ANDROID_SDK_DIR)"
|
||||
$(ANDROID_SDK_DIR)/tools/android update sdk --no-ui -t platform-tools,android-16,addon-google_apis-google-16
|
||||
|
||||
# Set up Google Test (gtest) tools
|
||||
ifeq ($(V), 1)
|
||||
GTEST_SILENT :=
|
||||
else
|
||||
GTEST_SILENT := --silent
|
||||
endif
|
||||
|
||||
GTEST_DIR := $(TOOLS_DIR)/gtest-1.6.0
|
||||
GTEST_BUILD_DIR := $(DL_DIR)/gtest-build
|
||||
|
||||
.PHONY: gtest_install
|
||||
gtest_install: | $(DL_DIR) $(TOOLS_DIR)
|
||||
gtest_install: GTEST_URL := http://googletest.googlecode.com/files/gtest-1.6.0.zip
|
||||
gtest_install: GTEST_FILE := $(notdir $(GTEST_URL))
|
||||
gtest_install: gtest_clean
|
||||
# download the file unconditionally since google code gives back 404
|
||||
# for HTTP HEAD requests which are used when using the wget -N option
|
||||
$(V1) [ ! -f "$(DL_DIR)/$(GTEST_FILE)" ] || $(RM) -f "$(DL_DIR)/$(GTEST_FILE)"
|
||||
$(V1) wget -P "$(DL_DIR)" --trust-server-name "$(GTEST_URL)"
|
||||
|
||||
# extract the source
|
||||
$(V1) [ ! -d "$(GTEST_DIR)" ] || $(RM) -rf "$(GTEST_DIR)"
|
||||
$(V1) mkdir -p "$(GTEST_DIR)"
|
||||
$(V1) unzip -q -d "$(TOOLS_DIR)" "$(DL_DIR)/$(GTEST_FILE)"
|
||||
|
||||
# build
|
||||
$(V1) ( \
|
||||
cd $(GTEST_DIR) ; \
|
||||
./configure $(GTEST_SILENT) ; \
|
||||
$(MAKE) $(GTEST_SILENT) ; \
|
||||
)
|
||||
|
||||
# delete the extracted source when we're done
|
||||
#$(V1) [ ! -d "$(GTEST_BUILD_DIR)" ] || $(RM) -rf "$(GTEST_BUILD_DIR)"
|
||||
|
||||
.PHONY: gtest_clean
|
||||
gtest_clean:
|
||||
$(V0) @echo " CLEAN $(GTEST_DIR)"
|
||||
$(V1) [ ! -d "$(GTEST_DIR)" ] || $(RM) -rf "$(GTEST_DIR)"
|
||||
|
Loading…
Reference in New Issue
Block a user