怎么将两个.a合并在一起,不用解开.a重新ar .o:)
define BUILD_LIBRARY
$(if $(wildcard $@),@$(RM) $@)
$(if $(wildcard ar.mac),@$(RM) ar.mac)
$(if $(filter lib%.a, $^),
@$(ECHO) CREATE $@ > ar.mac
@$(ECHO) SAVE >> ar.mac
@$(ECHO) END >> ar.mac
@$(AR) -M < ar.mac
)
$(if $(filter %.o,$^),@$(AR) -q $@ $(filter %.o, $^))
$(if $(filter %.a, $^),
@$(ECHO) OPEN $@ > ar.mac
$(foreach LIB, $(filter lib%.a, $^),
@echo ADDLIB $(LIB) >> ar.mac
)
@$(ECHO) SAVE >> ar.mac
@$(ECHO) END
luckylin(林峻峰) 17:37:16
>> ar.mac
@$(AR) -M < ar.mac
@$(RM) ar.mac
)