Imported the Savage DRI driver from the savage-2-0-0-branch of DRI CVS
[mesa.git] / src / mesa / drivers / dri / tdfx / Makefile.solo
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/tdfx_dri.c
25
26 DRIVER_SOURCES = tdfx_context.c \
27 ../../common/driverfuncs.c \
28 ../common/mm.c \
29 ../common/utils.c \
30 ../common/texmem.c \
31 ../common/vblank.c \
32 ../common/xmlconfig.c \
33 tdfx_dd.c \
34 tdfx_lock.c \
35 tdfx_pixels.c \
36 tdfx_render.c \
37 tdfx_screen.c \
38 tdfx_span.c \
39 tdfx_state.c \
40 tdfx_tex.c \
41 tdfx_texman.c \
42 tdfx_texstate.c \
43 tdfx_tris.c \
44 tdfx_vb.c
45
46 INCLUDES = $(MINIGLX_INCLUDES) \
47 $(SHARED_INCLUDES)
48
49
50 C_SOURCES = $(DRIVER_SOURCES) \
51 $(MINIGLX_SOURCES)
52
53 MESA_MODULES = $(TOP)/src/mesa/mesa.a
54
55
56 ifeq ($(WINDOW_SYSTEM),dri)
57 WINOBJ=$(MESABUILDDIR)/dri/dri.a
58 WINLIB=
59 else
60 WINOBJ=
61 WINLIB=-L$(MESA)/src/glx/mini
62 endif
63
64 ASM_SOURCES =
65 OBJECTS = $(C_SOURCES:.c=.o) \
66 $(ASM_SOURCES:.S=.o)
67
68 $(SYMLINKS):
69 mkdir -p server
70 cd server
71 rm -f $@ && ln -s ../../radeon/$@ $@
72
73
74 ### Include directories
75
76 INCLUDE_DIRS = \
77 -I$(TOP)/include \
78 -I$(TOP)/src/mesa \
79 -I$(TOP)/src/mesa/main \
80 -I$(TOP)/src/mesa/glapi \
81 -I$(TOP)/src/mesa/math \
82 -I$(TOP)/src/mesa/transform \
83 -I$(TOP)/src/mesa/swrast \
84 -I$(TOP)/src/mesa/swrast_setup
85
86
87 ##### RULES #####
88
89 .c.o:
90 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
91
92 .S.o:
93 $(CC) -c $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
94
95
96 ##### TARGETS #####
97
98 targets: depend tdfx_dri.so
99
100 tdfx_dri.so: $(SYMLINKS) $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile.solo
101 rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(WINLIB) -lc $(GL_LIB_DEPS)
102 rm -f $(TOP)/lib/tdfx_dri.so && \
103 install tdfx_dri.so $(TOP)/lib/tdfx_dri.so
104
105 $(TOP)/lib/tdfx_dri.so: tdfx_dri.so
106 rm -f $(TOP)/lib/tdfx_dri.so && \
107 install tdfx_dri.so $(TOP)/lib/tdfx_dri.so
108
109 # Run 'make -f Makefile.solo dep' to update the dependencies if you change
110 # what's included by any source file.
111 depend: $(C_SOURCES) $(ASM_SOURCES)
112 makedepend -fdepend -Y $(SHARED_INCLUDES) $(MINIGLX_INCLUDES) \
113 $(C_SOURCES) $(ASM_SOURCES)
114
115
116 # Emacs tags
117 tags:
118 etags `find . -name \*.[ch]` `find ../include`
119
120
121 # Remove .o and backup files
122 clean:
123 -rm -f *.o */*.o *~ *.o *~ *.so server/*.o
124 -rm -f $(SYMLINKS)
125
126
127 include $(TOP)/Make-config
128
129 include depend