Sync with trunk r63502.
[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/_snprintf_s.c
139 printf/_snwprintf.c
140 printf/_snwprintf_s.c
141 printf/_vcprintf.c
142 printf/_vcwprintf.c
143 printf/_vscprintf.c
144 printf/_vscwprintf.c
145 printf/_vsnprintf.c
146 printf/_vsnprintf_s.c
147 printf/_vsnwprintf.c
148 printf/_vsnwprintf_s.c
149 printf/_vsprintf_p.c
150 printf/fprintf.c
151 printf/fprintf_s.c
152 printf/fwprintf.c
153 printf/fwprintf_s.c
154 printf/printf.c
155 printf/printf_s.c
156 printf/sprintf.c
157 printf/sprintf_s.c
158 printf/streamout.c
159 printf/swprintf.c
160 printf/swprintf_s.c
161 printf/vfprintf.c
162 printf/vfprintf_s.c
163 printf/vfwprintf.c
164 printf/vfwprintf_s.c
165 printf/vprintf.c
166 printf/vprintf_s.c
167 printf/vsprintf.c
168 printf/vsprintf_s.c
169 printf/vswprintf.c
170 printf/vswprintf_s.c
171 printf/vwprintf.c
172 printf/vwprintf_s.c
173 printf/wprintf.c
174 printf/wprintf_s.c
175 printf/wstreamout.c
176 process/_cwait.c
177 process/_system.c
178 process/dll.c
179 process/process.c
180 process/procid.c
181 process/thread.c
182 process/threadid.c
183 process/threadx.c
184 process/wprocess.c
185 search/bsearch.c
186 search/lfind.c
187 search/lsearch.c
188 signal/signal.c
189 signal/xcptinfo.c
190 startup/crtexe.c
191 startup/wcrtexe.c
192 startup/crt_handler.c
193 startup/crtdll.c
194 startup/_newmode.c
195 startup/wildcard.c
196 startup/tlssup.c
197 startup/mingw_helpers.c
198 startup/natstart.c
199 startup/charmax.c
200 #startup/merr.c
201 #startup/atonexit.c
202 #startup/txtmode.c
203 startup/pesect.c
204 startup/tlsmcrt.c
205 startup/tlsthrd.c
206 startup/tlsmthread.c
207 startup/cinitexe.c
208 startup/gs_support.c
209 startup/dll_argv.c
210 startup/dllargv.c
211 startup/wdllargv.c
212 startup/crt0_c.c
213 startup/crt0_w.c
214 startup/dllentry.c
215 startup/reactos.c
216 stdio/_flsbuf.c
217 stdio/_flswbuf.c
218 stdio/access.c
219 stdio/file.c
220 stdio/find.c
221 stdio/find64.c
222 stdio/findi64.c
223 stdio/fmode.c
224 stdio/perror.c
225 stdio/popen.c
226 stdio/stat.c
227 stdio/stat64.c
228 stdio/waccess.c
229 stdio/wfind.c
230 stdio/wfind64.c
231 stdio/wfindi64.c
232 stdio/wpopen.c
233 stdio/wstat.c
234 stdio/wstat64.c
235 stdlib/_exit.c
236 stdlib/_set_abort_behavior.c
237 stdlib/abort.c
238 stdlib/atexit.c
239 stdlib/ecvt.c
240 stdlib/errno.c
241 stdlib/fcvt.c
242 stdlib/fcvtbuf.c
243 stdlib/fullpath.c
244 stdlib/gcvt.c
245 stdlib/getenv.c
246 stdlib/makepath.c
247 stdlib/makepath_s.c
248 stdlib/mbtowc.c
249 stdlib/mbstowcs.c
250 stdlib/obsol.c
251 stdlib/putenv.c
252 stdlib/qsort.c
253 stdlib/rot.c
254 stdlib/senv.c
255 stdlib/swab.c
256 stdlib/wfulpath.c
257 stdlib/wputenv.c
258 stdlib/wsenv.c
259 stdlib/wmakpath.c
260 stdlib/wmakpath_s.c
261 string/_mbsnlen.c
262 string/_mbstrnlen.c
263 string/_splitpath.c
264 string/_splitpath_s.c
265 string/_wcslwr_s.c
266 string/_wsplitpath.c
267 string/_wsplitpath_s.c
268 string/atof.c
269 string/atoi.c
270 string/atoi64.c
271 string/atol.c
272 string/ctype.c
273 string/iswctype.c
274 string/is_wctype.c
275 string/itoa.c
276 string/itow.c
277 string/mbstowcs_s.c
278 string/scanf.c
279 string/strcoll.c
280 string/strcspn.c
281 string/strdup.c
282 string/strerror.c
283 string/stricmp.c
284 string/string.c
285 string/strlwr.c
286 string/strncoll.c
287 string/strnicmp.c
288 string/strpbrk.c
289 string/strrev.c
290 string/strset.c
291 string/strspn.c
292 string/strstr.c
293 string/strtod.c
294 string/strtoi64.c
295 string/strtok.c
296 string/strtol.c
297 string/strtoul.c
298 string/strtoull.c
299 string/strupr.c
300 string/strxfrm.c
301 string/wcs.c
302 string/wcstol.c
303 string/wcstombs_s.c
304 string/wcstoul.c
305 string/wctype.c
306 string/wtoi.c
307 string/wtoi64.c
308 string/wtol.c
309 string/winesup.c
310 sys_stat/systime.c
311 time/asctime.c
312 time/clock.c
313 time/ctime32.c
314 time/ctime64.c
315 time/ctime.c
316 time/difftime32.c
317 time/difftime64.c
318 time/difftime.c
319 time/ftime32.c
320 time/ftime64.c
321 time/ftime.c
322 time/futime32.c
323 time/futime64.c
324 time/futime.c
325 time/gmtime.c
326 time/localtime32.c
327 time/localtime64.c
328 time/localtime.c
329 time/mktime.c
330 time/strdate.c
331 time/strftime.c
332 time/strtime.c
333 time/time32.c
334 time/time64.c
335 time/time.c
336 time/timezone.c
337 time/utime32.c
338 time/utime64.c
339 time/utime.c
340 time/wasctime.c
341 time/wctime32.c
342 time/wctime64.c
343 time/wctime.c
344 time/wstrdate.c
345 time/wstrtime.c
346 time/wutime32.c
347 time/wutime64.c
348 time/wutime.c
349 wstring/wcscoll.c
350 wstring/wcscspn.c
351 wstring/wcsicmp.c
352 wstring/wcslwr.c
353 wstring/wcsnicmp.c
354 wstring/wcsspn.c
355 wstring/wcsstr.c
356 wstring/wcstok.c
357 wstring/wcsupr.c
358 wstring/wcsxfrm.c
359 wine/heap.c
360 wine/undname.c)
361
362 if(ARCH STREQUAL "i386")
363 list(APPEND CRT_ASM_SOURCE
364 except/i386/chkesp.s
365 except/i386/prolog.s
366 except/i386/seh.s
367 except/i386/seh_prolog.s
368 math/i386/alldiv_asm.s
369 math/i386/alldvrm_asm.s
370 math/i386/allmul_asm.s
371 math/i386/allrem_asm.s
372 math/i386/allshl_asm.s
373 math/i386/allshr_asm.s
374 math/i386/atan_asm.s
375 math/i386/aulldiv_asm.s
376 math/i386/aulldvrm_asm.s
377 math/i386/aullrem_asm.s
378 math/i386/aullshr_asm.s
379 math/i386/ceil_asm.s
380 math/i386/ceilf.S
381 math/i386/cos_asm.s
382 math/i386/fabs_asm.s
383 math/i386/floor_asm.s
384 math/i386/floorf.S
385 math/i386/ftol_asm.s
386 math/i386/ftol2_asm.s
387 math/i386/log_asm.s
388 math/i386/log10_asm.s
389 math/i386/pow_asm.s
390 math/i386/sin_asm.s
391 math/i386/sqrt_asm.s
392 math/i386/tan_asm.s
393 math/i386/atan2_asm.s
394 math/i386/exp_asm.s
395 math/i386/fmod_asm.s
396 math/i386/fmodf_asm.s
397 mem/i386/memchr_asm.s
398 mem/i386/memmove_asm.s
399 mem/i386/memset_asm.s
400 misc/i386/readcr4.S
401 setjmp/i386/setjmp.s
402 string/i386/strcat_asm.s
403 string/i386/strchr_asm.s
404 string/i386/strcmp_asm.s
405 string/i386/strcpy_asm.s
406 string/i386/strlen_asm.s
407 string/i386/strncat_asm.s
408 string/i386/strncmp_asm.s
409 string/i386/strncpy_asm.s
410 string/i386/strnlen_asm.s
411 string/i386/strrchr_asm.s
412 string/i386/wcscat_asm.s
413 string/i386/wcschr_asm.s
414 string/i386/wcscmp_asm.s
415 string/i386/wcscpy_asm.s
416 string/i386/wcslen_asm.s
417 string/i386/wcsncat_asm.s
418 string/i386/wcsncmp_asm.s
419 string/i386/wcsncpy_asm.s
420 string/i386/wcsnlen_asm.s
421 string/i386/wcsrchr_asm.s)
422
423 list(APPEND CRT_SOURCE
424 except/i386/unwind.c
425 float/i386/clearfp.c
426 float/i386/cntrlfp.c
427 float/i386/fpreset.c
428 float/i386/logb.c
429 float/i386/statfp.c
430 math/i386/ci.c
431 math/i386/cicos.c
432 math/i386/cilog.c
433 math/i386/cipow.c
434 math/i386/cisin.c
435 math/i386/cisqrt.c
436 math/i386/ldexp.c)
437 if(MSVC)
438 list(APPEND CRT_ASM_SOURCE
439 except/i386/cpp.s)
440 endif()
441 elseif(ARCH STREQUAL "amd64")
442 list(APPEND CRT_ASM_SOURCE
443 except/amd64/seh.s
444 float/amd64/clearfp.S
445 float/amd64/getsetfpcw.S
446 float/amd64/fpreset.S
447 float/amd64/logb.S
448 # math/amd64/acos.S
449 math/amd64/acosf.S
450 math/amd64/atan.S
451 math/amd64/atan2.S
452 math/amd64/ceil.S
453 math/amd64/ceilf.S
454 math/amd64/exp.S
455 math/amd64/fabs.S
456 math/amd64/floor.S
457 math/amd64/floorf.S
458 math/amd64/fmod.S
459 math/amd64/fmodf.S
460 math/amd64/ldexp.S
461 math/amd64/log.S
462 math/amd64/log10.S
463 math/amd64/pow.S
464 math/amd64/sqrt.S
465 math/amd64/sqrtf.S
466 math/amd64/tan.S
467 setjmp/amd64/setjmp.s)
468
469 list(APPEND CRT_SOURCE
470 except/amd64/ehandler.c
471 float/i386/cntrlfp.c
472 float/i386/statfp.c)
473 if(MSVC)
474 list(APPEND CRT_ASM_SOURCE
475 except/amd64/cpp.s)
476 endif()
477 endif()
478
479 if(NOT ARCH STREQUAL "i386")
480 list(APPEND CRT_SOURCE
481 math/cos.c
482 math/sin.c
483 math/stubs.c
484 mem/memchr.c
485 mem/memcpy.c
486 mem/memmove.c
487 mem/memset.c
488 string/strcat.c
489 string/strchr.c
490 string/strcmp.c
491 string/strcpy.c
492 string/strlen.c
493 string/strncat.c
494 string/strncmp.c
495 string/strncpy.c
496 string/strnlen.c
497 string/strrchr.c
498 string/wcscat.c
499 string/wcschr.c
500 string/wcscmp.c
501 string/wcscpy.c
502 string/wcslen.c
503 string/wcsncat.c
504 string/wcsncmp.c
505 string/wcsncpy.c
506 string/wcsnlen.c
507 string/wcsrchr.c)
508 endif()
509
510 set_source_files_properties(${CRT_ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "__MINGW_IMPORT=extern;USE_MSVCRT_PREFIX;_MSVCRT_LIB_;_MSVCRT_;_MT;CRTDLL")
511 add_asm_files(crt_asm ${CRT_ASM_SOURCE})
512
513 add_library(crt ${CRT_SOURCE} ${crt_asm})
514 target_link_libraries(crt chkstk)
515 add_target_compile_definitions(crt
516 __MINGW_IMPORT=extern
517 USE_MSVCRT_PREFIX
518 _MSVCRT_LIB_
519 _MSVCRT_
520 _MT
521 CRTDLL)
522 #add_pch(crt precomp.h)
523 add_dependencies(crt psdk asm)