droid-makefile 616 B

12345678910111213141516171819202122232425262728
  1. APP := test
  2. CFLAGS := $(CFLAGS_COMMON) -I../include -I../../tinySAK/src
  3. LDFLAGS := $(LDFLAGS_COMMON) -Wl,-Bsymbolic,--whole-archive -l$(PROJECT) -ltinySAK -Wl,--entry=main
  4. all: $(APP)
  5. OBJS += $(APP).o
  6. $(APP): $(OBJS)
  7. $(CC) $(LDFLAGS) -o $@ $^
  8. %.o: %.c
  9. $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
  10. install: $(APP)
  11. $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(EXEC_DIR)/$(APP)
  12. $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(EXEC_DIR)/$(APP)
  13. run:
  14. $(ANDROID_SDK_ROOT)/tools/adb shell $(EXEC_DIR)/$(APP)
  15. #dbg:
  16. # $(MAKE) $(MAKEFILE) DEBUG="-g -DDEBUG"
  17. # $(MAKE) $(MAKEFILE) install
  18. clean:
  19. @rm -f $(OBJS) $(APP)