Skip to content

Instantly share code, notes, and snippets.

@hikiko
Last active April 19, 2019 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hikiko/fed03c9aa8fc2e14f374cdfbcda5537a to your computer and use it in GitHub Desktop.
Save hikiko/fed03c9aa8fc2e14f374cdfbcda5537a to your computer and use it in GitHub Desktop.
Android makefile (not for apk). Just a reminder for adb stuff, compiler selection etc
obj = main.o
bin = test
toolchain_prefix = armv7a-linux-androideabi28-
CC = $(toolchain_prefix)clang
CFLAGS = -pedantic -Wall -g -O0
$(bin): $(obj)
$(CC) -o $@ $(obj) $(LDFLAGS)
.PHONY: clean
clean:
rm -f $(obj) $(bin)
.PHONY: install
install: $(bin)
adb push $(bin) /data/local/tmp
.PHONY: run
run:
adb shell "cd /data/local/tmp && ./$(bin)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment