shithub: openh264

Download patch

ref: 51b2ff84fc7845e211d76561453637694b91e93c
parent: eb31cf1d4b3d223d8f02376f5e1dd997376bb64d
parent: 6bf7ad4e2bb75af219d25bf8523a5677cdcf1c69
author: dongzha <dongzha@cisco.com>
date: Thu Jun 5 06:02:24 EDT 2014

Merge pull request #918 from syureyi/de7621

for cleaning .o and .d files generated by android demo

--- a/Makefile
+++ b/Makefile
@@ -102,6 +102,9 @@
 all:	libraries binaries
 
 clean:
+ifeq (android,$(OS))
+clean: clean_Android
+endif
 	$(QUIET)rm -f $(OBJS) $(OBJS:.$(OBJ)=.d) $(LIBRARIES) $(BINARIES)
 
 gtest-bootstrap:
@@ -184,6 +187,10 @@
 
 codec_unittest$(EXEEXT):$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
 	cd ./test/build/android && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
+
+clean_Android: clean_Android_ut
+clean_Android_ut:
+	cd ./test/build/android && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
 
 else
 codec_unittest$(EXEEXT): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(CODEC_UNITTEST_DEPS)
--- a/build/platform-android.mk
+++ b/build/platform-android.mk
@@ -56,6 +56,13 @@
 encdemo: libraries
 	cd ./codec/build/android/enc && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
 
+clean_Android: clean_Android_dec clean_Android_enc
+
+clean_Android_dec:
+	cd ./codec/build/android/dec && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
+clean_Android_enc:
+	cd ./codec/build/android/enc && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
+
 COMMON_INCLUDES += -I$(NDKROOT)/sources/android/cpufeatures
 COMMON_OBJS += $(COMMON_SRCDIR)/cpu-features.$(OBJ)
 
--- a/codec/build/android/dec/jni/welsdecdemo.mk
+++ b/codec/build/android/dec/jni/welsdecdemo.mk
@@ -4,7 +4,9 @@
 include $(CLEAR_VARS)
 LOCAL_MODULE    := wels
 LOCAL_SRC_FILES := ../../../../../libopenh264.so
+ifneq (,$(wildcard $(LOCAL_PATH)/$(LOCAL_SRC_FILES)))
 include $(PREBUILT_SHARED_LIBRARY)
+endif
 
 
 
--- a/codec/build/android/enc/jni/welsencdemo.mk
+++ b/codec/build/android/enc/jni/welsencdemo.mk
@@ -1,10 +1,12 @@
-# Generate the libwelsdecdemo.so file
+# Generate the libwelsencdemo.so file
 LOCAL_PATH := $(call my-dir)
 
 include $(CLEAR_VARS)
 LOCAL_MODULE    := wels
 LOCAL_SRC_FILES := ../../../../../libopenh264.so
+ifneq (,$(wildcard $(LOCAL_PATH)/$(LOCAL_SRC_FILES)))
 include $(PREBUILT_SHARED_LIBRARY)
+endif
 
 
 
--- a/test/build/android/jni/Android.mk
+++ b/test/build/android/jni/Android.mk
@@ -1,10 +1,12 @@
-# Generate the libwelsdecdemo.so file
+# Generate the libutdemo.so file
 LOCAL_PATH := $(call my-dir)
 
 include $(CLEAR_VARS)
 LOCAL_MODULE    := libUT
 LOCAL_SRC_FILES := ../../../../libut.so
+ifneq (,$(wildcard $(LOCAL_PATH)/$(LOCAL_SRC_FILES)))
 include $(PREBUILT_SHARED_LIBRARY)
+endif