summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/Makefile.template74
-rw-r--r--src/gallium/auxiliary/cso_cache/Makefile3
-rw-r--r--src/gallium/auxiliary/draw/Makefile4
-rw-r--r--src/gallium/auxiliary/indices/Makefile4
-rw-r--r--src/gallium/auxiliary/pipebuffer/Makefile3
-rw-r--r--src/gallium/auxiliary/rtasm/Makefile3
-rw-r--r--src/gallium/auxiliary/sct/Makefile3
-rw-r--r--src/gallium/auxiliary/tgsi/Makefile3
-rw-r--r--src/gallium/auxiliary/translate/Makefile3
-rw-r--r--src/gallium/auxiliary/util/Makefile3
-rw-r--r--src/gallium/drivers/failover/Makefile3
-rw-r--r--src/gallium/drivers/i915simple/Makefile3
-rw-r--r--src/gallium/drivers/i965simple/Makefile2
-rw-r--r--src/gallium/drivers/nv04/Makefile11
-rw-r--r--src/gallium/drivers/nv10/Makefile11
-rw-r--r--src/gallium/drivers/nv20/Makefile11
-rw-r--r--src/gallium/drivers/nv30/Makefile11
-rw-r--r--src/gallium/drivers/nv40/Makefile11
-rw-r--r--src/gallium/drivers/nv50/Makefile11
-rw-r--r--src/gallium/drivers/r300/Makefile2
-rw-r--r--src/gallium/drivers/softpipe/Makefile3
-rw-r--r--src/gallium/drivers/trace/Makefile6
-rw-r--r--src/gallium/state_trackers/glx/xlib/Makefile18
23 files changed, 50 insertions, 156 deletions
diff --git a/src/gallium/Makefile.template b/src/gallium/Makefile.template
index 655e949ca2d..98487d43bd6 100644
--- a/src/gallium/Makefile.template
+++ b/src/gallium/Makefile.template
@@ -1,64 +1,66 @@
-# -*-makefile-*-
+# src/gallium/Makefile.template
-
-# We still have a dependency on the "dri" buffer manager. Most likely
-# the interface can be reused in non-dri environments, and also as a
-# frontend to simpler memory managers.
+# Template makefile for gallium libraries.
+#
+# Usage:
+# The minimum that the including makefile needs to define
+# is TOP, LIBNAME and one of of the *_SOURCES.
#
-COMMON_SOURCES =
+# Optional defines:
+# LIBRARY_INCLUDES are appended to the list of includes directories.
+# LIBRARY_DEFINES is not used for makedepend, but for compilation.
-OBJECTS = $(C_SOURCES:.c=.o) \
- $(CPP_SOURCES:.cpp=.o) \
- $(ASM_SOURCES:.S=.o)
+### Basic defines ###
+OBJECTS = $(C_SOURCES:.c=.o) \
+ $(CPP_SOURCES:.cpp=.o) \
+ $(ASM_SOURCES:.S=.o)
-### Include directories
INCLUDES = \
-I. \
-I$(TOP)/src/gallium/include \
-I$(TOP)/src/gallium/auxiliary \
-I$(TOP)/src/gallium/drivers \
- -I$(TOP)/include \
- $(DRIVER_INCLUDES)
-
-
-##### RULES #####
-
-.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
-
-.cpp.o:
- $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DRIVER_DEFINES) $< -o $@
-
-.S.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
+ -I$(GALLIUM)/src/gallium/include \
+ -I$(GALLIUM)/src/gallium/auxiliary \
+ -I$(GALLIUM)/src/gallium/drivers \
+ $(LIBRARY_INCLUDES)
##### TARGETS #####
-default: depend symlinks lib$(LIBNAME).a
-
+default: depend lib$(LIBNAME).a
lib$(LIBNAME).a: $(OBJECTS) Makefile $(TOP)/src/gallium/Makefile.template
- $(TOP)/bin/mklib -o $(LIBNAME) -static $(OBJECTS) $(DRIVER_LIBS)
-
+ $(MKLIB) -o $(LIBNAME) -static $(OBJECTS)
depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
rm -f depend
touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) \
- $(ASM_SOURCES) 2> /dev/null
-
+ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) 2> /dev/null
# Emacs tags
tags:
etags `find . -name \*.[ch]` `find ../include`
-
# Remove .o and backup files
-clean::
- -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
- -rm -f depend depend.bak
+clean:
+ rm -f $(OBJECTS) lib$(LIBNAME).a depend depend.bak
+
+# Dummy target
+install:
+ @echo -n ""
+
+##### RULES #####
+
+.c.o:
+ $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
+
+.cpp.o:
+ $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(LIBRARY_DEFINES) $< -o $@
+
+.S.o:
+ $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
-include depend
+sinclude depend
diff --git a/src/gallium/auxiliary/cso_cache/Makefile b/src/gallium/auxiliary/cso_cache/Makefile
index 6bd66020887..8726afcd949 100644
--- a/src/gallium/auxiliary/cso_cache/Makefile
+++ b/src/gallium/auxiliary/cso_cache/Makefile
@@ -9,6 +9,3 @@ C_SOURCES = \
cso_hash.c
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/auxiliary/draw/Makefile b/src/gallium/auxiliary/draw/Makefile
index bdbf5a08ede..5041dcc072b 100644
--- a/src/gallium/auxiliary/draw/Makefile
+++ b/src/gallium/auxiliary/draw/Makefile
@@ -43,8 +43,4 @@ C_SOURCES = \
draw_vs_ppc.c \
draw_vs_sse.c
-
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/auxiliary/indices/Makefile b/src/gallium/auxiliary/indices/Makefile
index 8fa61d265ea..25ee899c404 100644
--- a/src/gallium/auxiliary/indices/Makefile
+++ b/src/gallium/auxiliary/indices/Makefile
@@ -10,7 +10,3 @@ include ../../Makefile.template
u_indices_gen.c: u_indices_gen.py
python $< > $@
-
-
-symlinks:
-
diff --git a/src/gallium/auxiliary/pipebuffer/Makefile b/src/gallium/auxiliary/pipebuffer/Makefile
index 3b501c51dff..1c00ba8d986 100644
--- a/src/gallium/auxiliary/pipebuffer/Makefile
+++ b/src/gallium/auxiliary/pipebuffer/Makefile
@@ -17,6 +17,3 @@ C_SOURCES = \
pb_validate.c
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/auxiliary/rtasm/Makefile b/src/gallium/auxiliary/rtasm/Makefile
index 252dc5274ab..ab8ea464c6e 100644
--- a/src/gallium/auxiliary/rtasm/Makefile
+++ b/src/gallium/auxiliary/rtasm/Makefile
@@ -11,6 +11,3 @@ C_SOURCES = \
rtasm_ppc_spe.c
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/auxiliary/sct/Makefile b/src/gallium/auxiliary/sct/Makefile
index 516d1756cf9..a7d111b6891 100644
--- a/src/gallium/auxiliary/sct/Makefile
+++ b/src/gallium/auxiliary/sct/Makefile
@@ -7,6 +7,3 @@ C_SOURCES = \
sct.c
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/auxiliary/tgsi/Makefile b/src/gallium/auxiliary/tgsi/Makefile
index d7df9490cfa..b4900e8dbaa 100644
--- a/src/gallium/auxiliary/tgsi/Makefile
+++ b/src/gallium/auxiliary/tgsi/Makefile
@@ -19,6 +19,3 @@ C_SOURCES = \
tgsi_util.c
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/auxiliary/translate/Makefile b/src/gallium/auxiliary/translate/Makefile
index ad2a5b705e4..3c82f8ae037 100644
--- a/src/gallium/auxiliary/translate/Makefile
+++ b/src/gallium/auxiliary/translate/Makefile
@@ -10,6 +10,3 @@ C_SOURCES = \
translate_cache.c
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/auxiliary/util/Makefile b/src/gallium/auxiliary/util/Makefile
index 671e671df23..160df8dfa71 100644
--- a/src/gallium/auxiliary/util/Makefile
+++ b/src/gallium/auxiliary/util/Makefile
@@ -27,6 +27,3 @@ C_SOURCES = \
u_simple_screen.c
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/drivers/failover/Makefile b/src/gallium/drivers/failover/Makefile
index f08b8df07a1..dfb7f5dcf60 100644
--- a/src/gallium/drivers/failover/Makefile
+++ b/src/gallium/drivers/failover/Makefile
@@ -9,6 +9,3 @@ C_SOURCES = \
fo_context.c
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/drivers/i915simple/Makefile b/src/gallium/drivers/i915simple/Makefile
index 41a61a0020b..12821c5a761 100644
--- a/src/gallium/drivers/i915simple/Makefile
+++ b/src/gallium/drivers/i915simple/Makefile
@@ -26,6 +26,3 @@ C_SOURCES = \
i915_surface.c
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/drivers/i965simple/Makefile b/src/gallium/drivers/i965simple/Makefile
index e97146e57ca..19182afa75d 100644
--- a/src/gallium/drivers/i965simple/Makefile
+++ b/src/gallium/drivers/i965simple/Makefile
@@ -50,5 +50,3 @@ C_SOURCES = \
brw_wm_surface_state.c
include ../../Makefile.template
-
-symlinks:
diff --git a/src/gallium/drivers/nv04/Makefile b/src/gallium/drivers/nv04/Makefile
index 4ed62dae95d..cf9deea8519 100644
--- a/src/gallium/drivers/nv04/Makefile
+++ b/src/gallium/drivers/nv04/Makefile
@@ -3,7 +3,7 @@ include $(TOP)/configs/current
LIBNAME = nv04
-DRIVER_SOURCES = \
+C_SOURCES = \
nv04_surface_2d.c \
nv04_clear.c \
nv04_context.c \
@@ -17,13 +17,4 @@ DRIVER_SOURCES = \
nv04_surface.c \
nv04_vbo.c
-C_SOURCES = \
- $(COMMON_SOURCES) \
- $(DRIVER_SOURCES)
-
-ASM_SOURCES =
-
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/drivers/nv10/Makefile b/src/gallium/drivers/nv10/Makefile
index 4ba7ce586d6..2b5fbd4f5a6 100644
--- a/src/gallium/drivers/nv10/Makefile
+++ b/src/gallium/drivers/nv10/Makefile
@@ -3,7 +3,7 @@ include $(TOP)/configs/current
LIBNAME = nv10
-DRIVER_SOURCES = \
+C_SOURCES = \
nv10_clear.c \
nv10_context.c \
nv10_fragprog.c \
@@ -16,13 +16,4 @@ DRIVER_SOURCES = \
nv10_surface.c \
nv10_vbo.c
-C_SOURCES = \
- $(COMMON_SOURCES) \
- $(DRIVER_SOURCES)
-
-ASM_SOURCES =
-
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/drivers/nv20/Makefile b/src/gallium/drivers/nv20/Makefile
index d777fd3d8b4..93e34f8e92a 100644
--- a/src/gallium/drivers/nv20/Makefile
+++ b/src/gallium/drivers/nv20/Makefile
@@ -3,7 +3,7 @@ include $(TOP)/configs/current
LIBNAME = nv20
-DRIVER_SOURCES = \
+C_SOURCES = \
nv20_clear.c \
nv20_context.c \
nv20_fragprog.c \
@@ -17,13 +17,4 @@ DRIVER_SOURCES = \
nv20_vbo.c
# nv20_vertprog.c
-C_SOURCES = \
- $(COMMON_SOURCES) \
- $(DRIVER_SOURCES)
-
-ASM_SOURCES =
-
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/drivers/nv30/Makefile b/src/gallium/drivers/nv30/Makefile
index 69f2790dfe2..4c29e2eab31 100644
--- a/src/gallium/drivers/nv30/Makefile
+++ b/src/gallium/drivers/nv30/Makefile
@@ -3,7 +3,7 @@ include $(TOP)/configs/current
LIBNAME = nv30
-DRIVER_SOURCES = \
+C_SOURCES = \
nv30_clear.c \
nv30_context.c \
nv30_draw.c \
@@ -25,13 +25,4 @@ DRIVER_SOURCES = \
nv30_vbo.c \
nv30_vertprog.c
-C_SOURCES = \
- $(COMMON_SOURCES) \
- $(DRIVER_SOURCES)
-
-ASM_SOURCES =
-
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/drivers/nv40/Makefile b/src/gallium/drivers/nv40/Makefile
index 9c8eadf7e44..8c738aefa6a 100644
--- a/src/gallium/drivers/nv40/Makefile
+++ b/src/gallium/drivers/nv40/Makefile
@@ -3,7 +3,7 @@ include $(TOP)/configs/current
LIBNAME = nv40
-DRIVER_SOURCES = \
+C_SOURCES = \
nv40_clear.c \
nv40_context.c \
nv40_draw.c \
@@ -25,13 +25,4 @@ DRIVER_SOURCES = \
nv40_vbo.c \
nv40_vertprog.c
-C_SOURCES = \
- $(COMMON_SOURCES) \
- $(DRIVER_SOURCES)
-
-ASM_SOURCES =
-
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/drivers/nv50/Makefile b/src/gallium/drivers/nv50/Makefile
index 48244dbbac7..612aea28a34 100644
--- a/src/gallium/drivers/nv50/Makefile
+++ b/src/gallium/drivers/nv50/Makefile
@@ -3,7 +3,7 @@ include $(TOP)/configs/current
LIBNAME = nv50
-DRIVER_SOURCES = \
+C_SOURCES = \
nv50_clear.c \
nv50_context.c \
nv50_draw.c \
@@ -18,13 +18,4 @@ DRIVER_SOURCES = \
nv50_transfer.c \
nv50_vbo.c
-C_SOURCES = \
- $(COMMON_SOURCES) \
- $(DRIVER_SOURCES)
-
-ASM_SOURCES =
-
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/drivers/r300/Makefile b/src/gallium/drivers/r300/Makefile
index 85b3f15ac5b..9b7524b523a 100644
--- a/src/gallium/drivers/r300/Makefile
+++ b/src/gallium/drivers/r300/Makefile
@@ -18,5 +18,3 @@ C_SOURCES = \
r300_texture.c
include ../../Makefile.template
-
-symlinks:
diff --git a/src/gallium/drivers/softpipe/Makefile b/src/gallium/drivers/softpipe/Makefile
index f186f6df1d7..516e3992fdd 100644
--- a/src/gallium/drivers/softpipe/Makefile
+++ b/src/gallium/drivers/softpipe/Makefile
@@ -42,6 +42,3 @@ C_SOURCES = \
sp_surface.c
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/drivers/trace/Makefile b/src/gallium/drivers/trace/Makefile
index 3859b8acb06..e1bd9709373 100644
--- a/src/gallium/drivers/trace/Makefile
+++ b/src/gallium/drivers/trace/Makefile
@@ -9,10 +9,6 @@ C_SOURCES = \
tr_screen.c \
tr_state.c \
tr_texture.c \
- tr_winsys.c
-
+ tr_winsys.c
include ../../Makefile.template
-
-symlinks:
-
diff --git a/src/gallium/state_trackers/glx/xlib/Makefile b/src/gallium/state_trackers/glx/xlib/Makefile
index 1b63db1f0ea..6d10b090aa0 100644
--- a/src/gallium/state_trackers/glx/xlib/Makefile
+++ b/src/gallium/state_trackers/glx/xlib/Makefile
@@ -3,23 +3,15 @@ include $(TOP)/configs/current
LIBNAME = xlib
-
-DRIVER_INCLUDES = \
+LIBRARY_INCLUDES = \
-I$(TOP)/include \
-I$(TOP)/src/mesa \
- -I$(TOP)/src/mesa/main \
- -I$(TOP)/src/gallium/include \
- -I$(TOP)/src/gallium/drivers \
- -I$(TOP)/src/gallium/auxiliary
+ -I$(TOP)/src/mesa/main
C_SOURCES = \
- glxapi.c \
- fakeglx.c \
- fakeglx_fonts.c \
+ glxapi.c \
+ fakeglx.c \
+ fakeglx_fonts.c \
xm_api.c
-
include ../../../Makefile.template
-
-symlinks:
-