ref: b4c8f6b778ff0dd3102f9fdd1737dcf80d5ffe06
parent: c2c355b62341874eae06f281386be73452d266da
author: zhuling13 <zhulingwei2012@gmail.com>
date: Mon Jun 2 16:21:10 EDT 2014
for cleaning .o and .d files generated by android demo
--- a/Makefile
+++ b/Makefile
@@ -102,6 +102,10 @@
all: libraries binaries
clean:
+
+ifeq (android,$(OS))
+clean:clean_Android
+endif
$(QUIET)rm -f $(OBJS) $(OBJS:.$(OBJ)=.d) $(LIBRARIES) $(BINARIES)
gtest-bootstrap:
@@ -184,6 +188,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
@@ -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/test/build/android/jni/Android.mk
+++ b/test/build/android/jni/Android.mk
@@ -4,7 +4,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE := libUT
LOCAL_SRC_FILES := ../../../../libut.so
+ifneq (,$(wildcard $(LOCAL_PATH)/$(LOCAL_SRC_FILES)))
include $(PREBUILT_SHARED_LIBRARY)
+endif