-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 667 Bytes
/
Copy pathMakefile
File metadata and controls
34 lines (25 loc) · 667 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
CROSSDIR=./arm-eabi-4.8
PREFIX=arm-eabi-
BIN=$(CROSSDIR)/bin
AS=$(BIN)/$(PREFIX)as
OBJCOPY=$(BIN)/$(PREFIX)objcopy
READELF=$(BIN)/$(PREFIX)readelf
DEVICE_DIRECTORY=/sdcard
all: tiny
tiny: main.out
$(OBJCOPY) $< -O binary $@
main.out: main.asm
$(AS) -c $< -o $@
clean:
rm -rf main.out tiny
install: tiny
adb push tiny $(DEVICE_DIRECTORY)/
adb push tiny-install.sh $(DEVICE_DIRECTORY)/
adb shell "su -c '/system/xbin/bash $(DEVICE_DIRECTORY)/tiny-install.sh'"
uninstall:
adb push tiny-uninstall.sh $(DEVICE_DIRECTORY)/
adb shell "su -c '/system/xbin/bash $(DEVICE_DIRECTORY)/tiny-uninstall.sh'"
test: install
./test.sh
readelf: tiny
$(READELF) -a $<