summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2005-01-07 10:35:23 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2005-01-07 10:35:23 +0000
commit8764441b58a2490600494a30ad40645982bcbbaa (patch)
tree3253257c9f708455412d48d0be3a3f145f7851b8
parent000dd4afe2f4bad50101da6882354ea67444aeb2 (diff)
Improve the semantics of the 'install' target to make sure the right
file is really being installed. Useful if you have multiple versions of a single driver directory hanging around and want to switch between them for testing.
-rw-r--r--src/mesa/drivers/dri/Makefile.template13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
index f2a9ec52dc..34d845b8e1 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -64,7 +64,7 @@ DEFINES += -DGLX_DIRECT_RENDERING
##### TARGETS #####
-default: depend symlinks $(LIB_DIR)/$(LIBNAME)
+default: depend symlinks $(LIBNAME) $(LIB_DIR)/$(LIBNAME)
#$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
@@ -72,15 +72,19 @@ default: depend symlinks $(LIB_DIR)/$(LIBNAME)
# $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
# $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
+$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
+ rm -f $@
+ gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
-$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
- rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
+$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
+ install -C $(LIBNAME) $(LIB_DIR)
# Run 'make depend' to update the dependencies if you change
# what's included by any source file.
+.PHONY: depend
depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \
@@ -97,4 +101,7 @@ clean:
-rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
-rm -f depend depend.bak
+install: $(LIBNAME)
+ install -C $(LIBNAME) /usr/X11R6/lib/modules/dri/$(LIBNAME)
+
include depend