patch to import Jon Smirl's work from Bitkeeper
[mesa.git] / src / mesa / drivers / dri / r128 / Makefile.X11
1 # $Id: Makefile.X11,v 1.1 2003/08/22 20:11:44 brianp Exp $
2
3 # Mesa 3-D graphics library
4 # Version: 5.0
5 # Copyright (C) 1995-2002 Brian Paul
6
7 TOP = ../../../../..
8
9 default: linux-solo
10
11 SHARED_INCLUDES = $(INCLUDE_DIRS) -I. -I../common -Iserver
12 MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini
13
14 DEFINES += \
15 -D_HAVE_SWRAST=1 \
16 -D_HAVE_SWTNL=1 \
17 -D_HAVE_SANITY=1 \
18 -D_HAVE_CODEGEN=1 \
19 -D_HAVE_LIGHTING=1 \
20 -D_HAVE_TEXGEN=1 \
21 -D_HAVE_USERCLIP=1 \
22 -DGLX_DIRECT_RENDERING
23
24 MINIGLX_SOURCES = server/r128_dri.c
25
26 DRIVER_SOURCES = \
27 r128_context.c \
28 r128_lock.c \
29 r128_state.c \
30 r128_texstate.c \
31 r128_dd.c \
32 r128_screen.c \
33 r128_tex.c \
34 r128_tris.c \
35 r128_ioctl.c \
36 r128_span.c \
37 r128_texmem.c \
38 r128_vb.c \
39 ../common/mm.c \
40 ../common/utils.c \
41 ../common/texmem.c \
42 ../common/vblank.c
43
44 INCLUDES = $(MINIGLX_INCLUDES) \
45 $(SHARED_INCLUDES)
46
47
48 C_SOURCES = $(DRIVER_SOURCES) \
49 $(MINIGLX_SOURCES)
50
51 MESA_MODULES = $(TOP)/src/mesa/mesa.a
52
53
54 ifeq ($(WINDOW_SYSTEM),dri)
55 WINOBJ=$(MESABUILDDIR)/dri/dri.a
56 WINLIB=
57 else
58 WINOBJ=
59 WINLIB=-L$(MESA)/src/glx/mini
60 endif
61
62 ASM_SOURCES =
63 OBJECTS = $(C_SOURCES:.c=.o) \
64 $(ASM_SOURCES:.S=.o)
65
66 ### Include directories
67
68 INCLUDE_DIRS = \
69 -I$(TOP)/include \
70 -I$(TOP)/src/mesa \
71 -I$(TOP)/src/mesa/main \
72 -I$(TOP)/src/mesa/glapi \
73 -I$(TOP)/src/mesa/math \
74 -I$(TOP)/src/mesa/transform \
75 -I$(TOP)/src/mesa/swrast \
76 -I$(TOP)/src/mesa/swrast_setup
77
78
79 ##### RULES #####
80
81 .c.o:
82 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
83
84 .S.o:
85 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
86
87
88 ##### TARGETS #####
89
90 targets: depend r128_dri.so
91
92 r128_dri.so: $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile.X11
93 rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(WINLIB) -lc $(GL_LIB_DEPS)
94 rm -f $(TOP)/lib/r128_dri.so && \
95 install r128_dri.so $(TOP)/lib/r128_dri.so
96
97 # Run 'make -f Makefile.X11 dep' to update the dependencies if you change
98 # what's included by any source file.
99 depend: $(C_SOURCES) $(ASM_SOURCES)
100 makedepend -fdepend -Y $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) \
101 $(C_SOURCES) $(ASM_SOURCES)
102
103
104 # Emacs tags
105 tags:
106 etags `find . -name \*.[ch]` `find ../include`
107
108
109 # Remove .o and backup files
110 clean:
111 -rm -f *.o */*.o *~ *.o *~ *.so server/*.o
112
113
114 include $(TOP)/Make-config
115
116 include depend