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