ref: a8d549e343ec20dde85e4ca46327461cc56e89e8
parent: 16099cfd32f2d1a236d94545f6fd1feb17eeb863
author: Martin Storsjö <[email protected]>
date: Fri Jan 17 05:08:26 EST 2014
Omit assembler source rules if no asm sources are found
--- a/build/mktargets.py
+++ b/build/mktargets.py
@@ -73,19 +73,21 @@
f.write("\n")
f.write("%s_OBJS += $(%s_CPP_SRCS:.cpp=.o)\n"%(PREFIX, PREFIX))
-f.write("ifeq ($(USE_ASM), Yes)\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\n")
+if len(asm) > 0:
+ f.write("ifeq ($(USE_ASM), Yes)\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\n")
f.write("OBJS += $(%s_OBJS)\n"%PREFIX)
write_cpp_rule_pattern(f)
-write_asm_rule_pattern(f)
+if len(asm) > 0:
+ write_asm_rule_pattern(f)
if args.library is not None:
f.write("$(LIBPREFIX)%s.$(LIBSUFFIX): $(%s_OBJS)\n"%(args.library, PREFIX));
--- a/codec/console/dec/targets.mk
+++ b/codec/console/dec/targets.mk
@@ -6,18 +6,9 @@
$(H264DEC_SRCDIR)/./src/read_config.cpp\
H264DEC_OBJS += $(H264DEC_CPP_SRCS:.cpp=.o)
-ifeq ($(USE_ASM), Yes)
-H264DEC_ASM_SRCS=\
-
-H264DEC_OBJS += $(H264DEC_ASM_SRCS:.asm=.o)
-endif
-
OBJS += $(H264DEC_OBJS)
$(H264DEC_SRCDIR)/%.o: $(H264DEC_SRCDIR)/%.cpp
$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(H264DEC_CFLAGS) $(H264DEC_INCLUDES) -c $(CXX_O) $<
-
-$(H264DEC_SRCDIR)/%.o: $(H264DEC_SRCDIR)/%.asm
- $(ASM) $(ASMFLAGS) $(ASM_INCLUDES) $(H264DEC_ASMFLAGS) $(H264DEC_ASM_INCLUDES) -o $@ $<
h264dec: $(H264DEC_OBJS) $(LIBS) $(H264DEC_LIBS) $(H264DEC_DEPS)
$(CXX) $(CXX_LINK_O) $(H264DEC_OBJS) $(H264DEC_LDFLAGS) $(H264DEC_LIBS) $(LDFLAGS) $(LIBS)
--- a/codec/console/enc/targets.mk
+++ b/codec/console/enc/targets.mk
@@ -5,18 +5,9 @@
$(H264ENC_SRCDIR)/./src/welsenc.cpp\
H264ENC_OBJS += $(H264ENC_CPP_SRCS:.cpp=.o)
-ifeq ($(USE_ASM), Yes)
-H264ENC_ASM_SRCS=\
-
-H264ENC_OBJS += $(H264ENC_ASM_SRCS:.asm=.o)
-endif
-
OBJS += $(H264ENC_OBJS)
$(H264ENC_SRCDIR)/%.o: $(H264ENC_SRCDIR)/%.cpp
$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(H264ENC_CFLAGS) $(H264ENC_INCLUDES) -c $(CXX_O) $<
-
-$(H264ENC_SRCDIR)/%.o: $(H264ENC_SRCDIR)/%.asm
- $(ASM) $(ASMFLAGS) $(ASM_INCLUDES) $(H264ENC_ASMFLAGS) $(H264ENC_ASM_INCLUDES) -o $@ $<
h264enc: $(H264ENC_OBJS) $(LIBS) $(H264ENC_LIBS) $(H264ENC_DEPS)
$(CXX) $(CXX_LINK_O) $(H264ENC_OBJS) $(H264ENC_LDFLAGS) $(H264ENC_LIBS) $(LDFLAGS) $(LIBS)
--- a/test/targets.mk
+++ b/test/targets.mk
@@ -6,18 +6,9 @@
$(CODEC_UNITTEST_SRCDIR)/./simple_test.cpp\
CODEC_UNITTEST_OBJS += $(CODEC_UNITTEST_CPP_SRCS:.cpp=.o)
-ifeq ($(USE_ASM), Yes)
-CODEC_UNITTEST_ASM_SRCS=\
-
-CODEC_UNITTEST_OBJS += $(CODEC_UNITTEST_ASM_SRCS:.asm=.o)
-endif
-
OBJS += $(CODEC_UNITTEST_OBJS)
$(CODEC_UNITTEST_SRCDIR)/%.o: $(CODEC_UNITTEST_SRCDIR)/%.cpp
$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(CODEC_UNITTEST_CFLAGS) $(CODEC_UNITTEST_INCLUDES) -c $(CXX_O) $<
-
-$(CODEC_UNITTEST_SRCDIR)/%.o: $(CODEC_UNITTEST_SRCDIR)/%.asm
- $(ASM) $(ASMFLAGS) $(ASM_INCLUDES) $(CODEC_UNITTEST_ASMFLAGS) $(CODEC_UNITTEST_ASM_INCLUDES) -o $@ $<
codec_unittest: $(CODEC_UNITTEST_OBJS) $(LIBS) $(CODEC_UNITTEST_LIBS) $(CODEC_UNITTEST_DEPS)
$(CXX) $(CXX_LINK_O) $(CODEC_UNITTEST_OBJS) $(CODEC_UNITTEST_LDFLAGS) $(CODEC_UNITTEST_LIBS) $(LDFLAGS) $(LIBS)