Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .POSIX:
  2. APK = target/android-artifacts/release/apk/darkwallet.apk
  3. SRC = \
  4. build.rs \
  5. Cargo.lock \
  6. Cargo.toml \
  7. Dockerfile \
  8. $(shell find assets -type f) \
  9. $(shell find src -type f) \
  10. $(shell find res -type f)
  11. #FEATURES = --features=emulate-android
  12. all: $(SRC) fonts
  13. cargo lbuild $(FEATURES)
  14. mv target/debug/darkwallet .
  15. ./darkwallet
  16. darkwallet.apk: $(SRC) fonts
  17. podman run -v $(shell pwd)/../../:/root/darkfi -w /root/darkfi/bin/darkwallet/ -t apk cargo quad-apk build --release
  18. cp -f $(APK) $@
  19. ibm-plex-mono-regular.otf:
  20. wget -c https://codeberg.org/darkrenaissance/darkfi/raw/branch/data/ibm-plex-mono-regular.otf
  21. NotoColorEmoji.ttf:
  22. wget -c https://codeberg.org/darkrenaissance/darkfi/raw/branch/data/NotoColorEmoji.ttf
  23. fonts: ibm-plex-mono-regular.otf NotoColorEmoji.ttf
  24. android: $(SRC) fonts
  25. podman run -v $(shell pwd)/../../:/root/darkfi -w /root/darkfi/bin/darkwallet/ -t apk cargo quad-apk build --release
  26. adb uninstall darkfi.darkwallet
  27. adb install $(APK)
  28. reset
  29. adb logcat -c
  30. adb logcat -v color -s darkfi -s SAPP
  31. # Useful for dev
  32. cli:
  33. podman run -v $(shell pwd)/../../:/root/darkfi -w /root/darkfi/bin/darkwallet/ -it apk bash
  34. clean:
  35. podman run -v $(shell pwd):/root/dw -w /root/dw -t apk rm -fr target/
  36. rm -f darkwallet.apk
  37. .PHONY: all android cli clean