blob: ba5a9dc9cf29032c2c1f0ada58761c82b3a7a108 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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 ../$@
|