llvmpipe: Fix scons dependencies.
[mesa.git] / src / gallium / Makefile.template
index 98487d43bd646f4da3024fc93069da43acc5a364..713e192a4ebdaa1caf80d441bf2ade945498f16f 100644 (file)
@@ -21,9 +21,6 @@ INCLUDES = \
        -I$(TOP)/src/gallium/include \
        -I$(TOP)/src/gallium/auxiliary \
        -I$(TOP)/src/gallium/drivers \
-       -I$(GALLIUM)/src/gallium/include \
-       -I$(GALLIUM)/src/gallium/auxiliary \
-       -I$(GALLIUM)/src/gallium/drivers \
        $(LIBRARY_INCLUDES)
 
 
@@ -31,8 +28,8 @@ INCLUDES = \
 
 default: depend lib$(LIBNAME).a
 
-lib$(LIBNAME).a: $(OBJECTS) Makefile $(TOP)/src/gallium/Makefile.template
-       $(MKLIB) -o $(LIBNAME) -static $(OBJECTS)
+lib$(LIBNAME).a: $(OBJECTS) $(EXTRA_OBJECTS) Makefile $(TOP)/src/gallium/Makefile.template
+       $(MKLIB) -o $(LIBNAME) -static $(OBJECTS) $(EXTRA_OBJECTS)
 
 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
        rm -f depend
@@ -41,7 +38,7 @@ depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
 
 # Emacs tags
 tags:
-       etags `find . -name \*.[ch]` `find ../include`
+       etags `find . -name \*.[ch]` `find $(TOP)/src/gallium/include -name \*.h`
 
 # Remove .o and backup files
 clean:
@@ -53,13 +50,16 @@ install:
 
 ##### RULES #####
 
-.c.o:
+%.s: %.c
+       $(CC) -S $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
+
+%.o: %.c
        $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
 
-.cpp.o:
+%.o: %.cpp
        $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(LIBRARY_DEFINES) $< -o $@
 
-.S.o:
+%.o: %.S
        $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES)  $< -o $@