droid-makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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/tsdp.o\
  7. src/tsdp_message.o
  8. ### heasers
  9. OBJS += src/headers/tsdp_header.o\
  10. src/headers/tsdp_header_A.o\
  11. src/headers/tsdp_header_B.o\
  12. src/headers/tsdp_header_C.o\
  13. src/headers/tsdp_header_Dummy.o\
  14. src/headers/tsdp_header_E.o\
  15. src/headers/tsdp_header_I.o\
  16. src/headers/tsdp_header_K.o\
  17. src/headers/tsdp_header_M.o\
  18. src/headers/tsdp_header_O.o\
  19. src/headers/tsdp_header_P.o\
  20. src/headers/tsdp_header_R.o\
  21. src/headers/tsdp_header_S.o\
  22. src/headers/tsdp_header_T.o\
  23. src/headers/tsdp_header_U.o\
  24. src/headers/tsdp_header_V.o\
  25. src/headers/tsdp_header_Z.o
  26. ### parsers
  27. OBJS += src/parsers/tsdp_parser_message.o
  28. $(APP): $(OBJS)
  29. ifeq ($(EXT), a)
  30. $(AR) rcs $@ $^
  31. else
  32. $(CC) $(LDFLAGS) -o $@ $^
  33. endif
  34. %.o: %.c
  35. $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
  36. install: $(APP)
  37. $(ANDROID_SDK_ROOT)/tools/adb remount
  38. $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(LIB_DIR)/$(APP)
  39. $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(LIB_DIR)/$(APP)
  40. clean:
  41. @rm -f $(OBJS) $(APP)