aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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