Merge pull request #237 from mstorsjo/simplify-make-lib-rules
Simplify the make rules for creating libraries
This commit is contained in:
commit
00a76419b4
@ -8,8 +8,8 @@ $(GTEST_SRCDIR)/%.o: $(GTEST_SRCDIR)/%.cc
|
||||
$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(GTEST_CFLAGS) $(GTEST_INCLUDES) -c $(CXX_O) $<
|
||||
|
||||
$(LIBPREFIX)gtest.$(LIBSUFFIX): $(GTEST_OBJS)
|
||||
rm -f $(LIBPREFIX)gtest.$(LIBSUFFIX)
|
||||
$(AR) $(AR_OPTS) $(GTEST_OBJS)
|
||||
rm -f $@
|
||||
$(AR) $(AR_OPTS) $+
|
||||
|
||||
libraries: $(LIBPREFIX)gtest.$(LIBSUFFIX)
|
||||
LIBRARIES += $(LIBPREFIX)gtest.$(LIBSUFFIX)
|
||||
|
@ -111,8 +111,8 @@ if len(asm) > 0:
|
||||
|
||||
if args.library is not None:
|
||||
f.write("$(LIBPREFIX)%s.$(LIBSUFFIX): $(%s_OBJS)\n"%(args.library, PREFIX))
|
||||
f.write("\trm -f $(LIBPREFIX)%s.$(LIBSUFFIX)\n"%args.library)
|
||||
f.write("\t$(AR) $(AR_OPTS) $(%s_OBJS)\n"%PREFIX)
|
||||
f.write("\trm -f $@\n")
|
||||
f.write("\t$(AR) $(AR_OPTS) $+\n")
|
||||
f.write("\n")
|
||||
f.write("libraries: $(LIBPREFIX)%s.$(LIBSUFFIX)\n"%args.library)
|
||||
f.write("LIBRARIES += $(LIBPREFIX)%s.$(LIBSUFFIX)\n"%args.library)
|
||||
|
@ -29,8 +29,8 @@ $(COMMON_SRCDIR)/%.o: $(COMMON_SRCDIR)/%.asm
|
||||
$(ASM) $(ASMFLAGS) $(ASM_INCLUDES) $(COMMON_ASMFLAGS) $(COMMON_ASM_INCLUDES) -o $@ $<
|
||||
|
||||
$(LIBPREFIX)common.$(LIBSUFFIX): $(COMMON_OBJS)
|
||||
rm -f $(LIBPREFIX)common.$(LIBSUFFIX)
|
||||
$(AR) $(AR_OPTS) $(COMMON_OBJS)
|
||||
rm -f $@
|
||||
$(AR) $(AR_OPTS) $+
|
||||
|
||||
libraries: $(LIBPREFIX)common.$(LIBSUFFIX)
|
||||
LIBRARIES += $(LIBPREFIX)common.$(LIBSUFFIX)
|
||||
|
@ -41,8 +41,8 @@ $(DECODER_SRCDIR)/%.o: $(DECODER_SRCDIR)/%.asm
|
||||
$(ASM) $(ASMFLAGS) $(ASM_INCLUDES) $(DECODER_ASMFLAGS) $(DECODER_ASM_INCLUDES) -o $@ $<
|
||||
|
||||
$(LIBPREFIX)decoder.$(LIBSUFFIX): $(DECODER_OBJS)
|
||||
rm -f $(LIBPREFIX)decoder.$(LIBSUFFIX)
|
||||
$(AR) $(AR_OPTS) $(DECODER_OBJS)
|
||||
rm -f $@
|
||||
$(AR) $(AR_OPTS) $+
|
||||
|
||||
libraries: $(LIBPREFIX)decoder.$(LIBSUFFIX)
|
||||
LIBRARIES += $(LIBPREFIX)decoder.$(LIBSUFFIX)
|
||||
|
@ -55,8 +55,8 @@ $(ENCODER_SRCDIR)/%.o: $(ENCODER_SRCDIR)/%.asm
|
||||
$(ASM) $(ASMFLAGS) $(ASM_INCLUDES) $(ENCODER_ASMFLAGS) $(ENCODER_ASM_INCLUDES) -o $@ $<
|
||||
|
||||
$(LIBPREFIX)encoder.$(LIBSUFFIX): $(ENCODER_OBJS)
|
||||
rm -f $(LIBPREFIX)encoder.$(LIBSUFFIX)
|
||||
$(AR) $(AR_OPTS) $(ENCODER_OBJS)
|
||||
rm -f $@
|
||||
$(AR) $(AR_OPTS) $+
|
||||
|
||||
libraries: $(LIBPREFIX)encoder.$(LIBSUFFIX)
|
||||
LIBRARIES += $(LIBPREFIX)encoder.$(LIBSUFFIX)
|
||||
|
@ -38,8 +38,8 @@ $(PROCESSING_SRCDIR)/%.o: $(PROCESSING_SRCDIR)/%.asm
|
||||
$(ASM) $(ASMFLAGS) $(ASM_INCLUDES) $(PROCESSING_ASMFLAGS) $(PROCESSING_ASM_INCLUDES) -o $@ $<
|
||||
|
||||
$(LIBPREFIX)processing.$(LIBSUFFIX): $(PROCESSING_OBJS)
|
||||
rm -f $(LIBPREFIX)processing.$(LIBSUFFIX)
|
||||
$(AR) $(AR_OPTS) $(PROCESSING_OBJS)
|
||||
rm -f $@
|
||||
$(AR) $(AR_OPTS) $+
|
||||
|
||||
libraries: $(LIBPREFIX)processing.$(LIBSUFFIX)
|
||||
LIBRARIES += $(LIBPREFIX)processing.$(LIBSUFFIX)
|
||||
|
Loading…
x
Reference in New Issue
Block a user