droid-makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #Fixed point implementation
  2. APP := lib$(PROJECT)_$(MARCH).$(EXT)
  3. MY_DEFS :=
  4. ifeq ($(LT),shared)
  5. _LT=Bdynamic
  6. else
  7. _LT=Bstatic
  8. endif
  9. LIBS_3RD := -L$(OUTPUT)
  10. INCLUDES_3RD :=
  11. INCLUDES := $(INCLUDES_3RD)
  12. CFLAGS := $(CFLAGS_LIB) $(MY_DEFS) $(INCLUDES) -fno-rtti -fno-exceptions
  13. LDFLAGS := $(LDFLAGS_LIB) -L$(THIRDPARTIES_LIB) -L$(THIRDPARTIES_MARCH_LIB) $(FFMPEG_LDFLAGS) $(VPX_LDLAGS) $(WEBRTC_LDFLAGS) $(SPEEX_DSP_LDFLAGS) $(SPEEX_LDFLAGS) $(OPENCORE_ARM_LDFLAGS) $(BV16_LDFLAGS) $(ILBC_LDFLAGS) $(LIBGSM_LDFLAGS) $(G729_LDFLAGS) \
  14. $(LIBSRTP_LDFLAGS) $(TLS_LDFLAGS) \
  15. -Wl,-Bdynamic -lm -lstdc++ -lgcc -llog \
  16. -Wl,-$(_LT)
  17. all: $(APP)
  18. OBJS = \
  19. api.o \
  20. cpu-features.o\
  21. utils_wrap.o \
  22. $(APP): $(OBJS)
  23. ifeq ($(EXT), a)
  24. $(AR) rcs $@ $^
  25. else
  26. $(CC) $(LDFLAGS) -o $@ $^
  27. endif
  28. %.o: %.c
  29. $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
  30. %.o: %.cxx
  31. $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
  32. install: $(APP)
  33. cp -f $(APP) ../thirdparties/android/lib
  34. shell:
  35. $(ANDROID_SDK_ROOT)/tools/adb shell
  36. run:
  37. $(ANDROID_SDK_ROOT)/tools/adb shell $(LIB_DIR)/$(APP)
  38. clean:
  39. @rm -f $(OBJS) $(APP)