Synchronize with trunk r58457.
[reactos.git] / lib / sdk / crt / crt.cmake
1
2 list(APPEND CRT_SOURCE
3 conio/cgets.c
4 conio/cputs.c
5 conio/getch.c
6 conio/getche.c
7 conio/kbhit.c
8 conio/putch.c
9 conio/ungetch.c
10 direct/chdir.c
11 direct/chdrive.c
12 direct/getcwd.c
13 direct/getdcwd.c
14 direct/getdfree.c
15 direct/getdrive.c
16 direct/mkdir.c
17 direct/rmdir.c
18 direct/wchdir.c
19 direct/wgetcwd.c
20 direct/wgetdcwd.c
21 direct/wmkdir.c
22 direct/wrmdir.c
23 except/cpp.c
24 except/cppexcept.c
25 except/except.c
26 except/matherr.c
27 except/stack.c
28 except/xcptfil.c
29 float/chgsign.c
30 float/copysign.c
31 float/fpclass.c
32 float/fpecode.c
33 float/isnan.c
34 float/nafter.c
35 float/scalb.c
36 locale/locale.c
37 math/acos.c
38 math/adjust.c
39 math/asin.c
40 math/cabs.c
41 math/cosf.c
42 math/cosh.c
43 math/div.c
44 math/fdivbug.c
45 math/frexp.c
46 math/huge_val.c
47 math/hypot.c
48 math/ieee754/j0_y0.c
49 math/ieee754/j1_y1.c
50 math/ieee754/jn_yn.c
51 math/j0_y0.c
52 math/j1_y1.c
53 math/jn_yn.c
54 math/ldiv.c
55 math/logf.c
56 math/modf.c
57 math/powf.c
58 math/rand.c
59 math/sqrtf.c
60 math/s_modf.c
61 math/sinf.c
62 math/sinh.c
63 math/tanh.c
64 mbstring/_setmbcp.c
65 mbstring/hanzen.c
66 mbstring/ischira.c
67 mbstring/iskana.c
68 mbstring/iskmoji.c
69 mbstring/iskpun.c
70 mbstring/islead.c
71 mbstring/islwr.c
72 mbstring/ismbal.c
73 mbstring/ismbaln.c
74 mbstring/ismbc.c
75 mbstring/ismbgra.c
76 mbstring/ismbkaln.c
77 mbstring/ismblead.c
78 mbstring/ismbpri.c
79 mbstring/ismbpun.c
80 mbstring/ismbtrl.c
81 mbstring/isuppr.c
82 mbstring/jistojms.c
83 mbstring/jmstojis.c
84 mbstring/mbbtype.c
85 mbstring/mbccpy.c
86 mbstring/mbclen.c
87 mbstring/mbscat.c
88 mbstring/mbschr.c
89 mbstring/mbscmp.c
90 mbstring/mbscoll.c
91 mbstring/mbscpy.c
92 mbstring/mbscspn.c
93 mbstring/mbsdec.c
94 mbstring/mbsdup.c
95 mbstring/mbsicmp.c
96 mbstring/mbsicoll.c
97 mbstring/mbsinc.c
98 mbstring/mbslen.c
99 mbstring/mbslwr.c
100 mbstring/mbsncat.c
101 mbstring/mbsnccnt.c
102 mbstring/mbsncmp.c
103 mbstring/mbsncoll.c
104 mbstring/mbsncpy.c
105 mbstring/mbsnextc.c
106 mbstring/mbsnicmp.c
107 mbstring/mbsnicoll.c
108 mbstring/mbsninc.c
109 mbstring/mbsnset.c
110 mbstring/mbspbrk.c
111 mbstring/mbsrchr.c
112 mbstring/mbsrev.c
113 mbstring/mbsset.c
114 mbstring/mbsspn.c
115 mbstring/mbsspnp.c
116 mbstring/mbsstr.c
117 mbstring/mbstok.c
118 mbstring/mbstrlen.c
119 mbstring/mbsupr.c
120 mem/memcmp.c
121 mem/memccpy.c
122 mem/memicmp.c
123 misc/__crt_MessageBoxA.c
124 misc/amsg.c
125 misc/assert.c
126 misc/environ.c
127 misc/fltused.c
128 misc/getargs.c
129 misc/i10output.c
130 misc/initterm.c
131 misc/lock.c
132 misc/purecall.c
133 misc/stubs.c
134 misc/tls.c
135 printf/_cprintf.c
136 printf/_cwprintf.c
137 printf/_snprintf.c
138 printf/_snwprintf.c
139 printf/_vcprintf.c
140 printf/_vcwprintf.c
141 printf/_vscprintf.c
142 printf/_vscwprintf.c
143 printf/_vsnprintf.c
144 printf/_vsnwprintf.c
145 printf/_vsprintf_p.c
146 printf/fprintf.c
147 printf/fprintf_s.c
148 printf/fwprintf.c
149 printf/fwprintf_s.c
150 printf/printf.c
151 printf/printf_s.c
152 printf/sprintf.c
153 printf/streamout.c
154 printf/swprintf.c
155 printf/vfprintf.c
156 printf/vfprintf_s.c
157 printf/vfwprintf.c
158 printf/vfwprintf_s.c
159 printf/vprintf.c
160 printf/vprintf_s.c
161 printf/vsprintf.c
162 printf/vswprintf.c
163 printf/vwprintf.c
164 printf/vwprintf_s.c
165 printf/wprintf.c
166 printf/wprintf_s.c
167 printf/wstreamout.c
168 process/_cwait.c
169 process/_system.c
170 process/dll.c
171 process/process.c
172 process/procid.c
173 process/thread.c
174 process/threadid.c
175 process/threadx.c
176 process/wprocess.c
177 search/bsearch.c
178 search/lfind.c
179 search/lsearch.c
180 signal/signal.c
181 signal/xcptinfo.c
182 startup/crtexe.c
183 startup/wcrtexe.c
184 startup/crt_handler.c
185 startup/crtdll.c
186 startup/_newmode.c
187 startup/wildcard.c
188 startup/tlssup.c
189 startup/mingw_helpers.c
190 startup/natstart.c
191 startup/charmax.c
192 #startup/merr.c
193 #startup/atonexit.c
194 #startup/txtmode.c
195 startup/pesect.c
196 startup/tlsmcrt.c
197 startup/tlsthrd.c
198 startup/tlsmthread.c
199 startup/cinitexe.c
200 startup/gs_support.c
201 startup/dll_argv.c
202 startup/dllargv.c
203 startup/wdllargv.c
204 startup/crt0_c.c
205 startup/crt0_w.c
206 startup/dllentry.c
207 startup/reactos.c
208 stdio/_flsbuf.c
209 stdio/_flswbuf.c
210 stdio/access.c
211 stdio/file.c
212 stdio/find.c
213 stdio/find64.c
214 stdio/findi64.c
215 stdio/fmode.c
216 stdio/perror.c
217 stdio/popen.c
218 stdio/stat.c
219 stdio/stat64.c
220 stdio/waccess.c
221 stdio/wfind.c
222 stdio/wfind64.c
223 stdio/wfindi64.c
224 stdio/wpopen.c
225 stdio/wstat.c
226 stdio/wstat64.c
227 stdlib/_exit.c
228 stdlib/_set_abort_behavior.c
229 stdlib/abort.c
230 stdlib/atexit.c
231 stdlib/ecvt.c
232 stdlib/errno.c
233 stdlib/fcvt.c
234 stdlib/fcvtbuf.c
235 stdlib/fullpath.c
236 stdlib/gcvt.c
237 stdlib/getenv.c
238 stdlib/makepath.c
239 stdlib/makepath_s.c
240 stdlib/mbtowc.c
241 stdlib/mbstowcs.c
242 stdlib/obsol.c
243 stdlib/putenv.c
244 stdlib/qsort.c
245 stdlib/rot.c
246 stdlib/senv.c
247 stdlib/swab.c
248 stdlib/wfulpath.c
249 stdlib/wputenv.c
250 stdlib/wsenv.c
251 stdlib/wmakpath.c
252 stdlib/wmakpath_s.c
253 string/_mbsnlen.c
254 string/_mbstrnlen.c
255 string/atof.c
256 string/atoi.c
257 string/atoi64.c
258 string/atol.c
259 string/ctype.c
260 string/iswctype.c
261 string/is_wctype.c
262 string/itoa.c
263 string/itow.c
264 string/mbstowcs_s.c
265 string/scanf.c
266 string/splitp.c
267 string/strcoll.c
268 string/strcspn.c
269 string/strdup.c
270 string/strerror.c
271 string/stricmp.c
272 string/string.c
273 string/strlwr.c
274 string/strncoll.c
275 string/strnicmp.c
276 string/strpbrk.c
277 string/strrev.c
278 string/strset.c
279 string/strspn.c
280 string/strstr.c
281 string/strtod.c
282 string/strtoi64.c
283 string/strtok.c
284 string/strtol.c
285 string/strtoul.c
286 string/strtoull.c
287 string/strupr.c
288 string/strxfrm.c
289 string/wcs.c
290 string/wcstol.c
291 string/wcstombs_s.c
292 string/wcstoul.c
293 string/wctype.c
294 string/wsplitp.c
295 string/wtoi.c
296 string/wtoi64.c
297 string/wtol.c
298 sys_stat/systime.c
299 time/asctime.c
300 time/clock.c
301 time/ctime32.c
302 time/ctime64.c
303 time/ctime.c
304 time/difftime32.c
305 time/difftime64.c
306 time/difftime.c
307 time/ftime32.c
308 time/ftime64.c
309 time/ftime.c
310 time/futime32.c
311 time/futime64.c
312 time/futime.c
313 time/gmtime.c
314 time/localtime32.c
315 time/localtime64.c
316 time/localtime.c
317 time/mktime.c
318 time/strdate.c
319 time/strftime.c
320 time/strtime.c
321 time/time32.c
322 time/time64.c
323 time/time.c
324 time/timezone.c
325 time/utime32.c
326 time/utime64.c
327 time/utime.c
328 time/wasctime.c
329 time/wctime32.c
330 time/wctime64.c
331 time/wctime.c
332 time/wstrdate.c
333 time/wstrtime.c
334 time/wutime32.c
335 time/wutime64.c
336 time/wutime.c
337 wstring/wcscoll.c
338 wstring/wcscspn.c
339 wstring/wcsicmp.c
340 wstring/wcslwr.c
341 wstring/wcsnicmp.c
342 wstring/wcsspn.c
343 wstring/wcsstr.c
344 wstring/wcstok.c
345 wstring/wcsupr.c
346 wstring/wcsxfrm.c
347 wine/heap.c
348 wine/undname.c)
349
350 if(ARCH STREQUAL "i386")
351 list(APPEND CRT_ASM_SOURCE
352 except/i386/chkesp.s
353 except/i386/prolog.s
354 except/i386/seh.s
355 except/i386/seh_prolog.s
356 math/i386/alldiv_asm.s
357 math/i386/alldvrm_asm.s
358 math/i386/allmul_asm.s
359 math/i386/allrem_asm.s
360 math/i386/allshl_asm.s
361 math/i386/allshr_asm.s
362 math/i386/atan_asm.s
363 math/i386/aulldiv_asm.s
364 math/i386/aulldvrm_asm.s
365 math/i386/aullrem_asm.s
366 math/i386/aullshr_asm.s
367 math/i386/ceil_asm.s
368 math/i386/ceilf.S
369 math/i386/cos_asm.s
370 math/i386/fabs_asm.s
371 math/i386/floor_asm.s
372 math/i386/floorf.S
373 math/i386/ftol_asm.s
374 math/i386/ftol2_asm.s
375 math/i386/log_asm.s
376 math/i386/log10_asm.s
377 math/i386/pow_asm.s
378 math/i386/sin_asm.s
379 math/i386/sqrt_asm.s
380 math/i386/tan_asm.s
381 math/i386/atan2_asm.s
382 math/i386/exp_asm.s
383 math/i386/fmod_asm.s
384 math/i386/fmodf_asm.s
385 mem/i386/memchr_asm.s
386 mem/i386/memmove_asm.s
387 mem/i386/memset_asm.s
388 misc/i386/readcr4.S
389 setjmp/i386/setjmp.s
390 string/i386/strcat_asm.s
391 string/i386/strchr_asm.s
392 string/i386/strcmp_asm.s
393 string/i386/strcpy_asm.s
394 string/i386/strlen_asm.s
395 string/i386/strncat_asm.s
396 string/i386/strncmp_asm.s
397 string/i386/strncpy_asm.s
398 string/i386/strnlen_asm.s
399 string/i386/strrchr_asm.s
400 string/i386/wcscat_asm.s
401 string/i386/wcschr_asm.s
402 string/i386/wcscmp_asm.s
403 string/i386/wcscpy_asm.s
404 string/i386/wcslen_asm.s
405 string/i386/wcsncat_asm.s
406 string/i386/wcsncmp_asm.s
407 string/i386/wcsncpy_asm.s
408 string/i386/wcsnlen_asm.s
409 string/i386/wcsrchr_asm.s)
410
411 list(APPEND CRT_SOURCE
412 except/i386/unwind.c
413 float/i386/clearfp.c
414 float/i386/cntrlfp.c
415 float/i386/fpreset.c
416 float/i386/logb.c
417 float/i386/statfp.c
418 math/i386/ci.c
419 math/i386/cicos.c
420 math/i386/cilog.c
421 math/i386/cipow.c
422 math/i386/cisin.c
423 math/i386/cisqrt.c
424 math/i386/ldexp.c)
425 if(MSVC)
426 list(APPEND CRT_ASM_SOURCE
427 except/i386/cpp.s)
428 endif()
429 elseif(ARCH STREQUAL "amd64")
430 list(APPEND CRT_ASM_SOURCE
431 except/amd64/seh.s
432 float/amd64/clearfp.S
433 float/amd64/getsetfpcw.S
434 float/amd64/fpreset.S
435 float/amd64/logb.S
436 # math/amd64/acos.S
437 math/amd64/acosf.S
438 math/amd64/atan.S
439 math/amd64/atan2.S
440 math/amd64/ceil.S
441 math/amd64/ceilf.S
442 math/amd64/exp.S
443 math/amd64/fabs.S
444 math/amd64/floor.S
445 math/amd64/floorf.S
446 math/amd64/fmod.S
447 math/amd64/fmodf.S
448 math/amd64/ldexp.S
449 math/amd64/log.S
450 math/amd64/log10.S
451 math/amd64/pow.S
452 math/amd64/sqrt.S
453 math/amd64/sqrtf.S
454 math/amd64/tan.S
455 setjmp/amd64/setjmp.s)
456
457 list(APPEND CRT_SOURCE
458 except/amd64/ehandler.c
459 float/i386/cntrlfp.c
460 float/i386/statfp.c)
461 if(MSVC)
462 list(APPEND CRT_ASM_SOURCE
463 except/amd64/cpp.s)
464 endif()
465 endif()
466
467 if(NOT ARCH STREQUAL "i386")
468 list(APPEND CRT_SOURCE
469 math/cos.c
470 math/sin.c
471 math/stubs.c
472 mem/memchr.c
473 mem/memcpy.c
474 mem/memmove.c
475 mem/memset.c
476 string/strcat.c
477 string/strchr.c
478 string/strcmp.c
479 string/strcpy.c
480 string/strlen.c
481 string/strncat.c
482 string/strncmp.c
483 string/strncpy.c
484 string/strnlen.c
485 string/strrchr.c
486 string/wcscat.c
487 string/wcschr.c
488 string/wcscmp.c
489 string/wcscpy.c
490 string/wcslen.c
491 string/wcsncat.c
492 string/wcsncmp.c
493 string/wcsncpy.c
494 string/wcsnlen.c
495 string/wcsrchr.c)
496 endif()
497
498 set_source_files_properties(${CRT_ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "__MINGW_IMPORT=extern;USE_MSVCRT_PREFIX;_MSVCRT_LIB_;_MSVCRT_;_MT;CRTDLL")
499 add_asm_files(crt_asm ${CRT_ASM_SOURCE})
500
501 add_library(crt ${CRT_SOURCE} ${crt_asm})
502 target_link_libraries(crt chkstk)
503 add_target_compile_definitions(crt
504 __MINGW_IMPORT=extern
505 USE_MSVCRT_PREFIX
506 _MSVCRT_LIB_
507 _MSVCRT_
508 _MT
509 CRTDLL)
510 #add_pch(crt precomp.h)
511 add_dependencies(crt psdk asm)