aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..92d05e5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+CC=arm-linux-gnueabi-gcc
+
+all: bin bin/kblightd
+
+clean:
+ rm -rf bin
+
+bin:
+ mkdir bin
+
+bin/kblightd: src/main.c
+ ${CC} -static $^ -o $@
+
+run_prep:
+ adb root
+
+run: all run_prep
+ make kill
+
+ adb push bin/kblightd /sbin/
+ adb shell "nohup /sbin/kblightd > /dev/null &" &
+
+debug: all run_prep
+ make kill
+
+ adb push bin/kblightd /sbin/
+ adb shell "/sbin/kblightd"
+
+kill: all
+ adb shell -x pkill kblightd