shithub: openh264

Download patch

ref: 901b89f7ad87c1b2969f3adf513b6eedf04aabe2
parent: 5f4d2801a1119dbed4508c1244c3d85e03a0fc46
parent: 3ccd2ae4cf47d6099737d1a842a67edc4c42ea74
author: volvet <qizh@cisco.com>
date: Tue Mar 4 05:16:01 EST 2014

Merge pull request #376 from mstorsjo/simplify-x86-asm-makefiles

Simplify makefiles with respect to x86 assembly

--- a/build/mktargets.py
+++ b/build/mktargets.py
@@ -112,7 +112,6 @@
     f.write("%s_OBJS += $(%s_C_SRCS:.c=.o)\n\n"%(PREFIX, PREFIX))
 
 if len(asm) > 0:
-    f.write("ifeq ($(USE_ASM), Yes)\n")
     f.write("ifeq ($(ASM_ARCH), x86)\n")
     f.write("%s_ASM_SRCS=\\\n"%(PREFIX))
     for c in asm:
@@ -119,7 +118,6 @@
         f.write("\t$(%s_SRCDIR)/%s\\\n"%(PREFIX, c))
     f.write("\n")
     f.write("%s_OBJS += $(%s_ASM_SRCS:.asm=.o)\n"%(PREFIX, PREFIX))
-    f.write("endif\n")
     f.write("endif\n\n")
 
 f.write("OBJS += $(%s_OBJS)\n"%PREFIX)
--- a/build/platform-freebsd.mk
+++ b/build/platform-freebsd.mk
@@ -2,10 +2,12 @@
 SHAREDLIBSUFFIX = so
 CFLAGS += -fPIC -DMT_ENABLED
 LDFLAGS += -lpthread
+ifeq ($(ASM_ARCH), x86)
 ASMFLAGS += -DNOPREFIX
 ifeq ($(ENABLE64BIT), Yes)
 ASMFLAGS += -f elf64
 else
 ASMFLAGS += -f elf
+endif
 endif
 
--- a/build/platform-linux.mk
+++ b/build/platform-linux.mk
@@ -2,10 +2,12 @@
 SHAREDLIBSUFFIX = so
 CFLAGS += -Werror -fPIC -DLINUX -DMT_ENABLED -MMD -MP
 LDFLAGS += -lpthread
+ifeq ($(ASM_ARCH), x86)
 ASMFLAGS += -DNOPREFIX
 ifeq ($(ENABLE64BIT), Yes)
 ASMFLAGS += -f elf64
 else
 ASMFLAGS += -f elf32
+endif
 endif
 
--- a/codec/common/targets.mk
+++ b/codec/common/targets.mk
@@ -8,7 +8,6 @@
 
 COMMON_OBJS += $(COMMON_CPP_SRCS:.cpp=.o)
 
-ifeq ($(USE_ASM), Yes)
 ifeq ($(ASM_ARCH), x86)
 COMMON_ASM_SRCS=\
 	$(COMMON_SRCDIR)/asm_inc.asm\
@@ -22,7 +21,6 @@
 	$(COMMON_SRCDIR)/vaa.asm\
 
 COMMON_OBJS += $(COMMON_ASM_SRCS:.asm=.o)
-endif
 endif
 
 OBJS += $(COMMON_OBJS)
--- a/codec/decoder/targets.mk
+++ b/codec/decoder/targets.mk
@@ -25,7 +25,6 @@
 
 DECODER_OBJS += $(DECODER_CPP_SRCS:.cpp=.o)
 
-ifeq ($(USE_ASM), Yes)
 ifeq ($(ASM_ARCH), x86)
 DECODER_ASM_SRCS=\
 	$(DECODER_SRCDIR)/core/asm/block_add.asm\
@@ -33,7 +32,6 @@
 	$(DECODER_SRCDIR)/core/asm/intra_pred.asm\
 
 DECODER_OBJS += $(DECODER_ASM_SRCS:.asm=.o)
-endif
 endif
 
 OBJS += $(DECODER_OBJS)
--- a/codec/encoder/targets.mk
+++ b/codec/encoder/targets.mk
@@ -35,7 +35,6 @@
 
 ENCODER_OBJS += $(ENCODER_CPP_SRCS:.cpp=.o)
 
-ifeq ($(USE_ASM), Yes)
 ifeq ($(ASM_ARCH), x86)
 ENCODER_ASM_SRCS=\
 	$(ENCODER_SRCDIR)/core/asm/coeff.asm\
@@ -46,7 +45,6 @@
 	$(ENCODER_SRCDIR)/core/asm/score.asm\
 
 ENCODER_OBJS += $(ENCODER_ASM_SRCS:.asm=.o)
-endif
 endif
 
 OBJS += $(ENCODER_OBJS)
--- a/codec/processing/targets.mk
+++ b/codec/processing/targets.mk
@@ -20,7 +20,6 @@
 
 PROCESSING_OBJS += $(PROCESSING_CPP_SRCS:.cpp=.o)
 
-ifeq ($(USE_ASM), Yes)
 ifeq ($(ASM_ARCH), x86)
 PROCESSING_ASM_SRCS=\
 	$(PROCESSING_SRCDIR)/src/asm/denoisefilter.asm\
@@ -28,7 +27,6 @@
 	$(PROCESSING_SRCDIR)/src/asm/vaa.asm\
 
 PROCESSING_OBJS += $(PROCESSING_ASM_SRCS:.asm=.o)
-endif
 endif
 
 OBJS += $(PROCESSING_OBJS)