summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile52
1 files changed, 52 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ba5a9dc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,52 @@
+#!/usr/bin/make -f
+
+stampdir = stamps/
+
+info:
+ echo "run make all"
+
+all: $(stampdir)scimark $(stampdir)nbench
+
+$(stampdir)init:
+ install -d $(stampdir)
+ # first add required PPA
+ echo "deb http://ppa.launchpad.net/linaro-maintainers/staging-overlay/ubuntu precise main" >>/etc/apt/sources.list
+
+ # then enable armhf support
+ echo "foreign-architecture armhf" >>/etc/dpkg/dpkg.cfg.d/multiarch
+ echo "deb [arch=armhf] http://ports.ubuntu.com/ precise main universe" >>/etc/apt/sources.list
+
+ # then enable sources
+ echo "deb-src http://archive.ubuntu.com/ubuntu/ precise main universe" >>/etc/apt/sources.list
+
+ apt-get install -y --force-yes unzip quilt
+ touch $@
+
+$(stampdir)install-cross-compiler: $(stampdir)init
+ # update APT cache
+ apt-get update || true
+
+ # then install cross compiler
+ apt-get install gcc-linaro-arm-linux-gnueabihf libgmp-dev:armhf -y --force-yes
+ touch $@
+
+$(stampdir)nbench: $(stampdir)install-cross-compiler
+ tar xf tarballs/nbench-byte-2.2.3.tar.gz
+ cd nbench-byte-2.2.3/; \
+ QUILT_PATCHES=../tarballs/patches/nbench quilt push -a; \
+ PATH=/usr/lib/gcc-linaro-cross/bin/:$$PATH make CC=arm-linux-gnueabihf-gcc && \
+ touch ../$@
+
+$(stampdir)gmpbench: $(stampdir)install-cross-compiler
+ tar xf tarballs/gmpbench-0.2.tar.bz2
+ pushd gmpbench-0.2/
+ CC=arm-linux-gnueabihf-gcc sh compile.sh
+ touch ../$@
+
+
+$(stampdir)scimark: $(stampdir)install-cross-compiler
+ install -d scimark
+ cd scimark && unzip ../tarballs/scimark2_1c.zip ;\
+ QUILT_PATCHES=../tarballs/patches/scimark quilt push -a; \
+ PATH=/usr/lib/gcc-linaro-cross/bin/:$$PATH make CC=arm-linux-gnueabihf-gcc && \
+ touch ../$@