fixed bad clear value
[mesa.git] / src / mesa / main / Makefile.win
1 # Makefile for Win32
2 #
3 # NOTE: the install target may overwrite important files in the system dirs
4 # Check first, before making the install target.
5 #
6 # This builds both the osmesa and Windows drivers.
7 #
8
9 !include <win32.mak>
10
11 TOP = ..
12 SUBDIRS = osmesa.dir
13
14 CORE_SRCS = \
15 tnl\t_array_api.c \
16 tnl\t_array_import.c \
17 tnl\t_context.c \
18 tnl\t_eval_api.c \
19 tnl\t_imm_alloc.c \
20 tnl\t_imm_api.c \
21 tnl\t_imm_debug.c \
22 tnl\t_imm_dlist.c \
23 tnl\t_imm_elt.c \
24 tnl\t_imm_eval.c \
25 tnl\t_imm_exec.c \
26 tnl\t_imm_fixup.c \
27 tnl\t_pipeline.c \
28 tnl\t_vb_fog.c \
29 tnl\t_vb_light.c \
30 tnl\t_vb_normals.c \
31 tnl\t_vb_points.c \
32 tnl\t_vb_program.c \
33 tnl\t_vb_render.c \
34 tnl\t_vb_texgen.c \
35 tnl\t_vb_texmat.c \
36 tnl\t_vb_vertex.c \
37 swrast_setup\ss_context.c \
38 swrast_setup\ss_triangle.c \
39 swrast_setup\ss_vb.c \
40 api_loopback.c \
41 api_noop.c \
42 api_validate.c \
43 accum.c \
44 attrib.c \
45 blend.c \
46 buffers.c \
47 clip.c \
48 colortab.c \
49 context.c \
50 convolve.c \
51 debug.c \
52 depth.c \
53 dispatch.c \
54 dlist.c \
55 drawpix.c \
56 enable.c \
57 enums.c \
58 eval.c \
59 extensions.c \
60 feedback.c \
61 fog.c \
62 get.c \
63 glapi.c \
64 glthread.c \
65 hash.c \
66 hint.c \
67 histogram.c \
68 image.c \
69 imports.c \
70 light.c \
71 lines.c \
72 matrix.c \
73 mmath.c \
74 pixel.c \
75 points.c \
76 polygon.c \
77 rastpos.c \
78 state.c \
79 stencil.c \
80 texcompress.c \
81 teximage.c \
82 texformat.c \
83 texobj.c \
84 texstate.c \
85 texstore.c \
86 texutil.c \
87 varray.c \
88 vpexec.c \
89 vpparse.c \
90 vpstate.c \
91 vtxfmt.c \
92 # X86\x86.c \
93 # X86\common_x86.c \
94 # X86\3dnow.c \
95 # X86\sse.c \
96 math\m_debug_norm.c \
97 math\m_debug_xform.c \
98 math\m_eval.c \
99 math\m_matrix.c \
100 math\m_translate.c \
101 math\m_vector.c \
102 math\m_xform.c \
103 array_cache\ac_context.c \
104 array_cache\ac_import.c \
105 swrast\s_aaline.c \
106 swrast\s_aatriangle.c \
107 swrast\s_accum.c \
108 swrast\s_alpha.c \
109 swrast\s_alphabuf.c \
110 swrast\s_bitmap.c \
111 swrast\s_blend.c \
112 swrast\s_buffers.c \
113 swrast\s_copypix.c \
114 swrast\s_context.c \
115 swrast\s_depth.c \
116 swrast\s_drawpix.c \
117 swrast\s_feedback.c \
118 swrast\s_fog.c \
119 swrast\s_histogram.c \
120 swrast\s_imaging.c \
121 swrast\s_lines.c \
122 swrast\s_logic.c \
123 swrast\s_masking.c \
124 swrast\s_pixeltex.c \
125 swrast\s_points.c \
126 swrast\s_readpix.c \
127 swrast\s_span.c \
128 swrast\s_stencil.c \
129 swrast\s_texstore.c \
130 swrast\s_texture.c \
131 swrast\s_triangle.c \
132 swrast\s_zoom.c
133
134 DRIVER_SRCS = \
135 Trace\tr_context.c \
136 Trace\tr_control.c \
137 Trace\tr_error.c \
138 Trace\tr_support.c \
139 Trace\tr_wrapper.c \
140 Trace\tr_write.c \
141 Windows\wgl.c \
142 Windows\wmesa.c
143
144 ASM_SRCS =
145
146 SRCS = $(CORE_SRCS) $(DRIVER_SRCS)
147
148 all : mesadll $(SUBDIRS)
149
150 !include "$(TOP)/mesawin32.mak"
151
152 mesadll : $(MESADLL)
153
154 CFLAGS = $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -DBUILD_GL32 -DNO_PARALLEL -DNO_STEREO
155 !IFNDEF NODEBUG
156 CFLAGS = $(CFLAGS) -DMESA_DEBUG
157 !ENDIF
158 LFLAGS = $(dlllflags) $(lcommon) $(LFLAGS)
159
160 OBJS = $(ASM_SRCS:.S=.obj) $(CORE_SRCS:.c=.obj) $(DRIVER_SRCS:.c=.obj)
161 LIBS = winmm.lib $(guilibsdll)
162
163 $(MESADLL) : $(OBJS) mesa.def
164 $(link) $(LFLAGS) -out:$(MESADLL) -def:mesa.def $(OBJS) $(LIBS)
165 @echo "copying Mesa dynamic link library to lib directory..."
166 -copy $(MESADLL) ..\lib
167 @echo "copying Mesa import library to lib directory..."
168 -copy $(MESALIB) ..\lib
169
170 $(SUBDIRS) :
171 @echo.
172 @echo Making in $* directory
173 @cd $*
174 @nmake -f Makefile.win -nologo
175 @cd ..
176
177 install : $(MESADLL)
178 @echo.
179 @echo "copying Mesa dynamic link library to system directory..."
180 -copy $(MESADLL) $(DLLINSTALL)
181 @echo "copying Mesa header files to include directory..."
182 -copy ..\..\include\GL\gl.h $(INCLUDEINSTALL)
183 -copy ..\..\include\GL\glext.h $(INCLUDEINSTALL)
184 @echo "copying Mesa import library to library directory..."
185 -copy $(MESALIB) $(LIBINSTALL)
186
187 clean ::
188 @del /f tnl\*.obj
189 @del /f swrast_setup\*.obj
190 @del /f math\*.obj
191 @del /f array_cache\*.obj
192 @del /f swrast\*.obj
193 @del /f Trace\*.obj
194 @del /f osmesa\*.obj
195 @del /f Windows\*.obj
196
197 clobber ::
198 @del /f OSmesa\*.lib
199 @del /f OSmesa\*.exp
200 @del /f OSmesa\*.dll
201
202 # override default inference rule with one that writes the object to
203 # the same subdir that the c file is in.
204 .c.obj :
205 $(cc) $(CFLAGS) -I. $< /Fo$*.obj