droid-makefile 806 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. APP := lib$(PROJECT)_$(MARCH).$(EXT)
  2. CFLAGS := $(CFLAGS_LIB) -I../tinySAK/src -I./include
  3. LDFLAGS := $(LDFLAGS_LIB) -ltinySAK_$(MARCH)
  4. all: $(APP)
  5. OBJS = \
  6. src/tsms.o\
  7. src/tsms_address.o\
  8. src/tsms_common.o\
  9. src/tsms_packing.o
  10. ### rpdu
  11. OBJS += src/rpdu/tsms_rpdu.o
  12. ### tpdu
  13. OBJS += src/tpdu/tsms_tpdu_command.o\
  14. src/tpdu/tsms_tpdu_deliver.o\
  15. src/tpdu/tsms_tpdu_report.o\
  16. src/tpdu/tsms_tpdu_status_report.o\
  17. src/tpdu/tsms_tpdu_submit.o
  18. $(APP): $(OBJS)
  19. ifeq ($(EXT), a)
  20. $(AR) rcs $@ $^
  21. else
  22. $(CC) $(LDFLAGS) -o $@ $^
  23. endif
  24. %.o: %.c
  25. $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
  26. install: $(APP)
  27. $(ANDROID_SDK_ROOT)/tools/adb remount
  28. $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(LIB_DIR)/$(APP)
  29. $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(LIB_DIR)/$(APP)
  30. clean:
  31. @rm -f $(OBJS) $(APP)