Fix up Windows makefiles so that the debug build leaves debugger info
[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 # Sept 12, 2001
5 # Windows driver not working. OSMesa driver works.
6 #
7
8 !include <win32.mak>
9
10 TOP = ..
11 SUBDIRS = osmesa.dir
12
13 CORE_SRCS = \
14 tnl\t_array_api.c \
15 tnl\t_array_import.c \
16 tnl\t_context.c \
17 tnl\t_eval_api.c \
18 tnl\t_imm_alloc.c \
19 tnl\t_imm_api.c \
20 tnl\t_imm_debug.c \
21 tnl\t_imm_dlist.c \
22 tnl\t_imm_elt.c \
23 tnl\t_imm_eval.c \
24 tnl\t_imm_exec.c \
25 tnl\t_imm_fixup.c \
26 tnl\t_pipeline.c \
27 tnl\t_vb_fog.c \
28 tnl\t_vb_light.c \
29 tnl\t_vb_normals.c \
30 tnl\t_vb_points.c \
31 tnl\t_vb_render.c \
32 tnl\t_vb_texgen.c \
33 tnl\t_vb_texmat.c \
34 tnl\t_vb_vertex.c \
35 swrast_setup\ss_context.c \
36 swrast_setup\ss_triangle.c \
37 swrast_setup\ss_vb.c \
38 api_loopback.c \
39 api_noop.c \
40 api_validate.c \
41 accum.c \
42 attrib.c \
43 blend.c \
44 buffers.c \
45 clip.c \
46 colortab.c \
47 config.c \
48 context.c \
49 convolve.c \
50 debug.c \
51 depth.c \
52 dispatch.c \
53 dlist.c \
54 drawpix.c \
55 enable.c \
56 enums.c \
57 eval.c \
58 extensions.c \
59 feedback.c \
60 fog.c \
61 get.c \
62 glapi.c \
63 glthread.c \
64 hash.c \
65 highpc.c \
66 hint.c \
67 histogram.c \
68 image.c \
69 imports.c \
70 light.c \
71 lines.c \
72 lowpc.c \
73 matrix.c \
74 mem.c \
75 mmath.c \
76 pixel.c \
77 points.c \
78 polygon.c \
79 rastpos.c \
80 state.c \
81 stencil.c \
82 teximage.c \
83 texformat.c \
84 texobj.c \
85 texstate.c \
86 texstore.c \
87 texutil.c \
88 varray.c \
89 vtxfmt.c \
90 # X86\x86.c \
91 # X86\common_x86.c \
92 # X86\3dnow.c \
93 # X86\sse.c \
94 math\m_debug_norm.c \
95 math\m_debug_vertex.c \
96 math\m_debug_xform.c \
97 math\m_eval.c \
98 math\m_matrix.c \
99 math\m_translate.c \
100 math\m_vector.c \
101 math\m_vertices.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_pb.c \
125 swrast\s_pixeltex.c \
126 swrast\s_points.c \
127 swrast\s_readpix.c \
128 swrast\s_scissor.c \
129 swrast\s_span.c \
130 swrast\s_stencil.c \
131 swrast\s_texstore.c \
132 swrast\s_texture.c \
133 swrast\s_triangle.c \
134 swrast\s_zoom.c
135
136 DRIVER_SRCS = \
137 Trace\tr_context.c \
138 Trace\tr_control.c \
139 Trace\tr_error.c \
140 Trace\tr_support.c \
141 Trace\tr_wrapper.c \
142 Trace\tr_write.c \
143 Windows\wgl.c \
144 Windows\wmesa.c
145
146 ASM_SRCS =
147
148 SRCS = $(CORE_SRCS) $(DRIVER_SRCS)
149
150 all : mesadll $(SUBDIRS)
151
152 !include "$(TOP)/mesawin32.mak"
153
154 mesadll : $(MESADLL)
155
156 CFLAGS = $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -DBUILD_GL32 -DNO_PARALLEL -DNO_STEREO
157 LFLAGS = $(dlllflags) $(lcommon) $(LFLAGS)
158
159 OBJS = $(ASM_SRCS:.S=.obj) $(CORE_SRCS:.c=.obj) $(DRIVER_SRCS:.c=.obj)
160 LIBS = winmm.lib $(guilibsdll)
161
162 $(MESADLL) : $(OBJS) mesa.def
163 $(link) $(LFLAGS) -out:$(MESADLL) -def:mesa.def $(OBJS) $(LIBS)
164 @echo "copying Mesa dynamic link library to lib directory..."
165 -copy $(MESADLL) ..\lib
166 @echo "copying Mesa import library to lib directory..."
167 -copy $(MESALIB) ..\lib
168
169 $(SUBDIRS) :
170 @echo.
171 @echo Making in $* directory
172 @cd $*
173 @nmake -f Makefile.win -nologo
174 @cd ..
175
176 install : $(MESADLL)
177 @echo.
178 @echo "copying Mesa dynamic link library to system directory..."
179 -copy $(MESADLL) $(DLLINSTALL)
180 @echo "copying Mesa header files to include directory..."
181 -copy ..\..\include\GL\gl.h $(INCLUDEINSTALL)
182 -copy ..\..\include\GL\glext.h $(INCLUDEINSTALL)
183 @echo "copying Mesa import library to library directory..."
184 -copy $(MESALIB) $(LIBINSTALL)
185
186 clean ::
187 @del /f tnl\*.obj
188 @del /f swrast_setup\*.obj
189 @del /f math\*.obj
190 @del /f array_cache\*.obj
191 @del /f swrast\*.obj
192 @del /f Trace\*.obj
193 @del /f osmesa\*.obj
194 @del /f Windows\*.obj
195
196 clobber ::
197 @del /f OSmesa\*.lib
198 @del /f OSmesa\*.exp
199 @del /f OSmesa\*.dll
200
201 # override default inference rule with one that writes the object to
202 # the same subdir that the c file is in.
203 .c.obj :
204 $(cc) $(CFLAGS) -I. $< /Fo$*.obj