Fix rebuilding of libs on OS X.
OS X ar operates on fat libaries. In this case updating the library isn't possible and when those change ar will only return an error. Remove the output file prior to running ar to work around this limitation. Change-Id: I7ebc66efd092a8e6037ae86a3658afe6b4da777f
This commit is contained in:
parent
660c8d0eff
commit
f3a1a33b9f
1 changed files with 5 additions and 2 deletions
|
@ -23,8 +23,10 @@ endif
|
|||
TOP := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
ifeq ($(OS),Windows_NT)
|
||||
mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1))
|
||||
rm = del /q /s $(1)
|
||||
else
|
||||
mkdir = mkdir -p $(1)
|
||||
rm = rm -rf $(1)
|
||||
endif
|
||||
|
||||
# overwrite for releases
|
||||
|
@ -135,11 +137,12 @@ $(TARGET_DIR)$(OUTPUT).dll: $(LIBOBJS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS))
|
|||
$(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a: $(LIBOBJS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS))
|
||||
@echo AR $(notdir $@)
|
||||
$(SILENT)$(call mkdir,$(dir $@))
|
||||
$(SILENT)$(call rm,$@)
|
||||
$(SILENT)$(AR) rcs $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) $(OUTPUT) $(TARGET_DIR)lib$(OUTPUT)*.a $(OUTPUT).dmg
|
||||
rm -rf $(OUTPUT)-* i386 ppc $(OBJDIR)
|
||||
$(call rm, $(OBJS) $(OUTPUT) $(TARGET_DIR)lib$(OUTPUT)*.a $(OUTPUT).dmg)
|
||||
$(call rm, $(OUTPUT)-* i386 ppc $(OBJDIR))
|
||||
|
||||
%.d:
|
||||
$(SILENT)$(call mkdir,$(BUILD_DIR))
|
||||
|
|
Loading…
Reference in a new issue