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

Simplify makefiles with respect to x86 assembly
This commit is contained in:
volvet 2014-03-04 10:16:01 +08:00
commit 901b89f7ad
7 changed files with 4 additions and 10 deletions

View File

@ -112,14 +112,12 @@ if len(cfiles) > 0:
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:
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)

View File

@ -2,10 +2,12 @@ include build/platform-arch.mk
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

View File

@ -2,10 +2,12 @@ include build/platform-arch.mk
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

View File

@ -8,7 +8,6 @@ COMMON_CPP_SRCS=\
COMMON_OBJS += $(COMMON_CPP_SRCS:.cpp=.o)
ifeq ($(USE_ASM), Yes)
ifeq ($(ASM_ARCH), x86)
COMMON_ASM_SRCS=\
$(COMMON_SRCDIR)/asm_inc.asm\
@ -23,7 +22,6 @@ COMMON_ASM_SRCS=\
COMMON_OBJS += $(COMMON_ASM_SRCS:.asm=.o)
endif
endif
OBJS += $(COMMON_OBJS)
$(COMMON_SRCDIR)/%.o: $(COMMON_SRCDIR)/%.cpp

View File

@ -25,7 +25,6 @@ DECODER_CPP_SRCS=\
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\
@ -34,7 +33,6 @@ DECODER_ASM_SRCS=\
DECODER_OBJS += $(DECODER_ASM_SRCS:.asm=.o)
endif
endif
OBJS += $(DECODER_OBJS)
$(DECODER_SRCDIR)/%.o: $(DECODER_SRCDIR)/%.cpp

View File

@ -35,7 +35,6 @@ ENCODER_CPP_SRCS=\
ENCODER_OBJS += $(ENCODER_CPP_SRCS:.cpp=.o)
ifeq ($(USE_ASM), Yes)
ifeq ($(ASM_ARCH), x86)
ENCODER_ASM_SRCS=\
$(ENCODER_SRCDIR)/core/asm/coeff.asm\
@ -47,7 +46,6 @@ ENCODER_ASM_SRCS=\
ENCODER_OBJS += $(ENCODER_ASM_SRCS:.asm=.o)
endif
endif
OBJS += $(ENCODER_OBJS)
$(ENCODER_SRCDIR)/%.o: $(ENCODER_SRCDIR)/%.cpp

View File

@ -20,7 +20,6 @@ PROCESSING_CPP_SRCS=\
PROCESSING_OBJS += $(PROCESSING_CPP_SRCS:.cpp=.o)
ifeq ($(USE_ASM), Yes)
ifeq ($(ASM_ARCH), x86)
PROCESSING_ASM_SRCS=\
$(PROCESSING_SRCDIR)/src/asm/denoisefilter.asm\
@ -29,7 +28,6 @@ PROCESSING_ASM_SRCS=\
PROCESSING_OBJS += $(PROCESSING_ASM_SRCS:.asm=.o)
endif
endif
OBJS += $(PROCESSING_OBJS)
$(PROCESSING_SRCDIR)/%.o: $(PROCESSING_SRCDIR)/%.cpp