d4a45547c6ca1611e0a40646ba58aef8cdb2f2b3
[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 api_loopback.c \
16 api_noop.c \
17 api_validate.c \
18 accum.c \
19 attrib.c \
20 blend.c \
21 buffers.c \
22 clip.c \
23 colortab.c \
24 context.c \
25 convolve.c \
26 debug.c \
27 depth.c \
28 dispatch.c \
29 dlist.c \
30 drawpix.c \
31 enable.c \
32 enums.c \
33 eval.c \
34 extensions.c \
35 feedback.c \
36 fog.c \
37 get.c \
38 glapi.c \
39 glthread.c \
40 hash.c \
41 hint.c \
42 histogram.c \
43 image.c \
44 imports.c \
45 light.c \
46 lines.c \
47 matrix.c \
48 nvprogram.c \
49 nvfragparse.c \
50 nvvertexec.c \
51 nvvertparse.c \
52 pixel.c \
53 points.c \
54 polygon.c \
55 rastpos.c \
56 state.c \
57 stencil.c \
58 texcompress.c \
59 teximage.c \
60 texformat.c \
61 texobj.c \
62 texstate.c \
63 texstore.c \
64 texutil.c \
65 varray.c \
66 vtxfmt.c \
67 # X86\x86.c \
68 # X86\common_x86.c \
69 # X86\3dnow.c \
70 # X86\sse.c \
71 math\m_debug_norm.c \
72 math\m_debug_xform.c \
73 math\m_eval.c \
74 math\m_matrix.c \
75 math\m_translate.c \
76 math\m_vector.c \
77 math\m_xform.c \
78 array_cache\ac_context.c \
79 array_cache\ac_import.c \
80 swrast\s_aaline.c \
81 swrast\s_aatriangle.c \
82 swrast\s_accum.c \
83 swrast\s_alpha.c \
84 swrast\s_alphabuf.c \
85 swrast\s_bitmap.c \
86 swrast\s_blend.c \
87 swrast\s_buffers.c \
88 swrast\s_copypix.c \
89 swrast\s_context.c \
90 swrast\s_depth.c \
91 swrast\s_drawpix.c \
92 swrast\s_feedback.c \
93 swrast\s_fog.c \
94 swrast\s_imaging.c \
95 swrast\s_lines.c \
96 swrast\s_logic.c \
97 swrast\s_masking.c \
98 swrast\s_nvfragprog.c \
99 swrast\s_pixeltex.c \
100 swrast\s_points.c \
101 swrast\s_readpix.c \
102 swrast\s_span.c \
103 swrast\s_stencil.c \
104 swrast\s_texstore.c \
105 swrast\s_texture.c \
106 swrast\s_triangle.c \
107 swrast\s_zoom.c \
108 swrast_setup\ss_context.c \
109 swrast_setup\ss_triangle.c \
110 swrast_setup\ss_vb.c \
111 tnl\t_array_api.c \
112 tnl\t_array_import.c \
113 tnl\t_context.c \
114 tnl\t_eval_api.c \
115 tnl\t_imm_alloc.c \
116 tnl\t_imm_api.c \
117 tnl\t_imm_debug.c \
118 tnl\t_imm_dlist.c \
119 tnl\t_imm_elt.c \
120 tnl\t_imm_eval.c \
121 tnl\t_imm_exec.c \
122 tnl\t_imm_fixup.c \
123 tnl\t_pipeline.c \
124 tnl\t_vb_fog.c \
125 tnl\t_vb_light.c \
126 tnl\t_vb_normals.c \
127 tnl\t_vb_points.c \
128 tnl\t_vb_program.c \
129 tnl\t_vb_render.c \
130 tnl\t_vb_texgen.c \
131 tnl\t_vb_texmat.c \
132 tnl\t_vb_vertex.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