Dependency on target directory caused unnecessary relink. Remove them.
default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)
-$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) $(TOP)/$(LIB_DIR)/gallium Makefile
+$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) Makefile
$(MKLIB) -o $(LIBBASENAME) -linker '$(LD)' -ldflags '$(LDFLAGS)' \
-major $(VA_MAJOR) -minor $(VA_MINOR) $(MKLIB_OPTIONS) \
-install $(TOP)/$(LIB_DIR)/gallium \
default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)
-$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) $(TOP)/$(LIB_DIR)/gallium Makefile
+$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) Makefile
$(MKLIB) -o $(LIBBASENAME) -linker '$(LD)' -ldflags '$(LDFLAGS)' \
-major $(VDPAU_MAJOR) -minor $(VDPAU_MINOR) $(MKLIB_OPTIONS) \
-install $(TOP)/$(LIB_DIR)/gallium \
default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)
-$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) $(TOP)/$(LIB_DIR)/gallium Makefile
+$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) Makefile
$(MKLIB) -o $(LIBBASENAME) -linker '$(LD)' -ldflags '$(LDFLAGS)' \
-major $(XVMC_MAJOR) -minor $(XVMC_MINOR) $(MKLIB_OPTIONS) \
-install $(TOP)/$(LIB_DIR)/gallium \