shithub: openh264

Download patch

ref: 235f6e3474e4a44a9e54be4be653d6dc5ed08500
parent: 77552551f76ee607da92dbd1bdfe83023867903b
author: zhuiling <[email protected]>
date: Fri Sep 12 05:56:51 EDT 2014

improve py

--- a/build/mktargets.py
+++ b/build/mktargets.py
@@ -142,6 +142,9 @@
         f.write("\t$(%s_SRCDIR)/%s\\\n"%(PREFIX, c))
     f.write("\n")
     f.write("%s_OBJSASM += $(%s_ASM_SRCS:.asm=.$(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")
 
 if len(armfiles) > 0:
     f.write("%s_ASM_ARM_SRCS=\\\n"%(PREFIX))
@@ -149,6 +152,9 @@
         f.write("\t$(%s_SRCDIR)/%s\\\n"%(PREFIX, c))
     f.write("\n")
     f.write("%s_OBJSARM += $(%s_ASM_ARM_SRCS:.S=.$(OBJ))\n\n"%(PREFIX, PREFIX))
+     f.write("ifeq ($(ASM_ARCH), arm)\n")
+    f.write("%s_OBJS += $(%s_OBJSARM)\n"%(PREFIX,PREFIX))
+    f.write("endif\n\n")
 
 if len(arm64files) > 0:
     f.write("%s_ASM_ARM64_SRCS=\\\n"%(PREFIX))
@@ -156,19 +162,13 @@
         f.write("\t$(%s_SRCDIR)/%s\\\n"%(PREFIX, c))
     f.write("\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("ifeq ($(ASM_ARCH), arm64)\n")
     f.write("%s_OBJS += $(%s_OBJSARM64)\n"%(PREFIX,PREFIX))
     f.write("endif\n\n")
 
-    f.write("OBJS += $(%s_OBJSASM)\n"%(PREFIX))
-    f.write("OBJS += $(%s_OBJSARM)\n"%(PREFIX))
-    f.write("OBJS += $(%s_OBJSARM64)\n"%(PREFIX))
+f.write("OBJS += $(%s_OBJSASM)\n"%(PREFIX))
+f.write("OBJS += $(%s_OBJSARM)\n"%(PREFIX))
+f.write("OBJS += $(%s_OBJSARM64)\n"%(PREFIX))
 f.write("OBJS += $(%s_OBJS)\n"%(PREFIX))
 
 write_cpp_rule_pattern(f)