summaryrefslogtreecommitdiff
path: root/tests/test-progs/hello/src/Makefile.x86
diff options
context:
space:
mode:
authorJason Lowe-Power <jason@lowepower.com>2017-09-21 20:43:30 -0500
committerJason Lowe-Power <jason@lowepower.com>2018-08-17 16:37:42 +0000
commita440108cc540c3edcdf7aca953ea5ddb1cc6e8ab (patch)
treec59bfe3ab59b124bd6f687b7a248ee03fb501830 /tests/test-progs/hello/src/Makefile.x86
parentbbb5302f342a5c0759bb99e04a31d85dd1846a3e (diff)
downloadgem5-a440108cc540c3edcdf7aca953ea5ddb1cc6e8ab.tar.xz
tests: Add Makefiles for hello
This adds Makefiles for hello for ARM and x86 by leveraging docker and dockcross. See https://github.com/dockcross/dockcross for more information. These Makefiles also allow for automatic uploading to the correct location for users to download when running the new tests. Change-Id: I7085000393cd5283502a7af362c85befda749181 Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/4883
Diffstat (limited to 'tests/test-progs/hello/src/Makefile.x86')
-rw-r--r--tests/test-progs/hello/src/Makefile.x8631
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/test-progs/hello/src/Makefile.x86 b/tests/test-progs/hello/src/Makefile.x86
new file mode 100644
index 000000000..3eff29145
--- /dev/null
+++ b/tests/test-progs/hello/src/Makefile.x86
@@ -0,0 +1,31 @@
+SERVER_USER=
+SERVER_PATH=/z/www/htdocs/dist/current/test-progs/hello/bin/x86/linux
+FETCH_PATH=http://gem5.org/dist/current/test-progs/hello/bin/x86/linux
+
+UPLOAD_LOCATION=$(SERVER_USER)daystrom.gem5.org:$(SERVER_PATH)
+
+all: hello64-static hello64-dynamic hello32-static
+
+
+upload: hello64-static hello64-dynamic hello32-static
+ scp hello64-static hello64-dynamic hello32-static $(UPLOAD_LOCATION)
+
+hello64-static: hello.c dockcross-x64
+ ./dockcross-x64 bash -c '$$CC hello.c -o hello64-static -static'
+
+hello64-dynamic: hello.c dockcross-x64
+ ./dockcross-x64 bash -c '$$CC hello.c -o hello64-dynamic'
+
+hello32-static: hello.c dockcross-x86
+ ./dockcross-x86 bash -c '$$CC hello.c -o hello32-static -static'
+
+dockcross-x64:
+ docker run --rm dockcross/linux-x64 > ./dockcross-x64
+ chmod +x ./dockcross-x64
+
+dockcross-x86:
+ docker run --rm dockcross/linux-x86 > ./dockcross-x86
+ chmod +x ./dockcross-x86
+
+clean:
+ rm -f dockcross-* hello64-static hello64-dynamic hello32-static