Makefile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. all: $(SRC) fonts
  12. cargo lbuild
  13. mv target/debug/darkwallet .
  14. ./darkwallet
  15. darkwallet.apk: $(SRC) fonts
  16. podman run -v $(shell pwd)/../../:/root/darkfi -w /root/darkfi/bin/darkwallet/ -t apk cargo quad-apk build --release
  17. cp -f $(APK) $@
  18. ibm-plex-mono-regular.otf:
  19. wget -c https://codeberg.org/darkrenaissance/darkfi/raw/branch/data/ibm-plex-mono-regular.otf
  20. NotoColorEmoji.ttf:
  21. wget -c https://codeberg.org/darkrenaissance/darkfi/raw/branch/data/NotoColorEmoji.ttf
  22. fonts: ibm-plex-mono-regular.otf NotoColorEmoji.ttf
  23. android: $(SRC) fonts
  24. podman run -v $(shell pwd)/../../:/root/darkfi -w /root/darkfi/bin/darkwallet/ -t apk cargo quad-apk build --release
  25. adb uninstall darkfi.darkwallet
  26. adb install $(APK)
  27. reset
  28. adb logcat -c
  29. adb logcat -s darkfi
  30. # Useful for dev
  31. cli:
  32. podman run -v $(shell pwd)/../../:/root/darkfi -w /root/darkfi/bin/darkwallet/ -it apk bash
  33. clean:
  34. podman run -v $(shell pwd):/root/dw -w /root/dw -t apk rm -fr target/
  35. rm -f darkwallet.apk
  36. .PHONY: all android cli clean