OSDN Git Service

d32a229aa66d382f7a4c2ae63b63146a43498bb4
[mingw/mingw-org-wsl.git] / Makefile.in
1 ##
2 # @file Makefile.in
3 # @copy 2012 MinGW.org project
4 #
5 # Permission is hereby granted, free of charge, to any person obtaining a
6 # copy of this software and associated documentation files (the "Software"),
7 # to deal in the Software without restriction, including without limitation
8 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 # and/or sell copies of the Software, and to permit persons to whom the
10 # Software is furnished to do so, subject to the following conditions:
11
12 # The above copyright notice and this permission notice (including the next
13 # paragraph) shall be included in all copies or substantial portions of the
14 # Software.
15
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 # DEALINGS IN THE SOFTWARE.
23 ##
24 VPATH=$(srcdir)
25 PACKAGE_TARNAME=@PACKAGE_TARNAME@
26 PACKAGE_VERSION=@PACKAGE_VERSION@
27 PACKAGE_RELEASE=@PACKAGE_RELEASE@
28 srcdir=@srcdir@
29 top_srcdir=@top_srcdir@
30 top_builddir=@top_builddir@
31
32 prefix=@prefix@
33 exec_prefix=@exec_prefix@
34 datarootdir=@datarootdir@
35 bindir=@bindir@
36 libdir=@libdir@
37 includedir=@includedir@
38 docdir=@docdir@
39
40 mkinstalldirs=@MKDIR_P@
41
42 CFLAGS=@CFLAGS@
43 RANLIB=@RANLIB@
44 AS=@AS@
45 DLLTOOL=@DLLTOOL@
46 DLLTOOL_FLAGS := --as $(AS) -k --dllname
47 INSTALL=@INSTALL@
48 MKDIR_P=@MKDIR_P@
49
50 INCLUDES=-I$(top_srcdir)/include -I$(srcdir)/include \
51   -I$(top_srcdir)/src/libcrt/include -I$(top_srcdir)/misc/src/include \
52   -nostdinc -iwithprefixbefore include
53 ALL_CFLAGS=$(CFLAGS) $(INCLUDES) -DNTDDI_VERSION=0x04000000
54
55 .SUFFIXES: .def.in .def
56
57 mingwrt_lib_LIBRARIES = \
58   libmsvcrt.a \
59   libmsvcrtd.a \
60   libmsvcr70.a \
61   libmsvcr70d.a \
62   libmsvcr71.a \
63   libmsvcr71d.a \
64   libmsvcr80.a \
65   libmsvcr80d.a \
66   libmsvcr90.a \
67   libmsvcr90d.a \
68   libmsvcr100.a \
69   libmsvcr100d.a \
70   libmingw32.a \
71   libmoldname.a \
72   libmoldnamed.a \
73   libmoldname70.a \
74   libmoldname70d.a \
75   libmoldname71.a \
76   libmoldname71d.a \
77   libmoldname80.a \
78   libmoldname80d.a \
79   libmoldname90.a \
80   libmoldname90d.a \
81   libmoldname100.a \
82   libmoldname100d.a \
83   libmingwthrd.a \
84   libmingwthrd_old.a \
85   libm.a \
86   libmingwex.a \
87   libgmon.a
88
89 winapi_DEF := $(notdir $(wildcard ${top_srcdir}/lib/lib32/*.def))
90 winapi_DDK_DEF := $(notdir $(wildcard $(top_srcdir)/lib/lib32/ddk/*.def))
91 winapi_DIRECTX_DEF := $(notdir $(wildcard $(top_srcdir)/lib/lib32/directx/*.def))
92 winapi_DIRECTX_DEF := $(subst dinput.def ,,$(winapi_DIRECTX_DEF))
93 winapi_DIRECTX_DEF := $(subst dinput8.def ,,$(winapi_DIRECTX_DEF))
94 winapi_DIRECTX_DINPUT_DEF := dinput.def dinput8.def
95 winapi_MRI := $(notdir $(wildcard ${top_srcdir}/lib/lib32/*.mri))
96 winapi_lib_LIBRARIES := $(addprefix lib,$(winapi_DEF:.def=.a))
97 winapi_lib_DDK_LIBRARIES := $(addprefix lib,$(winapi_DDK_DEF:.def=.a))
98 winapi_lib_DIRECTX_LIBRARIES := $(addprefix lib,$(winapi_DIRECTX_DEF:.def=.a))
99 winapi_lib_DIRECTX_DINPUT_LIBRARIES := $(addprefix lib,$(winapi_DIRECTX_DINPUT_DEF:.def=.a))
100 winapi_mri_LIBRARIES := $(addprefix lib,$(winapi_MRI:.mri=.a))
101 winapi_lib_EXTRA_LIBRARIES := libuuid.a libscrnsave.a libscrnsavw.a liblargeint.a libdmoguids.a libdxguid.a libdxerr8.a libdxerr9.a libstrmiids.a
102
103 lib_LIBRARIES := $(mingwrt_lib_LIBRARIES) $(winapi_lib_LIBRARIES) \
104   $(winapi_lib_EXTRA_LIBRARIES) $(winapi_mri_LIBRARIES) \
105   $(winapi_lib_DDK_LIBRARIES) $(winapi_lib_DIRECTX_LIBRARIES) \
106   $(winapi_lib_DIRECTX_DINPUT_LIBRARIES)
107
108 SRCDIR := src/libcrt/crt
109 crt0_SOURCES := \
110   $(SRCDIR)/crt1.c \
111   $(SRCDIR)/dllcrt1.c \
112   $(SRCDIR)/CRT_noglob.c \
113   $(SRCDIR)/crtmt.c \
114   $(SRCDIR)/crtst.c \
115   $(SRCDIR)/CRT_fp8.c \
116   $(SRCDIR)/CRT_fp10.c \
117   $(SRCDIR)/txtmode.c \
118   $(SRCDIR)/binmode.c
119 crt0_OBJECTS := $(crt0_SOURCES:.c=.o) $(SRCDIR)/crt2.o $(SRCDIR)/dllcrt2.o
120
121 SRCDIR := src/libcrt/crt
122 mingwm10_dll_SOURCES := \
123   $(SRCDIR)/mthr.c \
124   $(SRCDIR)/mthr_init.c
125 mingwm10_dll_OBJECTS := $(mingwm10_dll_SOURCES:.c=.o)
126 mingwm10_dll_FLAGS := -shared -Wl,--image-base,0x6FBC0000 \
127   -Wl,--entry,_DllMainCRTStartup@12 -L.
128
129 SRCDIR := src/libcrt/crt
130 mold_SOURCES := \
131   $(SRCDIR)/isascii.c \
132   $(SRCDIR)/iscsym.c \
133   $(SRCDIR)/iscsymf.c \
134   $(SRCDIR)/toascii.c \
135   $(SRCDIR)/strcasecmp.c \
136   $(SRCDIR)/strncasecmp.c \
137   $(SRCDIR)/wscmpi.c
138 mold_OBJECTS := $(mode_SOURCES:.c=.o)
139
140 SRCDIR := misc/gpl/profile
141 gcrt0_SOURCES := $(SRCDIR)/gcrt0.c
142 gcrt0_OBJECTS := $(SRCDIR)/gcrt1.o $(SRCDIR)/gcrt2.o
143
144 lib_OBJECTS := $(crt0_OBJECTS) $(gcrt0_OBJECTS)
145
146 bin_LIBRARIES := mingwm10.dll
147 doc_DOCUMENTS := README LICENSE
148 doc_DOCUMENTS_EXTRA := doc/historical/mingw doc/historical/w32api
149
150 libuuid_a_SOURCES := $(addprefix src/libuuid/,$(notdir $(wildcard ${top_srcdir}/src/libuuid/*.c)))
151 libuuid_a_OBJECTS := $(libuuid_a_SOURCES:.c=.o)
152
153 libscrnsave_a_SOURCES := src/libscrnsave/scrnsave.c
154 libscrnsave_a_OBJECTS := $(libscrnsave_a_SOURCES:.c=.o)
155 scrnsave_o_CFLAGS := -UUNICODE
156
157 libscrnsavw_a_SOURCES := src/libscrnsave/scrnsave.c
158 libscrnsavw_a_OBJECTS := src/libscrnsave/srcnsavw.o
159 scrnsavw_o_CFLAGS := -DUNICODE
160
161 liblargeint_a_SOURCES := src/liblargeint/largeint.c
162 liblargeint_a_OBJECTS := $(liblargeint_a_SOURCES:.c=.o)
163
164 libdmoguids_a_SOURCES := misc/src/libdmoguids/dmoguids.c
165 libdmoguids_a_OBJECTS := $(libdmoguids_a_SOURCES:.c=.o)
166
167 libdxguid_a_SOURCES := misc/src/libdxguid/dxguid.c
168 libdxguid_a_OBJECTS := $(libdxguid_a_SOURCES:.c=.o)
169
170 libstrmiids_a_SOURCES := misc/src/libstrmiids/strmiids.c
171 libstrmiids_a_OBJECTS := $(libstrmiids_a_SOURCES:.c=.o)
172
173 msvcrt_DEF = \
174   msvcrt.def msvcr70.def msvcr71.def msvcr80.def msvcr90.def msvcr100.def \
175   msvcrtd.def msvcr70d.def msvcr71d.def msvcr80d.def msvcr90d.def msvcr100d.def
176
177 moldname_DEF = \
178   moldname.def moldnamed.def moldname70.def moldname71.def moldname80.def \
179   moldname90.def moldname100.def moldname70d.def moldname71d.def \
180   moldname80d.def moldname90d.def moldname100d.def
181
182 SRCDIR := src/libcrt/crt
183 libmingw32_a_SOURCES := \
184   $(SRCDIR)/CRTglob.c \
185   $(SRCDIR)/CRTfmode.c \
186   $(SRCDIR)/CRTinit.c \
187   $(SRCDIR)/dllmain.c \
188   $(SRCDIR)/gccmain.c \
189   $(SRCDIR)/main.c \
190   $(SRCDIR)/crtst.c \
191   $(SRCDIR)/CRT_fp10.c \
192   $(SRCDIR)/txtmode.c \
193   $(SRCDIR)/pseudo-reloc.c \
194   $(SRCDIR)/pseudo-reloc-list.c \
195   $(SRCDIR)/cpu_features.c \
196   $(SRCDIR)/tlsmcrt.c \
197   $(SRCDIR)/tlsmthread.c \
198   $(SRCDIR)/tlssup.c \
199   $(SRCDIR)/tlsthrd.c
200 libmingw32_a_OBJECTS := $(libmingw32_a_SOURCES:.c=.o)
201
202 libmingwthrd_a_SOURCES := $(SRCDIR)/crtmt.c
203 libmingwthrd_a_OBJECTS := $(libmingwthrd_a_SOURCES:.c=.o)
204
205 SRCDIR := src/libcrt/complex
206 complex_SOURCES := \
207   $(SRCDIR)/cabs.c \
208   $(SRCDIR)/carg.c \
209   $(SRCDIR)/catan.c \
210   $(SRCDIR)/ccoshf.c \
211   $(SRCDIR)/clog.c \
212   $(SRCDIR)/creal.c \
213   $(SRCDIR)/csqrt.c \
214   $(SRCDIR)/cabsf.c \
215   $(SRCDIR)/cargf.c \
216   $(SRCDIR)/catanf.c \
217   $(SRCDIR)/ccoshl.c \
218   $(SRCDIR)/clogf.c \
219   $(SRCDIR)/crealf.c \
220   $(SRCDIR)/csqrtf.c \
221   $(SRCDIR)/cabsl.c \
222   $(SRCDIR)/cargl.c \
223   $(SRCDIR)/catanh.c \
224   $(SRCDIR)/ccosl.c\
225   $(SRCDIR)/clogl.c \
226   $(SRCDIR)/creall.c \
227   $(SRCDIR)/csqrtl.c \
228   $(SRCDIR)/cacos.c \
229   $(SRCDIR)/casin.c \
230   $(SRCDIR)/catanhf.c \
231   $(SRCDIR)/cexp.c \
232   $(SRCDIR)/cpow.c \
233   $(SRCDIR)/csin.c \
234   $(SRCDIR)/ctan.c \
235   $(SRCDIR)/cacosf.c \
236   $(SRCDIR)/casinf.c \
237   $(SRCDIR)/catanhl.c \
238   $(SRCDIR)/cexpf.c \
239   $(SRCDIR)/cpowf.c \
240   $(SRCDIR)/csinf.c \
241   $(SRCDIR)/ctanf.c \
242   $(SRCDIR)/cacosh.c \
243   $(SRCDIR)/casinh.c \
244   $(SRCDIR)/catanl.c \
245   $(SRCDIR)/cexpl.c \
246   $(SRCDIR)/cpowl.c \
247   $(SRCDIR)/csinh.c \
248   $(SRCDIR)/ctanh.c \
249   $(SRCDIR)/cacoshf.c \
250   $(SRCDIR)/casinhf.c \
251   $(SRCDIR)/ccos.c \
252   $(SRCDIR)/cimag.c \
253   $(SRCDIR)/cproj.c \
254   $(SRCDIR)/csinhf.c \
255   $(SRCDIR)/ctanhf.c \
256   $(SRCDIR)/cacoshl.c \
257   $(SRCDIR)/casinhl.c \
258   $(SRCDIR)/ccosf.c \
259   $(SRCDIR)/cimagf.c \
260   $(SRCDIR)/cprojf.c \
261   $(SRCDIR)/csinhl.c \
262   $(SRCDIR)/ctanhl.c \
263   $(SRCDIR)/cacosl.c \
264   $(SRCDIR)/casinl.c \
265   $(SRCDIR)/ccosh.c \
266   $(SRCDIR)/cimagl.c \
267   $(SRCDIR)/cprojl.c \
268   $(SRCDIR)/csinl.c \
269   $(SRCDIR)/ctanl.c
270 complex_SOURCES := $(wildcard src/libcrt/complex/*.c)
271
272 SRCDIR := src/libcrt/ctype
273 ctype_SOURCES := $(SRCDIR)/isblank.c $(SRCDIR)/iswblank.c
274
275 SRCDIR := src/libcrt/fenv
276 fenv_SOURCES := \
277   $(SRCDIR)/feclearexcept.c \
278   $(SRCDIR)/fegetround.c \
279   $(SRCDIR)/fesetenv.c \
280   $(SRCDIR)/fetestexcept.c \
281   $(SRCDIR)/fegetenv.c \
282   $(SRCDIR)/feholdexcept.c \
283   $(SRCDIR)/fesetexceptflag.c \
284   $(SRCDIR)/feupdateenv.c \
285   $(SRCDIR)/fegetexceptflag.c \
286   $(SRCDIR)/feraiseexcept.c \
287   $(SRCDIR)/fesetround.c
288
289 SRCDIR := misc/src/libcrt/gdtoa
290 gdtoa_SOURCES := \
291   $(SRCDIR)/g__fmt.c \
292   $(SRCDIR)/gethex.c \
293   $(SRCDIR)/qnan.c \
294   $(SRCDIR)/strtopx.c \
295   $(SRCDIR)/g_dfmt.c \
296   $(SRCDIR)/gdtoa.c \
297   $(SRCDIR)/gmisc.c \
298   $(SRCDIR)/smisc.c \
299   $(SRCDIR)/sum.c \
300   $(SRCDIR)/arithchk.c \
301   $(SRCDIR)/g_ffmt.c \
302   $(SRCDIR)/hd_init.c \
303   $(SRCDIR)/strtodg.c \
304   $(SRCDIR)/ulp.c \
305   $(SRCDIR)/dmisc.c \
306   $(SRCDIR)/g_xfmt.c \
307   $(SRCDIR)/hexnan.c \
308   $(SRCDIR)/strtodnrp.c \
309   $(SRCDIR)/dtoa.c \
310   $(SRCDIR)/misc.c \
311   $(SRCDIR)/strtof.c
312
313 SRCDIR := src/libcrt/inttypes
314 inttypes_SOURCES := \
315   $(SRCDIR)/imaxabs.c \
316   $(SRCDIR)/imaxdiv.c \
317   $(SRCDIR)/strtoimax.c \
318   $(SRCDIR)/strtoumax.c \
319   $(SRCDIR)/wcstoimax.c \
320   $(SRCDIR)/wcstoumax.c
321
322 SRCDIR := src/libcrt/math
323 MSRCDIR := misc/src/libcrt/math
324 math_SOURCES := \
325   $(SRCDIR)/acosf.c \
326   $(SRCDIR)/acosh.c \
327   $(SRCDIR)/acoshf.c \
328   $(SRCDIR)/acoshl.c \
329   $(SRCDIR)/acosl.c \
330   $(SRCDIR)/asinf.c \
331   $(SRCDIR)/asinh.c \
332   $(SRCDIR)/asinhf.c \
333   $(SRCDIR)/asinhl.c \
334   $(SRCDIR)/asinl.c \
335   $(SRCDIR)/atan2f.c \
336   $(SRCDIR)/atan2l.c \
337   $(SRCDIR)/atanf.c \
338   $(SRCDIR)/atanh.c \
339   $(SRCDIR)/atanhf.c \
340   $(SRCDIR)/atanhl.c \
341   $(SRCDIR)/atanl.c \
342   $(MSRCDIR)/cbrt.c \
343   $(MSRCDIR)/cbrtf.c \
344   $(MSRCDIR)/cbrtl.c \
345   $(SRCDIR)/ceilf.S \
346   $(SRCDIR)/ceill.S \
347   $(SRCDIR)/copysign.S \
348   $(SRCDIR)/copysignf.S \
349   $(SRCDIR)/copysignl.S \
350   $(SRCDIR)/cosf.S \
351   $(SRCDIR)/coshf.c \
352   $(MSRCDIR)/coshl.c \
353   $(SRCDIR)/cosl.S \
354   $(MSRCDIR)/erfl.c \
355   $(SRCDIR)/exp2.S \
356   $(SRCDIR)/exp2f.S \
357   $(SRCDIR)/exp2l.S \
358   $(SRCDIR)/expf.c \
359   $(SRCDIR)/expl.c \
360   $(SRCDIR)/expm1.c \
361   $(SRCDIR)/expm1f.c \
362   $(SRCDIR)/expm1l.c \
363   $(SRCDIR)/fabs.c \
364   $(SRCDIR)/fabsf.c \
365   $(SRCDIR)/fabsl.c \
366   $(SRCDIR)/fdim.c \
367   $(SRCDIR)/fdimf.c \
368   $(SRCDIR)/fdiml.c \
369   $(SRCDIR)/floorf.S \
370   $(SRCDIR)/floorl.S \
371   $(SRCDIR)/fma.S \
372   $(SRCDIR)/fmaf.S \
373   $(SRCDIR)/fmal.c \
374   $(SRCDIR)/fmax.c \
375   $(SRCDIR)/fmaxf.c \
376   $(SRCDIR)/fmaxl.c \
377   $(SRCDIR)/fmin.c \
378   $(SRCDIR)/fminf.c \
379   $(SRCDIR)/fminl.c \
380   $(SRCDIR)/fmodf.c \
381   $(SRCDIR)/fmodl.c \
382   $(SRCDIR)/fp_consts.c \
383   $(SRCDIR)/fp_constsf.c \
384   $(SRCDIR)/fp_constsl.c \
385   $(SRCDIR)/fpclassify.c \
386   $(SRCDIR)/fpclassifyf.c \
387   $(SRCDIR)/fpclassifyl.c \
388   $(SRCDIR)/frexpf.c \
389   $(MSRCDIR)/frexpl.S \
390   $(SRCDIR)/fucom.c \
391   $(SRCDIR)/hypotf.c \
392   $(MSRCDIR)/hypotl.c \
393   $(SRCDIR)/ilogb.S \
394   $(SRCDIR)/ilogbf.S \
395   $(SRCDIR)/ilogbl.S \
396   $(SRCDIR)/isnan.c \
397   $(SRCDIR)/isnanf.c \
398   $(SRCDIR)/isnanl.c \
399   $(SRCDIR)/ldexpf.c \
400   $(SRCDIR)/ldexpl.c \
401   $(MSRCDIR)/lgamma.c \
402   $(MSRCDIR)/lgammaf.c \
403   $(MSRCDIR)/lgammal.c \
404   $(SRCDIR)/llrint.c \
405   $(SRCDIR)/llrintf.c \
406   $(SRCDIR)/llrintl.c \
407   $(SRCDIR)/log10f.S \
408   $(SRCDIR)/log10l.S \
409   $(SRCDIR)/log1p.S \
410   $(SRCDIR)/log1pf.S \
411   $(SRCDIR)/log1pl.S \
412   $(SRCDIR)/log2.S \
413   $(SRCDIR)/log2f.S \
414   $(SRCDIR)/log2l.S \
415   $(SRCDIR)/logb.c \
416   $(SRCDIR)/logbf.c \
417   $(SRCDIR)/logbl.c \
418   $(SRCDIR)/logf.S \
419   $(SRCDIR)/logl.S \
420   $(SRCDIR)/lrint.c \
421   $(SRCDIR)/lrintf.c \
422   $(SRCDIR)/lrintl.c \
423   $(SRCDIR)/lround.c \
424   $(SRCDIR)/lroundl.c \
425   $(SRCDIR)/lroundf.c \
426   $(SRCDIR)/modff.c \
427   $(SRCDIR)/modfl.c \
428   $(SRCDIR)/nearbyint.S \
429   $(SRCDIR)/nearbyintf.S \
430   $(SRCDIR)/nearbyintl.S \
431   $(SRCDIR)/nextafterf.c \
432   $(SRCDIR)/nextafterl.c \
433   $(SRCDIR)/nexttoward.c \
434   $(SRCDIR)/nexttowardf.c \
435   $(MSRCDIR)/pow.c \
436   $(SRCDIR)/powf.c \
437   $(MSRCDIR)/powi.c \
438   $(MSRCDIR)/powif.c \
439   $(MSRCDIR)/powil.c \
440   $(MSRCDIR)/powl.c \
441   $(SRCDIR)/remainder.S \
442   $(SRCDIR)/remainderf.S \
443   $(SRCDIR)/remainderl.S \
444   $(SRCDIR)/remquo.S \
445   $(SRCDIR)/remquof.S \
446   $(SRCDIR)/remquol.S \
447   $(SRCDIR)/rint.c \
448   $(SRCDIR)/rintf.c \
449   $(SRCDIR)/rintl.c \
450   $(SRCDIR)/round.c \
451   $(SRCDIR)/roundf.c \
452   $(SRCDIR)/roundl.c \
453   $(MSRCDIR)/s_erf.c \
454   $(SRCDIR)/scalbn.S \
455   $(SRCDIR)/scalbnf.S \
456   $(SRCDIR)/scalbnl.S \
457   $(MSRCDIR)/sf_erf.c \
458   $(SRCDIR)/signbit.c \
459   $(SRCDIR)/signbitf.c \
460   $(SRCDIR)/signbitl.c \
461   $(SRCDIR)/sinf.S \
462   $(SRCDIR)/sinhf.c \
463   $(MSRCDIR)/sinhl.c \
464   $(SRCDIR)/sinl.S \
465   $(SRCDIR)/sqrtf.c \
466   $(SRCDIR)/sqrtl.c \
467   $(SRCDIR)/tanf.S \
468   $(SRCDIR)/tanhf.c \
469   $(MSRCDIR)/tanhl.c \
470   $(SRCDIR)/tanl.S \
471   $(MSRCDIR)/tgamma.c \
472   $(MSRCDIR)/tgammaf.c \
473   $(MSRCDIR)/tgammal.c \
474   $(SRCDIR)/trunc.c \
475   $(SRCDIR)/truncf.c \
476   $(SRCDIR)/truncl.c
477
478 SRCDIR := src/libcrt/misc
479 misc_SOURCES := \
480   $(SRCDIR)/getopt.c \
481   $(SRCDIR)/membarrier.c \
482   $(SRCDIR)/mingw-aligned-malloc.c \
483   $(SRCDIR)/mingw-fseek.c
484
485 SRCDIR := src/libcrt/posix/libgen
486 posix_libgen_SOURCES := $(SRCDIR)/basename.c $(SRCDIR)/dirname.c
487 SRCDIR := src/libcrt/posix/unistd
488 posix_unistd_SOURCES := $(SRCDIR)/ftruncate.c $(SRCDIR)/usleep.c
489 posix_SOURCES := $(posix_libgen_SOURCES) $(posix_unistd_SOURCES)
490
491 SRCDIR := misc/src/libcrt/profile
492 profile_SOURCES := \
493   $(SRCDIR)/gmon.c \
494   $(SRCDIR)/mcount.c \
495   misc/gpl/profile/profil.c \
496 libgmon_a_SOURCES := $(profile_SOURCES)
497 libgmon_a_OBJECTS := $(libgmon_a_SOURCES:.c=.o)
498
499 SRCDIR := src/libcrt/search
500 search_SOURCES := \
501   $(SRCDIR)/tdelete.c \
502   $(SRCDIR)/tfind.c \
503   $(SRCDIR)/tsearch.c \
504   $(SRCDIR)/twalk.c
505
506 SRCDIR := src/libcrt/stdio
507 MSRCDIR := misc/src/libcrt/stdio
508 stdio_SOURCES := \
509   $(SRCDIR)/btowc.c \
510   $(SRCDIR)/fopen64.c \
511   $(SRCDIR)/fprintf.c \
512   $(SRCDIR)/fseeko64.c \
513   $(SRCDIR)/ftello64.c \
514   $(SRCDIR)/lseek64.c \
515   $(MSRCDIR)/pformat.c \
516   $(SRCDIR)/printf.c \
517   $(SRCDIR)/snprintf.c \
518   $(SRCDIR)/snwprintf.c \
519   $(SRCDIR)/sprintf.c \
520   $(SRCDIR)/vfprintf.c \
521   $(SRCDIR)/vfscanf.c \
522   $(SRCDIR)/vfwscanf.c \
523   $(SRCDIR)/vprintf.c \
524   $(SRCDIR)/vscanf.c \
525   $(SRCDIR)/vsnprintf.c \
526   $(SRCDIR)/vsnwprintf.c \
527   $(SRCDIR)/vsprintf.c \
528   $(SRCDIR)/vsscanf.c \
529   $(SRCDIR)/vswscanf.c \
530   $(SRCDIR)/vwscanf.c
531
532 SRCDIR := src/libcrt/stdlib
533 stdlib_SOURCES := \
534   $(SRCDIR)/_Exit.c \
535   $(SRCDIR)/atoll.c \
536   $(SRCDIR)/lltoa.c \
537   $(SRCDIR)/lltow.c \
538   $(SRCDIR)/ulltoa.c \
539   $(SRCDIR)/ulltow.c \
540   $(SRCDIR)/wtoll.c
541
542 SRCDIR := src/libcrt/sys/time
543 sys_time_SOURCES := $(SRCDIR)/gettimeofday.c
544 sys_SOURCES := $(sys_time_SOURCES)
545
546 SRCDIR := src/libcrt/tchar
547 tchar_SOURCES := \
548   $(SRCDIR)/dirent.c \
549   $(SRCDIR)/wdirent.c
550
551 SRCDIR := src/libcrt/wchar
552 wchar_SOURCES := \
553   $(SRCDIR)/fwide.c \
554   $(SRCDIR)/mbrtowc.c \
555   $(SRCDIR)/mbsinit.c \
556   $(SRCDIR)/wcrtomb.c \
557   $(SRCDIR)/wcstof.c \
558   $(SRCDIR)/wcstold.c \
559   $(SRCDIR)/wctob.c \
560   $(SRCDIR)/wmemchr.c \
561   $(SRCDIR)/wmemcmp.c \
562   $(SRCDIR)/wmemcpy.c \
563   $(SRCDIR)/wmemmove.c \
564   $(SRCDIR)/wmemset.c
565
566 SRCDIR := src/libcrt/wctype
567 wctype_SOURCES := \
568   $(SRCDIR)/wctrans.c \
569   $(SRCDIR)/wctype.c
570
571 libmingwex_a_SOURCES := \
572   $(complex_SOURCES) \
573   $(ctype_SOURCES) \
574   $(fenv_SOURCES) \
575   $(gdtoa_SOURCES) \
576   $(inttypes_SOURCES) \
577   $(math_SOURCES) \
578   $(misc_SOURCES) \
579   $(posix_SOURCES) \
580   $(search_SOURCES) \
581   $(stdio_SOURCES) \
582   $(stdlib_SOURCES) \
583   $(sys_SOURCES) \
584   $(tchar_SOURCES) \
585   $(wchar_SOURCES) \
586   $(wctype_SOURCES)
587 libmingwex_a_OBJECTS := $(libmingwex_a_SOURCES:.c=.o)
588 libmingwex_a_OBJECTS := $(libmingwex_a_OBJECTS:.S=.o)
589
590 SRCDIR := misc/src/libdinput
591 libdinput_a_SOURCES := \
592   $(SRCDIR)/dinput_joy.c \
593   $(SRCDIR)/dinput_joy2.c \
594   $(SRCDIR)/dinput_kbd.c \
595   $(SRCDIR)/dinput_mouse.c \
596   $(SRCDIR)/dinput_mouse2.c
597 libdinput_a_OBJECTS := $(libdinput_a_SOURCES:.c=.o)
598
599 SRCDIR := misc/src/libdxerr8
600 libdxerr8_a_SOURCES := $(SRCDIR)/dxerr.c $(SRCDIR)/dxerr8.c $(SRCDIR)/dxerr8w.c
601 libdxerr8_a_OBJECTS := $(libdxerr8_a_SOURCES:.c=.o)
602
603 SRCDIR := misc/src/libdxerr9
604 libdxerr9_a_SOURCES := $(SRCDIR)/dxerr.c $(SRCDIR)/dxerr9.c $(SRCDIR)/dxerr9w.c
605 libdxerr9_a_OBJECTS := $(libdxerr9_a_SOURCES:.c=.o)
606
607 ALL_SOURCES := \
608   $(libmingw32_a_SOURCES) \
609   $(libmingwthrd_a_SOURCES) \
610   $(libgmon_a_SOURCES) \
611   $(libmingwex_a_SOURCES) \
612   $(mingwm10_dll_SOURCES) \
613   $(libdinput_a_SOURCES) \
614   $(libdxerr8_a_SOURCES) \
615   $(libdxerr9_a_SOURCES)
616
617 all: $(msvcrt_DEF) $(moldname_DEF) $(lib_LIBRARIES) $(bin_LIBRARIES) $(lib_OBJECTS)
618
619 $(msvcrt_DEF): lib/lib32/msvcrt.def.in
620         N=`echo $@ | sed -e 's|\([a-z]*\)\([0-9]*\).*|\1|'`; \
621         test "$$N" == "msvcr" && N="msvcrt"; \
622         V=`echo $@ | sed -e 's|\([a-z]*\)\([0-9]*\).*|\2|'`; \
623         test -z "$$V" && V=60; \
624         test "$$V" != "100" && V="0$${V}"; \
625         V="0x$${V}0"; \
626         $(CC) -DRUNTIME=$(basename $(notdir $@)) \
627                 -D__FILENAME__=$@ \
628                 -D__$(basename $(notdir $@))__=1 \
629                 -C -E -P -xc-header \
630                 $? > $@
631
632
633 $(moldname_DEF): lib/lib32/moldname.def.in
634         N=`echo $@ | sed -e 's|\([a-z]*\)\([0-9]*\).*|\1|'`; \
635         test "$$N" == "msvcr" && N="msvcrt"; \
636         V=`echo $@ | sed -e 's|\([a-z]*\)\([0-9]*\).*|\2|'`; \
637         test -z "$$V" && V=60; \
638         F="$@"; \
639         test "$$V" != "100" && V="0$${V}"; \
640         V="0x$${V}0"; \
641         $(CC) -DRUNTIME=$(basename $(notdir $@)) \
642                 -D__FILENAME__=$$F \
643                 -D__$(basename $(notdir $@))__=1 \
644                 -C -E -P -xc-header \
645                 $? > $@
646
647 SRCDIR := lib/lib32
648 $(notdir $(winapi_lib_LIBRARIES)): $(addprefix lib/lib32/,$(winapi_DEF))
649         @echo Making library $@ from $(subst lib,,$(@:.a=.def)).
650         $(DLLTOOL) $(DLLTOOL_FLAGS) $(subst lib,,$(@:.a=.dll)) --def $(addprefix $(top_srcdir)/lib/lib32/,$(subst lib,,$(@:.a=.def))) --output-lib $@
651         $(RANLIB) $@
652
653 $(notdir $(winapi_mri_LIBRARIES)): $(addprefix lib/lib32/,$(winapi_MRI))
654         @echo Making library $@ from $<.
655         $(AR) -M < $<
656         $(RANLIB) $@
657
658 SRCDIR := lib/lib32/ddk
659 $(notdir $(winapi_lib_DDK_LIBRARIES)): $(addprefix lib/lib32/ddk/,$(winapi_DDK_DEF))
660         @echo Making library $@ from $(subst lib,,$(@:.a=.def)).
661         $(DLLTOOL) $(DLLTOOL_FLAGS) $(subst lib,,$(@:.a=.dll)) --def $(addprefix $(top_srcdir)/lib/lib32/ddk/,$(subst lib,,$(@:.a=.def))) --output-lib $@
662         $(RANLIB) $@
663
664 SRCDIR := lib/lib32/directx
665 $(notdir $(winapi_lib_DIRECTX_LIBRARIES)): $(addprefix lib/lib32/directx/,$(winapi_DIRECTX_DEF))
666         @echo Making library $@ from $(subst lib,,$(@:.a=.def)).
667         $(DLLTOOL) $(DLLTOOL_FLAGS) $(subst lib,,$(@:.a=.dll)) --def $(addprefix $(top_srcdir)/lib/lib32/directx/,$(subst lib,,$(@:.a=.def))) --output-lib $@
668         $(RANLIB) $@
669
670 libmoldname%.a: moldname%.def
671         @echo Making library $@ from $?.
672         N=`echo $@ | sed -e 's|lib\([a-z]*\)\([0-9]*\).*|\1|'`; \
673         V=`echo $@ | sed -e 's|lib\([a-z]*\)\([0-9]*\).*|\2|'`; \
674         DLLNAME="$${N}$${V}.dll"; \
675         $(DLLTOOL) $(DLLTOOL_FLAGS) $${DLLNAME} -U --def $< --output-lib $@
676         $(RANLIB) $@
677
678 lib%.a: %.def
679         @echo Making library $@ from $?.
680         N=`echo $@ | sed -e 's|lib\([a-z]*\)\([0-9]*\).*|\1|'`; \
681         V=`echo $@ | sed -e 's|lib\([a-z]*\)\([0-9]*\).*|\2|'`; \
682         DLLNAME="$${N}$${V}.dll"; \
683         $(DLLTOOL) $(DLLTOOL_FLAGS) $${DLLNAME} --def $< --output-lib $@
684         $(RANLIB) $@
685
686 lib%.a: %.o
687         @echo Making library $@ from $?.
688         $(AR) rc $@ $*.o
689         $(RANLIB) $@
690
691 %.o : %.c
692         $(MKDIR_P) $(@D)
693         $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
694
695 SRCDIR := src/libcrt/crt
696 $(SRCDIR)/crt2.o $(SRCDIR)/dllcrt2.o:
697         $(MKDIR_P) $(@D)
698         $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
699
700 $(SRCDIR)/crt1.o: $(SRCDIR)/crt1.c
701 $(SRCDIR)/dllcrt1.o: $(SRCDIR)/dllcrt1.c
702 $(SRCDIR)/crt2.o: $(SRCDIR)/crt1.c
703 $(SRCDIR)/dllcrt2.o: $(SRCDIR)/dllcrt1.c
704
705 SRCDIR := src/libscrnsave
706 $(libscrnsave_a_OBJECTS): $(libscrnsave_a_SOURCES)
707         $(MKDIR_P) $(@D)
708         $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(scrnsave_o_CFLAGS) -o $@ $<
709
710 $(libscrnsavw_a_OBJECTS): $(libscrnsavw_a_SOURCES)
711         $(MKDIR_P) $(@D)
712         $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(scrnsavw_o_CFLAGS) -o $@ $<
713
714 SRCDIR := misc/gpl/profile
715 $(SRCDIR)/gcrt2.o:
716         mkdir -p $(@D)
717         $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
718
719 $(SRCDIR)/gcrt1.o $(SRCDIR)/gcrt2.o: $(SRCDIR)/gcrt0.c
720
721 libmingw32.a: $(libmingw32_a_OBJECTS)
722         $(AR) rc $@ $(libmingw32_a_OBJECTS)
723         $(RANLIB) $@
724
725 libmingwex.a: $(libmingwex_a_OBJECTS) $(winapi_lib_LIBRARIES)
726         $(AR) rc $@ $(libmingwex_a_OBJECTS)
727         $(RANLIB) $@
728
729 libmingwthrd.a: $(libmingwthrd_a_OBJECTS)
730         $(AR) rc $@ $(libmingwthrd_a_OBJECTS)
731         $(RANLIB) $@
732
733 libmingwthrd_old.a: $(libmingwthrd_a_OBJECTS) mingwm10.dll mingwthrd.def
734         $(DLLTOOL) $(DLLTOOL_FLAGS) mingwm10.dll \
735           --def mingwthrd.def --output-lib $@
736         $(AR) rc $@ $(libmingwthrd_a_OBJECTS)
737         $(RANLIB) $@
738
739 libgmon.a: $(libgmon_a_OBJECTS)
740         $(AR) rc $@ $(libgmon_a_OBJECTS)
741         $(RANLIB) $@
742
743 libuuid.a: $(libuuid_a_OBJECTS)
744         $(AR) rc $@ $(libuuid_a_OBJECTS)
745         $(RANLIB) $@
746
747 libscrnsave.a: $(libscrnsave_a_OBJECTS)
748         $(AR) rc $@ $(libscrnsave_a_OBJECTS)
749         $(RANLIB) $@
750
751 libscrnsavw.a: $(libscrnsavw_a_OBJECTS)
752         $(AR) rc $@ $(libscrnsavw_a_OBJECTS)
753         $(RANLIB) $@
754
755 liblargeint.a: $(liblargeint_a_OBJECTS)
756         $(AR) rc $@ $(liblargeint_a_OBJECTS)
757         $(RANLIB) $@
758
759 libdinput.a libdinput8.a: $(libdinput_a_OBJECTS)
760         $(DLLTOOL) $(DLLTOOL_FLAGS) $(subst lib,,$(@:.a=.dll)) --def $(addprefix $(top_srcdir)/lib/lib32/directx/,$(subst lib,,$(@:.a=.def))) --output-lib $@
761         $(AR) rc $@ $(libdinput_a_OBJECTS)
762         $(RANLIB) $@
763
764 $(libdinput_a_OBJECTS) \
765 $(libdmoguids_a_OBJECTS) \
766 $(libdxguid_a_OBJECTS) \
767 $(libstrmiids_a_OBJECTS): \
768   $(libdinput_a_SOURCES) \
769   $(libdmoguids_a_SOURCES) \
770   $(libdxguid_a_SOURCES) \
771   $(libstrmiids_a_SOURCES)
772         $(MKDIR_P) $(@D)
773         $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
774
775 libdxerr8.a: $(libdxerr8_a_OBJECTS)
776         $(AR) rc $@ $(libdxerr8_a_OBJECTS)
777         $(RANLIB) $@
778
779 libdxerr9.a: $(libdxerr9_a_OBJECTS)
780         $(AR) rc $@ $(libdxerr9_a_OBJECTS)
781         $(RANLIB) $@
782
783 libdmoguids.a: $(libdmoguids_a_OBJECTS)
784         $(AR) rc $@ $(libdmoguids_a_OBJECTS)
785         $(RANLIB) $@
786
787 libdxguid.a: $(libdxguid_a_OBJECTS)
788         $(AR) rc $@ $(libdxguid_a_OBJECTS)
789         $(RANLIB) $@
790
791 libstrmiids.a: $(libstrmiids_a_OBJECTS)
792         $(AR) rc $@ $(libstrmiids_a_OBJECTS)
793         $(RANLIB) $@
794
795 _libm_dummy.c:
796         @echo "static int __mingw_libm_dummy;" > _libm_dummy.c
797
798 libm.a: _libm_dummy.o
799         $(AR) rc $@ _libm_dummy.o
800         $(RANLIB) $@
801
802 mingwthrd.def: $(mingwm10_dll_OBJECTS)
803         $(DLLTOOL) --as $(AS) --output-def mingwthrd.def $(mingwm10_dll_OBJECTS)
804
805 mingwm10.dll: $(mingwm10_dll_OBJECTS) mingwthrd.def libmingwex.a
806         $(CC) $(mingwm10_dll_FLAGS) $(mingwm10_dll_OBJECTS) mingwthrd.def \
807           -o mingwm10.dll -L .
808
809 clean:
810         rm -f *.def *.s *.o *.dll *.a _libm_dummy.c stamp*
811         rm -rf .deps/ src/ misc/
812         cd tests && $(MAKE) $@
813
814 distclean: clean
815         rm -f config.log config.status config.cache config.h
816         rm -f core a.out *~ Makefile
817         rm -rf dist/
818         cd tests && $(MAKE) $@
819
820 need-DESTDIR-compatibility := prefix bindir includedir libdir mandir
821
822 $(need-DESTDIR-compatibility):
823         @test -z "$(DESTDIR)" || case "$($@)" in ?:*) \
824           $(MAKE) --no-print-directory REJECT="$@" \
825             fail-DESTDIR-compatibility ;; \
826         esac
827
828 fail-DESTDIR-compatibility:
829         $(error DESTDIR is not supported when $(REJECT) contains a Windows \
830         path '$($(REJECT))'; \
831         try 'make install $(REJECT)=$(shell echo '$($(REJECT))' | \
832         sed s,:,:$(DESTDIR),) ...' instead)
833
834 check:
835         cd tests && $(MAKE) $@
836
837 install-dirs: $(need-DESTDIR-compatibility)
838         $(mkinstalldirs) $(DESTDIR)$(bindir)
839         $(mkinstalldirs) $(DESTDIR)$(libdir)
840         $(mkinstalldirs) $(DESTDIR)$(docdir)
841         $(mkinstalldirs) $(DESTDIR)$(docdir)/historical
842         $(mkinstalldirs) $(DESTDIR)$(docdir)/historical/mingw
843         $(mkinstalldirs) $(DESTDIR)$(docdir)/historical/mingw/man
844         $(mkinstalldirs) $(DESTDIR)$(docdir)/historical/w32api
845         $(mkinstalldirs) $(DESTDIR)$(includedir)
846         for I in `find $(top_srcdir)/include/* -type d`; do \
847           J=`basename $$I`; \
848           $(mkinstalldirs) $(DESTDIR)$(includedir)/$$J ; \
849         done
850
851 install-libs: all
852         for LIB in $(lib_LIBRARIES); do \
853           $(INSTALL) $(INSTALL_FLAGS) $$LIB $(DESTDIR)$(libdir)/$$LIB ; \
854         done
855
856 install-objs: all
857         for OBJ in $(lib_OBJECTS); do \
858           $(INSTALL) $(INSTALL_FLAGS) $$OBJ $(DESTDIR)$(libdir) ; \
859         done
860
861 install-docs:
862         for DOC in $(doc_DOCUMENTS); do \
863           $(INSTALL) $(INSTALL_FLAGS) $(top_srcdir)/$$DOC $(DESTDIR)$(docdir)/$$DOC ; \
864         done
865         cp -af $(top_srcdir)/doc/historical $(DESTDIR)$(docdir) ;
866
867 install-includes:
868         for INC in $(top_srcdir)/include/*.h; do \
869           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir) ; \
870         done
871         for I in `find $(top_srcdir)/include/* -type d`; do \
872           J=`basename $$I`; \
873           for INC in $$I/*.h; do \
874             $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/$$J ; \
875           done \
876         done
877
878 install-bins: all
879         for BIN in $(bin_LIBRARIES); do \
880           $(INSTALL) $(INSTALL_FLAGS) $$BIN $(DESTDIR)$(bindir)/$$BIN ; \
881         done
882
883 install: all \
884   install-dirs \
885   install-libs \
886   install-objs \
887   install-docs \
888   install-includes \
889   install-bins
890
891 install-mingwrt-dirs: $(need-DESTDIR-compatibility)
892         $(mkinstalldirs) $(DESTDIR)$(bindir)
893         $(mkinstalldirs) $(DESTDIR)$(libdir)
894         $(mkinstalldirs) $(DESTDIR)$(prefix)/share/doc/mingwrt
895         $(mkinstalldirs) $(DESTDIR)$(includedir)
896         $(mkinstalldirs) $(DESTDIR)$(includedir)/sys
897
898 mingwrt_bin_LIBRARIES := mingwm10.dll
899 mingwrt_lib_LIBRARIES := $(wildcard libmsvcr*.a)
900 mingwrt_lib_LIBRARIES += $(wildcard libmoldname*.a)
901 mingwrt_lib_INCLUDES := \
902   _mingw.h   dirent.h  getopt.h    math.h      setjmp.h  strings.h  varargs.h \
903   assert.h   dos.h     inttypes.h  mbctype.h   share.h   wchar.h \
904   complex.h  errno.h   io.h        mbstring.h  signal.h  tchar.h    wctype.h \
905   conio.h    excpt.h   libgen.h    mem.h       stdint.h  time.h \
906   ctype.h    fcntl.h   limits.h    memory.h    stdio.h   unistd.h \
907   dir.h      fenv.h    locale.h    process.h   stdlib.h  utime.h \
908   direct.h   float.h   malloc.h    search.h    string.h  values.h
909
910 mingwrt_lib_SYS_INCLUDES := \
911   fcntl.h  locking.h  stat.h  timeb.h  unistd.h \
912   file.h   param.h    time.h  types.h  utime.h
913
914
915 install-mingwrt: install-mingwrt-dirs
916         for BIN in $(mingwrt_bin_LIBRARIES); do \
917           $(INSTALL) $(INSTALL_FLAGS) $$BIN $(DESTDIR)$(bindir)/ ; \
918         done
919         for INC in $(addprefix $(top_srcdir)/include/,$(mingwrt_lib_INCLUDES)); do \
920           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/ ; \
921         done
922         for INC in $(addprefix $(top_srcdir)/include/sys/,$(mingwrt_lib_SYS_INCLUDES)); do \
923           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/sys/ ; \
924         done
925         for LIB in $(mingwrt_lib_LIBRARIES); do \
926           $(INSTALL) $(INSTALL_FLAGS) $$LIB $(DESTDIR)$(libdir)/ ; \
927         done
928         for OBJ in $(mingwrt_lib_OBJECTS); do \
929           $(INSTALL) $(INSTALL_FLAGS) $$OBJ $(DESTDIR)$(libdir)/ ; \
930         done
931         cp -af $(top_srcdir)/doc/historical/mingw/* $(DESTDIR)$(prefix)/share/doc/mingwrt ;
932         rm -f $(DESTDIR)$(prefix)/share/doc/mingwrt/ChangeLog
933         rm -rf $(DESTDIR)$(prefix)/share/doc/mingwrt/man
934
935 dist: all dist-mingwrt dist-w32api dist-wsl
936
937 dist-mingwrt:
938         $(MAKE) prefix=./dist/mingwrt/installed _dist-mingwrt-all_
939
940 _dist-mingwrt-all_: all dist-mingwrt-dll dist-mingwrt-dev dist-mingwrt-lic dist-mingwrt-doc dist-mingwrt-src
941
942 dist-mingwrt-mkdir:
943         $(MKDIR_P) ./dist/mingwrt/packages
944
945 dist-mingwrt-install: all
946         $(MAKE) prefix=./dist/mingwrt/installed install-mingwrt
947
948 dist-mingwrt-dll: dist-mingwrt-mkdir dist-mingwrt-install
949         cd ./dist/mingwrt/installed ; \
950         tar acf ../packages/mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-dll.tar.lzma bin/*.dll
951
952 dist-mingwrt-dev: dist-mingwrt-mkdir dist-mingwrt-install
953         cd ./dist/mingwrt/installed ; \
954         tar acf ../packages/mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-dev.tar.lzma include/ lib/
955
956 $(DESTDIR)$(prefix)/share/doc/mingwrt/DISCLAIMER: dist-mingwrt-mkdir dist-mingwrt-install
957         cp $(top_srcdir)/doc/historical/mingw/DISCLAIMER $(DESTDIR)$(prefix)/share/doc/mingwrt/
958
959 dist-mingwrt-lic: $(DESTDIR)$(prefix)/share/doc/mingwrt/DISCLAIMER
960         cd ./dist/mingwrt/installed ; \
961         tar acf ../packages/mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-lic.tar.lzma share/doc/mingwrt/DISCLAIMER
962
963 dist-mingwrt-doc: dist-mingwrt-install
964         cd ./dist/mingwrt/installed ; \
965         rm -f share/doc/mingwrt/DISCLAIMER ; \
966         tar acf ../packages/mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-doc.tar.lzma share/doc/mingwrt
967
968 dist-mingwrt-src:
969         cp -af $(top_srcdir) $(DESTDIR)$(prefix)
970         cd $(DESTDIR)$(prefix)/mingw.org-wsl ; \
971         rm -rf .git autom4te.cache ; \
972         rm -f config.log config.status config.cache config.h ; \
973         rm -f .gitignore core a.out Makefile ; \
974         find . -type f -name \*~ -delete ; \
975         find . -type f -name \*.log -delete ; \
976         find . -type f -name \*.bak -delete ; \
977         find . -type f -name .\*.swp -delete ; \
978         cd .. ; \
979         rm -rf mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
980         mv mingw.org-wsl mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
981         tar acf ../packages/mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src.tar.lzma mingwrt-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src
982
983 install-w32api-dirs: $(need-DESTDIR-compatibility)
984         $(mkinstalldirs) $(DESTDIR)$(bindir)
985         $(mkinstalldirs) $(DESTDIR)$(libdir)
986         $(mkinstalldirs) $(DESTDIR)$(prefix)/share/doc/w32api
987         $(mkinstalldirs) $(DESTDIR)$(includedir)
988         $(mkinstalldirs) $(DESTDIR)$(includedir)/ddk
989         $(mkinstalldirs) $(DESTDIR)$(includedir)/gdiplus
990         $(mkinstalldirs) $(DESTDIR)$(includedir)/GL
991
992 w32api_lib_INCLUDES := \
993   accctrl.h aclapi.h aclui.h adsprop.h afxres.h audevcod.h aviriff.h \
994   aygshell.h basetsd.h basetyps.h bdatypes.h cderr.h cguid.h cmnquery.h \
995   comcat.h commctrl.h commdlg.h control.h cpl.h cplext.h custcntl.h \
996   dbt.h dde.h ddeml.h devguid.h dhcpcsdk.h dlgs.h \
997   docobj.h dsadmin.h dsclient.h dsgetdc.h dshow.h dsquery.h dsrole.h \
998   dvdevcod.h dvdmedia.h edevdefs.h errorrep.h errors.h \
999   evcode.h exdisp.h exdispid.h fltdefs.h gdiplus.h httpext.h icm.h idispids.h \
1000   il21dec.h imagehlp.h imm.h initguid.h intshcut.h ipexport.h iphlpapi.h \
1001   ipifcons.h ipinfoid.h iprtrmib.h iptypes.h ipxconst.h ipxrtdef.h ipxtfflt.h \
1002   isguids.h ks.h ksmedia.h largeint.h lm.h lmaccess.h lmalert.h lmapibuf.h \
1003   lmat.h lmaudit.h lmbrowsr.h lmchdev.h lmconfig.h lmcons.h lmerr.h lmerrlog.h \
1004   lmmsg.h lmremutl.h lmrepl.h lmserver.h lmshare.h lmsname.h lmstats.h lmsvc.h \
1005   lmuse.h lmuseflg.h lmwksta.h lzexpand.h mapi.h mciavi.h mcx.h mgm.h \
1006   mgmtapi.h mlang.h mmreg.h mmsystem.h mpegtype.h mprapi.h mq.h msacm.h \
1007   mshtml.h mswsock.h nb30.h nddeapi.h nspapi.h ntdef.h ntdll.h ntdsapi.h \
1008   ntdsbcli.h ntldap.h ntsecapi.h ntsecpkg.h oaidl.h objbase.h objfwd.h \
1009   objidl.h objsafe.h objsel.h ocidl.h odbcinst.h ole.h ole2.h ole2ver.h \
1010   oleacc.h oleauto.h olectl.h olectlid.h oledlg.h oleidl.h pbt.h poppack.h \
1011   powrprof.h prsht.h psapi.h pshpack1.h pshpack2.h pshpack4.h pshpack8.h \
1012   qedit.h rapi.h ras.h rasdlg.h raserror.h rassapi.h reason.h regstr.h \
1013   richedit.h richole.h routprot.h rpc.h rpcdce.h rpcdce2.h rpcdcep.h rpcndr.h \
1014   rpcnsi.h rpcnsip.h rpcnterr.h rpcproxy.h rtutils.h schannel.h schnlsp.h \
1015   scrnsave.h sddl.h sdkddkver.h secext.h security.h servprov.h setupapi.h \
1016   shellapi.h shldisp.h shlguid.h shlobj.h shlwapi.h shobjidl.h snmp.h \
1017   specstrings.h sql.h sqlext.h sqltypes.h sqlucode.h sspi.h stm.h strmif.h \
1018   subauth.h svcguid.h tlhelp32.h tmschema.h unknwn.h userenv.h usp10.h \
1019   uxtheme.h vfw.h vidcap.h vmr9.h vptype.h w32api.h winable.h winbase.h \
1020   winber.h wincon.h wincrypt.h windef.h windns.h windows.h windowsx.h \
1021   winerror.h wingdi.h wininet.h winioctl.h winldap.h winnetwk.h winnls.h \
1022   winnt.h winperf.h winreg.h winresrc.h winsnmp.h winsock.h winsock2.h \
1023   winspool.h winsvc.h winuser.h winver.h ws2spi.h ws2tcpip.h wsahelp.h wsipx.h \
1024   wsnetbs.h wtsapi32.h wtypes.h xprtdefs.h zmouse.h
1025
1026 w32api_lib_DDK_INCLUDES := \
1027   atm.h batclass.h cfg.h cfgmgr32.h d4drvif.h d4iface.h ddkmapi.h hidclass.h \
1028   hidpi.h hidsdi.h hidusage.h kbdmou.h mcd.h miniport.h minitape.h mountdev.h \
1029   mountmgr.h ndis.h ndisguid.h ndistapi.h ndiswan.h netevent.h netpnp.h \
1030   newdev.h ntapi.h ntdd8042.h ntddbeep.h ntddcdrm.h ntddcdvd.h ntddchgr.h \
1031   ntdddisk.h ntddk.h ntddkbd.h ntddmou.h ntddndis.h ntddpar.h ntddpcm.h \
1032   ntddscsi.h ntddser.h ntddstor.h ntddtape.h ntddtdi.h ntddvdeo.h ntddvol.h \
1033   ntifs.h ntpoapi.h ntstatus.h parallel.h pfhook.h poclass.h scsi.h scsiscan.h \
1034   scsiwmi.h smbus.h srb.h storport.h tdi.h tdiinfo.h tdikrnl.h tdistat.h \
1035   tvout.h upssvc.h usb.h usb100.h usbcamdi.h usbdi.h usbioctl.h usbiodef.h \
1036   usbscan.h usbuser.h video.h videoagp.h win2k.h winddi.h winddk.h winnt4.h \
1037   winxp.h ws2san.h xfilter.h
1038
1039 w32api_lib_GDIPLUS_INCLUDES := \
1040   gdiplus.h gdiplusbase.h gdiplusbrush.h gdipluscolor.h gdipluscolormatrix.h \
1041   gdipluseffects.h gdiplusenums.h gdiplusflat.h gdiplusgpstubs.h \
1042   gdiplusgraphics.h gdiplusheaders.h gdiplusimageattributes.h \
1043   gdiplusimagecodec.h gdiplusimaging.h gdiplusimpl.h gdiplusinit.h \
1044   gdipluslinecaps.h gdiplusmatrix.h gdiplusmem.h gdiplusmetafile.h \
1045   gdiplusmetaheader.h gdipluspath.h gdipluspen.h gdipluspixelformats.h \
1046   gdiplusstringformat.h gdiplustypes.h
1047
1048 w32api_lib_GL_INCLUDES := gl.h glext.h glu.h
1049
1050 w32api_lib_DIRECTX_INCLUDES := d3d9.h d3d9caps.h d3d9types.h dxerr8.h dxerr9.h
1051
1052 w32api_lib_LIBRARIES := \
1053   libaclui.a libadvapi32.a libapcups.a libavicap32.a libavifil32.a \
1054   libbthprops.a libcap.a libcfgmgr32.a libcomctl32.a libcomdlg32.a \
1055   libcrypt32.a libctl3d32.a libd3d8.a libd3d9.a libd3dim.a libd3drm.a \
1056   libd3dx8d.a libd3dx9d.a libd3dxof.a libddraw.a libdhcpcsvc.a libdinput.a \
1057   libdinput8.a libdlcapi.a libdmoguids.a libdnsapi.a libdplayx.a libdpnaddr.a \
1058   libdpnet.a libdpnlobby.a libdpvoice.a libdsetup.a libdsound.a libdxapi.a \
1059   libdxerr8.a libdxerr9.a libdxguid.a libfaultrep.a libgdi32.a libgdiplus.a \
1060   libglaux.a libglu32.a libhal.a libhid.a libhidparse.a libicmui.a \
1061   libigmpagnt.a libimagehlp.a libimm32.a libiphlpapi.a libkernel32.a \
1062   libksproxy.a libksuser.a liblargeint.a liblz32.a libmapi32.a libmcd.a \
1063   libmfcuia32.a libmgmtapi.a libmpr.a libmprapi.a libmqrt.a libmsacm32.a \
1064   libmscms.a libmsdmo.a libmsimg32.a libmsvcp60.a libmsvfw32.a libmswsock.a \
1065   libnddeapi.a libndis.a libnetapi32.a libnewdev.a libntdll.a libntoskrnl.a \
1066   libodbc32.a libodbccp32.a libole32.a liboleacc.a liboleaut32.a libolecli32.a \
1067   liboledlg.a libolepro32.a libolesvr32.a libopengl32.a libpenwin32.a \
1068   libpkpd32.a libpowrprof.a libpsapi.a libquartz.a librapi.a librasapi32.a \
1069   librasdlg.a librpcdce4.a librpcns4.a librpcrt4.a librtm.a librtutils.a \
1070   libscrnsave.a libscrnsavw.a libscsiport.a libsecur32.a libsetupapi.a \
1071   libshell32.a libshfolder.a libshlwapi.a libsnmpapi.a libstrmiids.a \
1072   libsvrapi.a libtapi32.a libtdi.a libthunk32.a liburl.a libusbcamd.a \
1073   libusbcamd2.a libuser32.a libuserenv.a libusp10.a libuuid.a libuxtheme.a \
1074   libvdmdbg.a libversion.a libvfw32.a libvideoprt.a libwin32k.a libwin32spl.a \
1075   libwininet.a libwinmm.a libwinspool.a libwinstrm.a libwldap32.a libwow32.a \
1076   libws2_32.a libwsnmp32.a libwsock32.a libwst.a libwtsapi32.a
1077
1078 install-w32api: install-w32api-dirs
1079         for INC in $(addprefix $(top_srcdir)/include/,$(w32api_lib_INCLUDES)); do \
1080           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/ ; \
1081         done
1082         for INC in $(addprefix $(top_srcdir)/include/ddk/,$(w32api_lib_DDK_INCLUDES)); do \
1083           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/ddk/ ; \
1084         done
1085         for INC in $(addprefix $(top_srcdir)/include/gdiplus/,$(w32api_lib_GDIPLUS_INCLUDES)); do \
1086           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/gdiplus/ ; \
1087         done
1088         for INC in $(addprefix $(top_srcdir)/misc/include/GL/,$(w32api_lib_GL_INCLUDES)); do \
1089           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/GL/ ; \
1090         done
1091         for INC in $(addprefix $(top_srcdir)/include/directx/,$(w32api_lib_DIRECTX_INCLUDES)); do \
1092           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir) ; \
1093         done
1094         for LIB in $(w32api_lib_LIBRARIES); do \
1095           $(INSTALL) $(INSTALL_FLAGS) $$LIB $(DESTDIR)$(libdir)/ ; \
1096         done
1097         cp -af $(top_srcdir)/doc/historical/w32api/* $(DESTDIR)$(prefix)/share/doc/w32api ;
1098         rm -f $(DESTDIR)$(prefix)/share/doc/w32api/ChangeLog
1099
1100 dist-w32api:
1101         $(MAKE) prefix=./dist/w32api/installed _dist-w32api-all_
1102
1103 _dist-w32api-all_: all dist-w32api-dev dist-w32api-lic dist-w32api-doc dist-w32api-src
1104
1105 dist-w32api-mkdir:
1106         $(MKDIR_P) ./dist/w32api/packages
1107
1108 dist-w32api-install: all dist-w32api-mkdir
1109         $(MAKE) prefix=./dist/w32api/installed install-w32api
1110
1111 dist-w32api-dev: dist-w32api-install
1112         cd ./dist/w32api/installed ; \
1113         tar acf ../packages/w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-dev.tar.lzma include/ lib/
1114
1115 dist-w32api-lic: dist-w32api-install
1116         cd ./dist/w32api/installed ; \
1117         tar acf ../packages/w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-lic.tar.lzma share/doc/w32api/README.w32api
1118
1119 dist-w32api-doc: dist-w32api-install
1120         cd ./dist/w32api/installed ; \
1121         tar acf ../packages/w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-doc.tar.lzma share/doc/w32api/CONTRIBUTIONS share/doc/w32api/TODO
1122
1123 dist-w32api-src:
1124         cp -af $(top_srcdir) $(DESTDIR)$(prefix)
1125         cd $(DESTDIR)$(prefix)/mingw.org-wsl ; \
1126         rm -rf .git autom4te.cache ; \
1127         rm -f config.log config.status config.cache config.h ; \
1128         rm -f .gitignore core a.out Makefile ; \
1129         find . -type f -name \*~ -delete ; \
1130         find . -type f -name \*.log -delete ; \
1131         find . -type f -name \*.bak -delete ; \
1132         find . -type f -name .\*.swp -delete ; \
1133         cd .. ; \
1134         rm -rf w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
1135         mv mingw.org-wsl w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
1136         tar acf ../packages/w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src.tar.lzma w32api-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src
1137
1138 install-wsl-dirs: $(need-DESTDIR-compatibility)
1139         $(mkinstalldirs) $(DESTDIR)$(bindir)
1140         $(mkinstalldirs) $(DESTDIR)$(libdir)
1141         $(mkinstalldirs) $(DESTDIR)$(docdir)
1142         $(mkinstalldirs) $(DESTDIR)$(includedir)
1143         $(mkinstalldirs) $(DESTDIR)$(includedir)/sys
1144         $(mkinstalldirs) $(DESTDIR)$(includedir)/ddk
1145         $(mkinstalldirs) $(DESTDIR)$(includedir)/gdiplus
1146         $(mkinstalldirs) $(DESTDIR)$(includedir)/GL
1147
1148 install-wsl: install-wsl-dirs
1149         for BIN in $(mingwrt_bin_LIBRARIES); do \
1150           $(INSTALL) $(INSTALL_FLAGS) $$BIN $(DESTDIR)$(bindir)/ ; \
1151         done
1152         for INC in $(addprefix $(top_srcdir)/include/,$(mingwrt_lib_INCLUDES)); do \
1153           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/ ; \
1154         done
1155         for INC in $(addprefix $(top_srcdir)/include/sys/,$(mingwrt_lib_SYS_INCLUDES)); do \
1156           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/sys/ ; \
1157         done
1158         for INC in $(addprefix $(top_srcdir)/include/,$(w32api_lib_INCLUDES)); do \
1159           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/ ; \
1160         done
1161         for INC in $(addprefix $(top_srcdir)/include/ddk/,$(w32api_lib_DDK_INCLUDES)); do \
1162           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/ddk/ ; \
1163         done
1164         for INC in $(addprefix $(top_srcdir)/include/gdiplus/,$(w32api_lib_GDIPLUS_INCLUDES)); do \
1165           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/gdiplus/ ; \
1166         done
1167         for INC in $(addprefix $(top_srcdir)/misc/include/GL/,$(w32api_lib_GL_INCLUDES)); do \
1168           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir)/GL/ ; \
1169         done
1170         for INC in $(addprefix $(top_srcdir)/include/directx/,$(w32api_lib_DIRECTX_INCLUDES)); do \
1171           $(INSTALL) $(INSTALL_FLAGS) $$INC $(DESTDIR)$(includedir) ; \
1172         done
1173         for LIB in $(mingwrt_lib_LIBRARIES) $(w32api_lib_LIBRARIES); do \
1174           $(INSTALL) $(INSTALL_FLAGS) $$LIB $(DESTDIR)$(libdir)/ ; \
1175         done
1176         for OBJ in $(mingwrt_lib_OBJECTS); do \
1177           $(INSTALL) $(INSTALL_FLAGS) $$OBJ $(DESTDIR)$(libdir)/ ; \
1178         done
1179         cp -af $(top_srcdir)/LICENSE $(DESTDIR)$(docdir)
1180         cp -af $(top_srcdir)/README $(DESTDIR)$(docdir)
1181         cp -af $(top_srcdir)/doc/historical $(DESTDIR)$(docdir)
1182
1183 dist-wsl:
1184         $(MAKE) prefix=./dist/wsl/installed _dist-wsl-all_
1185
1186 _dist-wsl-all_: all dist-wsl-dll dist-wsl-dev dist-wsl-doc dist-wsl-lic dist-wsl-src
1187
1188 dist-wsl-mkdir:
1189         $(MKDIR_P) ./dist/wsl/packages
1190
1191 dist-wsl-install: all dist-wsl-mkdir
1192         $(MAKE) prefix=./dist/wsl/installed install-wsl
1193
1194 dist-wsl-dll: dist-wsl-install
1195         cd ./dist/wsl/installed ; \
1196         tar acf ../packages/mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-dll.tar.lzma bin/*.dll ;
1197
1198 dist-wsl-dev: dist-wsl-install
1199         cd ./dist/wsl/installed ; \
1200         tar acf ../packages/mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-dev.tar.lzma include/ lib/
1201
1202 dist-wsl-lic: dist-wsl-install
1203         cd ./dist/wsl/installed ; \
1204         tar acf ../packages/mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-lic.tar.lzma share/doc/mingw.org-wsl/LICENSE
1205
1206 dist-wsl-doc: dist-wsl-install
1207         cd ./dist/wsl/installed ; \
1208         tar acf ../packages/mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-doc.tar.lzma share/doc/mingw.org-wsl/README
1209
1210 dist-wsl-src: dist-wsl-install
1211         cp -af $(top_srcdir) $(DESTDIR)$(prefix)
1212         cd $(DESTDIR)$(prefix)/mingw.org-wsl ; \
1213         rm -rf .git autom4te.cache ; \
1214         rm -f config.log config.status config.cache config.h ; \
1215         rm -f .gitignore core a.out Makefile ; \
1216         find . -type f -name \*~ -delete ; \
1217         find . -type f -name \*.log -delete ; \
1218         find . -type f -name \*.bak -delete ; \
1219         find . -type f -name .\*.swp -delete ; \
1220         cd .. ; \
1221         rm -rf mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
1222         mv mingw.org-wsl mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src ; \
1223         tar acf ../packages/mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src.tar.lzma mingw.org-wsl-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)-mingw32-src