From 214ad9de720052fc9e455fdfeda2a42b0607d480 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 15 Apr 2019 13:56:33 -0400 Subject: [PATCH] Replace readme directions with makefile targets. --- demo/magicleap/Makefile | 12 +++++++++--- demo/magicleap/README.md | 15 +++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/demo/magicleap/Makefile b/demo/magicleap/Makefile index 43be8317..32012c97 100644 --- a/demo/magicleap/Makefile +++ b/demo/magicleap/Makefile @@ -1,9 +1,15 @@ -.PHONY: debug release +.PHONY: debug release install debug: cargo build --target aarch64-linux-android - $(MAGICLEAP_SDK)/mabu -t lumin_debug PathfinderDemo.package + $(MAGICLEAP_SDK)/mabu -t debug_device PathfinderDemo.package -s $(MLCERT) release: cargo build --release --target aarch64-linux-android - $(MAGICLEAP_SDK)/mabu -t lumin_release PathfinderDemo.package + $(MAGICLEAP_SDK)/mabu -t release_device PathfinderDemo.package -s $(MLCERT) + +install: .out/PathfinderDemo/PathfinderDemo.mpk + $(MAGICLEAP_SDK)/tools/mldb/mldb install -u .out/PathfinderDemo/PathfinderDemo.mpk + +run: + ${MAGICLEAP_SDK}/tools/mldb/mldb launch -w com.mozilla.pathfinder.demo diff --git a/demo/magicleap/README.md b/demo/magicleap/README.md index fdad43f4..45eebb6f 100644 --- a/demo/magicleap/README.md +++ b/demo/magicleap/README.md @@ -9,22 +9,17 @@ First, install v0.20.0 or later of the Magic Leap SDK. By default this is instal export MLCERT=~/MagicLeap/cert/mycert.cert ``` -Now build the pathfilder demo library: +Now build the pathfinder demo library and `.mpk` archive: ``` - CFLAGS="-I${MAGICLEAP_SDK}/lumin/usr/include --sysroot=${MAGICLEAP_SDK}/lumin/usr" \ - PATH=$PATH:${MAGICLEAP_SDK}/tools/toolchains/bin/ \ - cargo build --release --target=aarch64-linux-android + cd demo/pathfinder + make release ``` -Then build the `.mpk` archive: -``` - ${MAGICLEAP_SDK}/mabu PathfinderDemo.package -t release_device -s ${MLCERT} -``` The `.mpk` can be installed: ``` - ${MAGICLEAP_SDK}/tools/mldb/mldb install -u .out/PathfinderDemo/PathfinderDemo.mpk + make install ``` and run: ``` - ${MAGICLEAP_SDK}/tools/mldb/mldb launch -w com.mozilla.pathfinder.demo + make run ```