Add GLAPIENTRY function decorations for correct operation on Windows.
[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 arbprogram.c \
20 attrib.c \
21 blend.c \
22 bufferobj.c \
23 buffers.c \
24 clip.c \
25 colortab.c \
26 context.c \
27 convolve.c \
28 debug.c \
29 depth.c \
30 dispatch.c \
31 dlist.c \
32 drawpix.c \
33 enable.c \
34 enums.c \
35 eval.c \
36 extensions.c \
37 feedback.c \
38 fog.c \
39 get.c \
40 glapi.c \
41 glthread.c \
42 hash.c \
43 hint.c \
44 histogram.c \
45 image.c \
46 imports.c \
47 light.c \
48 lines.c \
49 matrix.c \
50 nvprogram.c \
51 nvfragparse.c \
52 nvvertexec.c \
53 nvvertparse.c \
54 pixel.c \
55 points.c \
56 polygon.c \
57 rastpos.c \
58 state.c \
59 stencil.c \
60 texcompress.c \
61 teximage.c \
62 texformat.c \
63 texobj.c \
64 texstate.c \
65 texstore.c \
66 texutil.c \
67 varray.c \
68 vtxfmt.c \
69 # X86\x86.c \
70 # X86\common_x86.c \
71 # X86\3dnow.c \
72 # X86\sse.c \
73 math\m_debug_norm.c \
74 math\m_debug_xform.c \
75 math\m_eval.c \
76 math\m_matrix.c \
77 math\m_translate.c \
78 math\m_vector.c \
79 math\m_xform.c \
80 array_cache\ac_context.c \
81 array_cache\ac_import.c \
82 swrast\s_aaline.c \
83 swrast\s_aatriangle.c \
84 swrast\s_accum.c \
85 swrast\s_alpha.c \
86 swrast\s_alphabuf.c \
87 swrast\s_bitmap.c \
88 swrast\s_blend.c \
89 swrast\s_buffers.c \
90 swrast\s_copypix.c \
91 swrast\s_context.c \
92 swrast\s_depth.c \
93 swrast\s_drawpix.c \
94 swrast\s_feedback.c \
95 swrast\s_fog.c \
96 swrast\s_imaging.c \
97 swrast\s_lines.c \
98 swrast\s_logic.c \
99 swrast\s_masking.c \
100 swrast\s_nvfragprog.c \
101 swrast\s_pixeltex.c \
102 swrast\s_points.c \
103 swrast\s_readpix.c \
104 swrast\s_span.c \
105 swrast\s_stencil.c \
106 swrast\s_texstore.c \
107 swrast\s_texture.c \
108 swrast\s_triangle.c \
109 swrast\s_zoom.c \
110 swrast_setup\ss_context.c \
111 swrast_setup\ss_triangle.c \
112 swrast_setup\ss_vb.c \
113 tnl\t_array_api.c \
114 tnl\t_array_import.c \
115 tnl\t_context.c \
116 tnl\t_eval_api.c \
117 tnl\t_imm_alloc.c \
118 tnl\t_imm_api.c \
119 tnl\t_imm_debug.c \
120 tnl\t_imm_dlist.c \
121 tnl\t_imm_elt.c \
122 tnl\t_imm_eval.c \
123 tnl\t_imm_exec.c \
124 tnl\t_imm_fixup.c \
125 tnl\t_pipeline.c \
126 tnl\t_vb_fog.c \
127 tnl\t_vb_light.c \
128 tnl\t_vb_normals.c \
129 tnl\t_vb_points.c \
130 tnl\t_vb_program.c \
131 tnl\t_vb_render.c \
132 tnl\t_vb_texgen.c \
133 tnl\t_vb_texmat.c \
134 tnl\t_vb_vertex.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 !IFNDEF NODEBUG
158 CFLAGS = $(CFLAGS) -DMESA_DEBUG
159 !ENDIF
160 LFLAGS = $(dlllflags) $(lcommon) $(LFLAGS)
161
162 OBJS = $(ASM_SRCS:.S=.obj) $(CORE_SRCS:.c=.obj) $(DRIVER_SRCS:.c=.obj)
163 LIBS = winmm.lib $(guilibsdll)
164
165 $(MESADLL) : $(OBJS) mesa.def
166 $(link) $(LFLAGS) -out:$(MESADLL) -def:mesa.def $(OBJS) $(LIBS)
167 @echo "copying Mesa dynamic link library to lib directory..."
168 -copy $(MESADLL) ..\lib
169 @echo "copying Mesa import library to lib directory..."
170 -copy $(MESALIB) ..\lib
171
172 $(SUBDIRS) :
173 @echo.
174 @echo Making in $* directory
175 @cd $*
176 @nmake -f Makefile.win -nologo
177 @cd ..
178
179 install : $(MESADLL)
180 @echo.
181 @echo "copying Mesa dynamic link library to system directory..."
182 -copy $(MESADLL) $(DLLINSTALL)
183 @echo "copying Mesa header files to include directory..."
184 -copy ..\..\include\GL\gl.h $(INCLUDEINSTALL)
185 -copy ..\..\include\GL\glext.h $(INCLUDEINSTALL)
186 @echo "copying Mesa import library to library directory..."
187 -copy $(MESALIB) $(LIBINSTALL)
188
189 clean ::
190 @del /f tnl\*.obj
191 @del /f swrast_setup\*.obj
192 @del /f math\*.obj
193 @del /f array_cache\*.obj
194 @del /f swrast\*.obj
195 @del /f Trace\*.obj
196 @del /f osmesa\*.obj
197 @del /f Windows\*.obj
198
199 clobber ::
200 @del /f OSmesa\*.lib
201 @del /f OSmesa\*.exp
202 @del /f OSmesa\*.dll
203
204 # override default inference rule with one that writes the object to
205 # the same subdir that the c file is in.
206 .c.obj :
207 $(cc) $(CFLAGS) -I. $< /Fo$*.obj