Omit assembler source rules if no asm sources are found
This commit is contained in:
parent
16099cfd32
commit
a8d549e343
@ -73,19 +73,21 @@ for c in cpp:
|
||||
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));
|
||||
|
@ -6,19 +6,10 @@ H264DEC_CPP_SRCS=\
|
||||
$(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)
|
||||
|
||||
|
@ -5,19 +5,10 @@ H264ENC_CPP_SRCS=\
|
||||
$(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)
|
||||
|
||||
|
@ -6,19 +6,10 @@ CODEC_UNITTEST_CPP_SRCS=\
|
||||
$(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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user