aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLena <lena@omega>2026-01-01 00:00:00 +0000
committerLena <lena@omega>2026-01-01 00:00:00 +0000
commit7e04941bccb2683f8a6e3ee38a99c50129234dd1 (patch)
tree471227fa437291e7a6b499e3de6c106c54eaf311 /Makefile
downloadrsend-7e04941bccb2683f8a6e3ee38a99c50129234dd1.tar.gz
rsend: push phone folders to a home SSH host over rsync
A small Android app for one-way folder backup, a KISS alternative to Syncthing. It bundles rsync (built from pinned source via the NDK) and a pure-Go SSH transport, both shipped in the APK as lib*.so and run from the native library directory. rsend pins the host key, stores the ed25519 identity Keystore-encrypted, pushes each folder additively or as a mirror, and runs on demand or on a WiFi-only schedule. The build is self-contained and reproducible: make setup provisions the toolchain, make builds rsync, rsh, and the APK.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c41c7e4
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+# rsend build orchestration. Heavy lifting lives in the shell scripts so the
+# project builds with one `make` on any Debian box with the pinned toolchain.
+
+.POSIX:
+
+all: native app
+
+# Provision the pinned toolchain (JDK, Go, Android SDK+NDK, Gradle) into
+# $HOME/toolchains. One-time; then `. $HOME/toolchains/env.sh` before building.
+setup:
+ sh ci/setup-toolchain.sh
+
+# Native executables, shipped inside the APK as lib*.so.
+native: rsync rsh
+
+# Real rsync, cross-compiled from pinned source via the Android NDK.
+rsync:
+ sh rsync/build.sh
+
+# Go SSH transport, cross-compiled to Bionic PIE via the NDK (needs the NDK,
+# like rsync). rsh logic is verified host-side by `make test`.
+rsh:
+ sh rsh/build.sh
+
+# Android app. Consumes the native libs from app/src/main/jniLibs. Uses the
+# pinned system gradle; run from the repo root where settings.gradle lives. No
+# wrapper jar is committed; gradle/wrapper/gradle-wrapper.properties only pins
+# the version for F-Droid's gradlew, which refuses to build without it.
+app: native
+ gradle :app:assembleRelease
+
+test:
+ sh ci/test.sh
+
+verify-repro:
+ sh ci/verify-repro.sh
+
+clean:
+ rm -rf out app/build app/src/main/jniLibs rsync/work rsh/rsh
+
+.PHONY: all setup native rsync rsh app test verify-repro clean