shithub: openh264

Download patch

ref: a1dbf6ab13d22dc83896f7f69aabde426445d3a5
parent: ef590de0dcd14f4a2c27b90aa2b5a6c60c04adff
author: zhuiling <[email protected]>
date: Fri Sep 5 12:38:28 EDT 2014

make clean without OS ARCH except android platform

--- a/Makefile
+++ b/Makefile
@@ -136,7 +136,7 @@
 ifeq (android,$(OS))
 clean: clean_Android
 endif
-	$(QUIET)rm -f $(OBJS) $(OBJS:.$(OBJ)=.d) $(LIBRARIES) $(BINARIES)
+	$(QUIET)rm -f $(OBJS) $(OBJS:.$(OBJ)=.d) $(OBJS:.$(OBJ)=.obj) $(LIBRARIES) $(BINARIES) *.lib *.a *.dylib *.dll *.so
 
 gmp-bootstrap:
 	if [ ! -d gmp-api ] ; then git clone https://github.com/mozilla/gmp-api gmp-api ; fi
--- a/build/mktargets.py
+++ b/build/mktargets.py
@@ -137,33 +137,40 @@
     f.write("%s_OBJS += $(%s_C_SRCS:.c=.$(OBJ))\n\n"%(PREFIX, PREFIX))
 
 if len(asm) > 0:
-    f.write("ifeq ($(ASM_ARCH), x86)\n")
     f.write("%s_ASM_SRCS=\\\n"%(PREFIX))
     for c in asm:
         f.write("\t$(%s_SRCDIR)/%s\\\n"%(PREFIX, c))
     f.write("\n")
-    f.write("%s_OBJS += $(%s_ASM_SRCS:.asm=.$(OBJ))\n"%(PREFIX, PREFIX))
-    f.write("endif\n\n")
+    f.write("%s_OBJSASM += $(%s_ASM_SRCS:.asm=.$(OBJ))\n\n"%(PREFIX, PREFIX))
 
 if len(armfiles) > 0:
-    f.write("ifeq ($(ASM_ARCH), arm)\n")
     f.write("%s_ASM_ARM_SRCS=\\\n"%(PREFIX))
     for c in armfiles:
         f.write("\t$(%s_SRCDIR)/%s\\\n"%(PREFIX, c))
     f.write("\n")
-    f.write("%s_OBJS += $(%s_ASM_ARM_SRCS:.S=.$(OBJ))\n"%(PREFIX, PREFIX))
-    f.write("endif\n\n")
+    f.write("%s_OBJSARM += $(%s_ASM_ARM_SRCS:.S=.$(OBJ))\n\n"%(PREFIX, PREFIX))
 
 if len(arm64files) > 0:
-    f.write("ifeq ($(ASM_ARCH), arm64)\n")
     f.write("%s_ASM_ARM64_SRCS=\\\n"%(PREFIX))
     for c in arm64files:
         f.write("\t$(%s_SRCDIR)/%s\\\n"%(PREFIX, c))
     f.write("\n")
-    f.write("%s_OBJS += $(%s_ASM_ARM64_SRCS:.S=.$(OBJ))\n"%(PREFIX, PREFIX))
-    f.write("endif\n\n")
+    f.write("%s_OBJSARM64 += $(%s_ASM_ARM64_SRCS:.S=.$(OBJ))\n\n"%(PREFIX, PREFIX))
+    
+f.write("ifeq ($(ASM_ARCH), x86)\n")
+f.write("%s_OBJS += $(%s_OBJSASM)\n"%(PREFIX,PREFIX))
+f.write("endif\n\n")
+f.write("ifeq ($(ASM_ARCH), arm)\n")
+f.write("%s_OBJS += $(%s_OBJSARM)\n"%(PREFIX,PREFIX))
+f.write("endif\n\n")
+f.write("ifeq ($(ASM_ARCH), arm64)\n")
+f.write("%s_OBJS += $(%s_OBJSARM64)\n"%(PREFIX,PREFIX))
+f.write("endif\n\n")
 
-f.write("OBJS += $(%s_OBJS)\n"%PREFIX)
+f.write("OBJS += $(%s_OBJSASM)\n\n"%(PREFIX))
+f.write("OBJS += $(%s_OBJSARM)\n\n"%(PREFIX))
+f.write("OBJS += $(%s_OBJSARM64)\n\n"%(PREFIX))
+f.write("OBJS += $(%s_OBJS)\n\n"%(PREFIX))
 
 write_cpp_rule_pattern(f)