new texture compression infrastructure
[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 highpc.c \
67 hint.c \
68 histogram.c \
69 image.c \
70 imports.c \
71 light.c \
72 lines.c \
73 lowpc.c \
74 matrix.c \
75 mem.c \
76 mmath.c \
77 pixel.c \
78 points.c \
79 polygon.c \
80 rastpos.c \
81 state.c \
82 stencil.c \
83 texcompress.c \
84 teximage.c \
85 texformat.c \
86 texobj.c \
87 texstate.c \
88 texstore.c \
89 texutil.c \
90 varray.c \
91 vpexec.c \
92 vpparse.c \
93 vpstate.c \
94 vtxfmt.c \
95 # X86\x86.c \
96 # X86\common_x86.c \
97 # X86\3dnow.c \
98 # X86\sse.c \
99 math\m_debug_norm.c \
100 math\m_debug_xform.c \
101 math\m_eval.c \
102 math\m_matrix.c \
103 math\m_translate.c \
104 math\m_vector.c \
105 math\m_xform.c \
106 array_cache\ac_context.c \
107 array_cache\ac_import.c \
108 swrast\s_aaline.c \
109 swrast\s_aatriangle.c \
110 swrast\s_accum.c \
111 swrast\s_alpha.c \
112 swrast\s_alphabuf.c \
113 swrast\s_bitmap.c \
114 swrast\s_blend.c \
115 swrast\s_buffers.c \
116 swrast\s_copypix.c \
117 swrast\s_context.c \
118 swrast\s_depth.c \
119 swrast\s_drawpix.c \
120 swrast\s_feedback.c \
121 swrast\s_fog.c \
122 swrast\s_histogram.c \
123 swrast\s_imaging.c \
124 swrast\s_lines.c \
125 swrast\s_logic.c \
126 swrast\s_masking.c \
127 swrast\s_pixeltex.c \
128 swrast\s_points.c \
129 swrast\s_readpix.c \
130 swrast\s_span.c \
131 swrast\s_stencil.c \
132 swrast\s_texstore.c \
133 swrast\s_texture.c \
134 swrast\s_triangle.c \
135 swrast\s_zoom.c
136
137 DRIVER_SRCS = \
138 Trace\tr_context.c \
139 Trace\tr_control.c \
140 Trace\tr_error.c \
141 Trace\tr_support.c \
142 Trace\tr_wrapper.c \
143 Trace\tr_write.c \
144 Windows\wgl.c \
145 Windows\wmesa.c
146
147 ASM_SRCS =
148
149 SRCS = $(CORE_SRCS) $(DRIVER_SRCS)
150
151 all : mesadll $(SUBDIRS)
152
153 !include "$(TOP)/mesawin32.mak"
154
155 mesadll : $(MESADLL)
156
157 CFLAGS = $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -DBUILD_GL32 -DNO_PARALLEL -DNO_STEREO
158 !IFNDEF NODEBUG
159 CFLAGS = $(CFLAGS) -DMESA_DEBUG
160 !ENDIF
161 LFLAGS = $(dlllflags) $(lcommon) $(LFLAGS)
162
163 OBJS = $(ASM_SRCS:.S=.obj) $(CORE_SRCS:.c=.obj) $(DRIVER_SRCS:.c=.obj)
164 LIBS = winmm.lib $(guilibsdll)
165
166 $(MESADLL) : $(OBJS) mesa.def
167 $(link) $(LFLAGS) -out:$(MESADLL) -def:mesa.def $(OBJS) $(LIBS)
168 @echo "copying Mesa dynamic link library to lib directory..."
169 -copy $(MESADLL) ..\lib
170 @echo "copying Mesa import library to lib directory..."
171 -copy $(MESALIB) ..\lib
172
173 $(SUBDIRS) :
174 @echo.
175 @echo Making in $* directory
176 @cd $*
177 @nmake -f Makefile.win -nologo
178 @cd ..
179
180 install : $(MESADLL)
181 @echo.
182 @echo "copying Mesa dynamic link library to system directory..."
183 -copy $(MESADLL) $(DLLINSTALL)
184 @echo "copying Mesa header files to include directory..."
185 -copy ..\..\include\GL\gl.h $(INCLUDEINSTALL)
186 -copy ..\..\include\GL\glext.h $(INCLUDEINSTALL)
187 @echo "copying Mesa import library to library directory..."
188 -copy $(MESALIB) $(LIBINSTALL)
189
190 clean ::
191 @del /f tnl\*.obj
192 @del /f swrast_setup\*.obj
193 @del /f math\*.obj
194 @del /f array_cache\*.obj
195 @del /f swrast\*.obj
196 @del /f Trace\*.obj
197 @del /f osmesa\*.obj
198 @del /f Windows\*.obj
199
200 clobber ::
201 @del /f OSmesa\*.lib
202 @del /f OSmesa\*.exp
203 @del /f OSmesa\*.dll
204
205 # override default inference rule with one that writes the object to
206 # the same subdir that the c file is in.
207 .c.obj :
208 $(cc) $(CFLAGS) -I. $< /Fo$*.obj