droid-makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. APP := lib$(PROJECT)_$(MARCH).$(EXT)
  2. CFLAGS := $(CFLAGS_LIB) -I../tinySAK/src -I../tinyNET/src -I./include
  3. LDFLAGS := $(LDFLAGS_LIB) -ltinySAK_$(MARCH) -ltinyNET_$(MARCH)
  4. all: $(APP)
  5. OBJS = \
  6. src/thttp.o\
  7. src/thttp_action.o\
  8. src/thttp_dialog.o\
  9. src/thttp_event.o\
  10. src/thttp_message.o\
  11. src/thttp_session.o\
  12. src/thttp_url.o
  13. ###################
  14. ## AUTH
  15. ###################
  16. OBJS += src/auth/thttp_auth.o\
  17. src/auth/thttp_challenge.o
  18. ###################
  19. ## HEADERS
  20. ###################
  21. OBJS += src/headers/thttp_header.o\
  22. src/headers/thttp_header_Authorization.o\
  23. src/headers/thttp_header_Content_Length.o\
  24. src/headers/thttp_header_Content_Type.o\
  25. src/headers/thttp_header_Dummy.o\
  26. src/headers/thttp_header_ETag.o\
  27. src/headers/thttp_header_Sec_WebSocket_Accept.o\
  28. src/headers/thttp_header_Sec_WebSocket_Key.o\
  29. src/headers/thttp_header_Sec_WebSocket_Protocol.o\
  30. src/headers/thttp_header_Sec_WebSocket_Version.o\
  31. src/headers/thttp_header_Transfer_Encoding.o\
  32. src/headers/thttp_header_WWW_Authenticate.o
  33. ###################
  34. ## parsers
  35. ###################
  36. OBJS += src/parsers/thttp_parser_header.o\
  37. src/parsers/thttp_parser_message.o\
  38. src/parsers/thttp_parser_url.o
  39. $(APP): $(OBJS)
  40. ifeq ($(EXT), a)
  41. $(AR) rcs $@ $^
  42. else
  43. $(CC) $(LDFLAGS) -o $@ $^
  44. endif
  45. %.o: %.c
  46. $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
  47. install: $(APP)
  48. $(ANDROID_SDK_ROOT)/tools/adb remount
  49. $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(LIB_DIR)/$(APP)
  50. $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(LIB_DIR)/$(APP)
  51. clean:
  52. @rm -f $(OBJS) $(APP)