droid-makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. APP := lib$(PROJECT).$(EXT)
  2. DOUBANGO_INSTALL_INC := $(DOUBANGO_INSTALL_HOME)/include
  3. DOUBANGO_INSTALL_LIB := $(DOUBANGO_INSTALL_HOME)/lib
  4. SLES_INC := $(SLES_INSTALL_HOME)/include
  5. SLES_LIB := $(SLES_INSTALL_HOME)/lib
  6. ################################
  7. CFLAGS := $(CFLAGS_LIB) -DANDROID=1 -I$(SLES_INC) -I$(DOUBANGO_INSTALL_INC)/tinysak -I$(DOUBANGO_INSTALL_INC)/tinymedia -I$(DOUBANGO_INSTALL_INC)/tinysdp -I$(DOUBANGO_INSTALL_INC)/tinyrtp -I$(DOUBANGO_INSTALL_INC)/tinydav
  8. LDFLAGS := $(LDFLAGS_LIB) -L$(SLES_LIB) -L$(DOUBANGO_INSTALL_LIB) -ltinySAK -ltinyMEDIA -ltinySDP
  9. # -L$(DOUBANGO_SRC_HOME)/thirdparties/andy/$(CPU)/lib/dist -lm -ldl -llog -lgcc -lstdc++ -lOpenSLES -lgnustl
  10. all: $(APP)
  11. OBJS = \
  12. audio_opensles.o \
  13. audio_opensles_consumer.o \
  14. audio_opensles_device_impl.o \
  15. audio_opensles_producer.o \
  16. audio_opensles_device.o \
  17. ../../tinyDAV/src/audio/tdav_consumer_audio.o \
  18. ../../tinyDAV/src/audio/tdav_producer_audio.o \
  19. $(APP): $(OBJS)
  20. ifeq ($(EXT), a)
  21. $(AR) rcs $@ $^
  22. else
  23. $(CC) $(LDFLAGS) -o $@ $^
  24. endif
  25. %.o: %.c
  26. $(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
  27. %.o: %.cxx
  28. $(CXX) -c $(INCLUDE) $(CFLAGS) $< -o $@
  29. install: $(APP)
  30. $(ANDROID_SDK_ROOT)/tools/adb remount
  31. $(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(LIB_DIR)/$(APP)
  32. $(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(LIB_DIR)/$(APP)
  33. clean:
  34. @rm -f $(OBJS) $(APP)