droid-makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. APP := demo
  2. FFMPEG_LDFLAGS := -L../thirdparties/android/lib -lavutil -lswscale -lavcodec -lgcc
  3. CFLAGS := $(CFLAGS_COMMON) -I../tinySAK/src -I../tinyNET/src -I../tinySMS/include -I../tinyHTTP/include -I../tinySDP/include -I../tinyDAV/include -I../tinyMEDIA/include -I../tinySIP/include
  4. LDFLAGS := $(LDFLAGS_COMMON) -Wl,-Bsymbolic,--whole-archive -Wl,--entry=main -lm $(FFMPEG_LDFLAGS) -ltinySAK -ltinyNET -ltinyHTTP -ltinyIPSec -ltinySMS -ltinySDP -ltinyMEDIA -ltinyDAV -ltinySIP
  5. all: $(APP)
  6. OBJS = \
  7. cmd.o \
  8. common.o \
  9. dssl.o \
  10. invite.o \
  11. main.o \
  12. message.o \
  13. options.o \
  14. publish.o \
  15. register.o \
  16. subscribe.o
  17. $(APP): $(OBJS)
  18. $(CC) $(LDFLAGS) -o $@ $^
  19. %.o: %.c
  20. $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
  21. install: $(APP)
  22. $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(EXEC_DIR)/$(APP)
  23. $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(EXEC_DIR)/$(APP)
  24. ifneq ($(SN), )
  25. $(ANDROID_SDK_ROOT)/tools/adb push $(SN) $(EXEC_DIR)
  26. $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(EXEC_DIR)/$(SN)
  27. endif
  28. run:
  29. $(ANDROID_SDK_ROOT)/tools/adb shell $(EXEC_DIR)/$(APP)
  30. #dbg:
  31. # $(MAKE) $(MAKEFILE) DEBUG="-g -DDEBUG"
  32. # $(MAKE) $(MAKEFILE) install
  33. clean:
  34. @rm -f $(OBJS) $(APP)