Skip to content

Commit

Permalink
Add a convenience script for configuring the build using DRW's intern…
Browse files Browse the repository at this point in the history
…al tools
  • Loading branch information
Matt Godbolt committed Jul 24, 2014
1 parent efa977b commit 83889a9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -9,3 +9,4 @@
/configure
/obj
/tags
/.gmock
7 changes: 7 additions & 0 deletions Makefile.in
Expand Up @@ -5,6 +5,13 @@ ARFLAGS=cru
CXX=@CXX@
CXXFLAGS=@CXXFLAGS@
LDFLAGS=@LDFLAGS@
# hack for drw gcc on ubuntu
GCC_MULTIARCH := $(shell gcc -print-multiarch 2>/dev/null)
ifneq ($(GCC_MULTIARCH),)
export LIBRARY_PATH = /usr/lib/$(GCC_MULTIARCH)
export C_INCLUDE_PATH = /usr/include/$(GCC_MULTIARCH)
export CPLUS_INCLUDE_PATH = /usr/include/$(GCC_MULTIARCH)
endif

C_SRC=src/main/c
TEST_SRC=src/test/c
Expand Down
19 changes: 19 additions & 0 deletions scripts/config-for-drw
@@ -0,0 +1,19 @@
#!/bin/bash

set -e

autoconf

GMOCK_DIR=.gmock/gmock-1.7.0

if [ ! -d "${GMOCK_DIR}" ]; then
echo "Grabbing gmock"
mkdir -p .gmock
pushd .gmock
wget https://googlemock.googlecode.com/files/gmock-1.7.0.zip
unzip gmock-1.7.0.zip
popd
fi

GCC_HOME=$(fig -m gcc/4.9.0-2 -g GCC_HOME)
LDFLAGS="-Wl,--rpath,${GCC_HOME}/lib64" CXX=${GCC_HOME}/bin/g++ ./configure --with-gmock=${GMOCK_DIR}

0 comments on commit 83889a9

Please sign in to comment.