Small optimization for big-endian (e.g., PowerPC) systems.
[mesa.git] / src / mesa / drivers / dri / Makefile.template
index 33bd22e6e578f1f1f895a3148033938d4bcd56a2..517e00632b1639741a9c638651848e3bfe83e6d5 100644 (file)
@@ -1,9 +1,5 @@
 # -*-makefile-*-
 
-TOP = ../../../../..
-include $(TOP)/configs/current
-
-
 MESA_MODULES = $(TOP)/src/mesa/mesa.a
 
 
@@ -21,9 +17,9 @@ else
 WINOBJ=
 WINLIB=-L$(MESA)/src/glx/mini
 MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini
-MINIGLX_SOURCES = 
 INCLUDES = $(MINIGLX_INCLUDES) \
           -I$(DRM_SOURCE_PATH)/shared \
+          -I$(DRM_SOURCE_PATH)/libdrm \
           $(SHARED_INCLUDES)
 
 OBJECTS = $(C_SOURCES:.c=.o) \
@@ -32,12 +28,18 @@ OBJECTS = $(C_SOURCES:.c=.o) \
 endif
 
 
+
+
+
 ### Include directories
 SHARED_INCLUDES = \
        -I. \
-       -I../common \
+       -I$(TOP)/src/mesa/drivers/dri/common \
        -Iserver \
+       -I$(DRM_SOURCE_PATH)/shared \
+       -I$(DRM_SOURCE_PATH)/linux \
        -I$(TOP)/include \
+       -I$(TOP)/include/GL/internal \
        -I$(TOP)/src/mesa \
        -I$(TOP)/src/mesa/main \
        -I$(TOP)/src/mesa/glapi \
@@ -47,6 +49,10 @@ SHARED_INCLUDES = \
        -I$(TOP)/src/mesa/swrast \
        -I$(TOP)/src/mesa/swrast_setup
 
+# Of course we're direct rendering.  Redundant #ifdefs in the code
+# from prehistory require this:
+#
+DEFINES += -DGLX_DIRECT_RENDERING 
 
 ##### RULES #####
 
@@ -59,7 +65,7 @@ SHARED_INCLUDES = \
 
 ##### TARGETS #####
 
-default: depend $(LIB_DIR)/$(LIBNAME)
+default: depend symlinks $(LIB_DIR)/$(LIBNAME)
 
 
 #$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
@@ -68,19 +74,18 @@ default: depend $(LIB_DIR)/$(LIBNAME)
 #              $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
 
 
-$(LIB_DIR)/$(LIBNAME):  $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile ../Makefile.template
+$(LIB_DIR)/$(LIBNAME):  $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
        rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(GL_LIB_DEPS)
 
 
 
 
-
 # Run 'make depend' to update the dependencies if you change
 # what's included by any source file.
 depend: $(C_SOURCES) $(ASM_SOURCES)
        touch depend
        $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES) \
-               >& /dev/null
+               > /dev/null 2>&1
 
 
 # Emacs tags
@@ -90,6 +95,7 @@ tags:
 
 # Remove .o and backup files
 clean:
-       -rm -f *.o */*.o *~ *.o *~ *.so server/*.o
+       -rm -f *.o */*.o *~ *.o *~ *.so server/*.o $(SYMLINKS)
+       -rm -f depend depend.bak
 
 include depend