01f11982cab9113f60920b20b1dad6881a2ed027
[reactos.git] / reactos / 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/hanzen.c
65 mbstring/ischira.c
66 mbstring/iskana.c
67 mbstring/iskmoji.c
68 mbstring/iskpun.c
69 mbstring/islead.c
70 mbstring/islwr.c
71 mbstring/ismbal.c
72 mbstring/ismbaln.c
73 mbstring/ismbc.c
74 mbstring/ismbgra.c
75 mbstring/ismbkaln.c
76 mbstring/ismblead.c
77 mbstring/ismbpri.c
78 mbstring/ismbpun.c
79 mbstring/ismbtrl.c
80 mbstring/isuppr.c
81 mbstring/jistojms.c
82 mbstring/jmstojis.c
83 mbstring/mbbtype.c
84 mbstring/mbccpy.c
85 mbstring/mbclen.c
86 mbstring/mbscat.c
87 mbstring/mbschr.c
88 mbstring/mbscmp.c
89 mbstring/mbscoll.c
90 mbstring/mbscpy.c
91 mbstring/mbscspn.c
92 mbstring/mbsdec.c
93 mbstring/mbsdup.c
94 mbstring/mbsicmp.c
95 mbstring/mbsicoll.c
96 mbstring/mbsinc.c
97 mbstring/mbslen.c
98 mbstring/mbslwr.c
99 mbstring/mbsncat.c
100 mbstring/mbsnccnt.c
101 mbstring/mbsncmp.c
102 mbstring/mbsncoll.c
103 mbstring/mbsncpy.c
104 mbstring/mbsnextc.c
105 mbstring/mbsnicmp.c
106 mbstring/mbsnicoll.c
107 mbstring/mbsninc.c
108 mbstring/mbsnset.c
109 mbstring/mbspbrk.c
110 mbstring/mbsrchr.c
111 mbstring/mbsrev.c
112 mbstring/mbsset.c
113 mbstring/mbsspn.c
114 mbstring/mbsspnp.c
115 mbstring/mbsstr.c
116 mbstring/mbstok.c
117 mbstring/mbstrlen.c
118 mbstring/mbsupr.c
119 mem/memcmp.c
120 mem/memccpy.c
121 mem/memicmp.c
122 misc/amsg.c
123 misc/assert.c
124 misc/environ.c
125 misc/fltused.c
126 misc/getargs.c
127 misc/i10output.c
128 misc/initterm.c
129 misc/lock.c
130 misc/purecall.c
131 misc/stubs.c
132 misc/tls.c
133 printf/_cprintf.c
134 printf/_cwprintf.c
135 printf/_snprintf.c
136 printf/_snwprintf.c
137 printf/_vcprintf.c
138 printf/_vcwprintf.c
139 printf/_vscprintf.c
140 printf/_vscwprintf.c
141 printf/_vsnprintf.c
142 printf/_vsnwprintf.c
143 printf/_vsprintf_p.c
144 printf/fprintf.c
145 printf/fprintf_s.c
146 printf/fwprintf.c
147 printf/fwprintf_s.c
148 printf/printf.c
149 printf/printf_s.c
150 printf/sprintf.c
151 printf/streamout.c
152 printf/swprintf.c
153 printf/vfprintf.c
154 printf/vfprintf_s.c
155 printf/vfwprintf.c
156 printf/vfwprintf_s.c
157 printf/vprintf.c
158 printf/vprintf_s.c
159 printf/vsprintf.c
160 printf/vswprintf.c
161 printf/vwprintf.c
162 printf/vwprintf_s.c
163 printf/wprintf.c
164 printf/wprintf_s.c
165 printf/wstreamout.c
166 process/_cwait.c
167 process/_system.c
168 process/dll.c
169 process/process.c
170 process/procid.c
171 process/thread.c
172 process/threadid.c
173 process/threadx.c
174 process/wprocess.c
175 search/bsearch.c
176 search/lfind.c
177 search/lsearch.c
178 signal/signal.c
179 signal/xcptinfo.c
180 startup/crtexe.c
181 startup/wcrtexe.c
182 startup/crt_handler.c
183 startup/crtdll.c
184 startup/_newmode.c
185 startup/wildcard.c
186 startup/tlssup.c
187 startup/mingw_helpers.c
188 startup/natstart.c
189 startup/charmax.c
190 startup/merr.c
191 startup/atonexit.c
192 startup/txtmode.c
193 startup/pesect.c
194 startup/tlsmcrt.c
195 startup/tlsthrd.c
196 startup/tlsmthread.c
197 startup/cinitexe.c
198 startup/gs_support.c
199 startup/dll_argv.c
200 startup/dllargv.c
201 startup/wdllargv.c
202 startup/crt0_c.c
203 startup/crt0_w.c
204 startup/dllentry.c
205 startup/reactos.c
206 stdio/_flsbuf.c
207 stdio/_flswbuf.c
208 stdio/access.c
209 stdio/file.c
210 stdio/find.c
211 stdio/find64.c
212 stdio/findi64.c
213 stdio/fmode.c
214 stdio/perror.c
215 stdio/popen.c
216 stdio/stat.c
217 stdio/stat64.c
218 stdio/waccess.c
219 stdio/wfind.c
220 stdio/wfind64.c
221 stdio/wfindi64.c
222 stdio/wpopen.c
223 stdio/wstat.c
224 stdio/wstat64.c
225 stdlib/_exit.c
226 stdlib/abort.c
227 stdlib/atexit.c
228 stdlib/ecvt.c
229 stdlib/errno.c
230 stdlib/fcvt.c
231 stdlib/fcvtbuf.c
232 stdlib/fullpath.c
233 stdlib/gcvt.c
234 stdlib/getenv.c
235 stdlib/makepath.c
236 stdlib/makepath_s.c
237 stdlib/mbtowc.c
238 stdlib/mbstowcs.c
239 stdlib/obsol.c
240 stdlib/putenv.c
241 stdlib/qsort.c
242 stdlib/rot.c
243 stdlib/senv.c
244 stdlib/swab.c
245 stdlib/wfulpath.c
246 stdlib/wputenv.c
247 stdlib/wsenv.c
248 stdlib/wmakpath.c
249 stdlib/wmakpath_s.c
250 string/atof.c
251 string/atoi.c
252 string/atoi64.c
253 string/atol.c
254 string/ctype.c
255 string/iswctype.c
256 string/is_wctype.c
257 string/itoa.c
258 string/itow.c
259 string/scanf.c
260 string/splitp.c
261 string/strcoll.c
262 string/strcspn.c
263 string/strdup.c
264 string/strerror.c
265 string/stricmp.c
266 string/string.c
267 string/strlwr.c
268 string/strncoll.c
269 string/strnicmp.c
270 string/strpbrk.c
271 string/strrev.c
272 string/strset.c
273 string/strspn.c
274 string/strstr.c
275 string/strtod.c
276 string/strtoi64.c
277 string/strtok.c
278 string/strtol.c
279 string/strtoul.c
280 string/strtoull.c
281 string/strupr.c
282 string/strxfrm.c
283 string/wcs.c
284 string/wcstol.c
285 string/wcstoul.c
286 string/wctype.c
287 string/wsplitp.c
288 string/wtoi.c
289 string/wtoi64.c
290 string/wtol.c
291 sys_stat/systime.c
292 time/asctime.c
293 time/clock.c
294 time/ctime32.c
295 time/ctime64.c
296 time/ctime.c
297 time/difftime32.c
298 time/difftime64.c
299 time/difftime.c
300 time/ftime32.c
301 time/ftime64.c
302 time/ftime.c
303 time/futime32.c
304 time/futime64.c
305 time/futime.c
306 time/gmtime.c
307 time/localtime32.c
308 time/localtime64.c
309 time/localtime.c
310 time/mktime.c
311 time/strdate.c
312 time/strftime.c
313 time/strtime.c
314 time/time32.c
315 time/time64.c
316 time/time.c
317 time/timezone.c
318 time/utime32.c
319 time/utime64.c
320 time/utime.c
321 time/wasctime.c
322 time/wcsftime.c
323 time/wctime32.c
324 time/wctime64.c
325 time/wctime.c
326 time/wstrdate.c
327 time/wstrtime.c
328 time/wutime32.c
329 time/wutime64.c
330 time/wutime.c
331 wstring/wcscoll.c
332 wstring/wcscspn.c
333 wstring/wcsicmp.c
334 wstring/wcslwr.c
335 wstring/wcsnicmp.c
336 wstring/wcsspn.c
337 wstring/wcsstr.c
338 wstring/wcstok.c
339 wstring/wcsupr.c
340 wstring/wcsxfrm.c
341 wine/heap.c
342 wine/undname.c)
343
344 if(ARCH STREQUAL "i386")
345 list(APPEND CRT_SOURCE
346 except/i386/chkesp.s
347 except/i386/prolog.s
348 except/i386/seh.s
349 except/i386/seh_prolog.s
350 except/i386/unwind.c
351 float/i386/clearfp.c
352 float/i386/cntrlfp.c
353 float/i386/fpreset.c
354 float/i386/logb.c
355 float/i386/statfp.c
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/ci.c
383 math/i386/cicos.c
384 math/i386/cilog.c
385 math/i386/cipow.c
386 math/i386/cisin.c
387 math/i386/cisqrt.c
388 math/i386/exp_asm.s
389 math/i386/fmod_asm.s
390 math/i386/fmodf_asm.s
391 math/i386/ldexp.c
392 mem/i386/memchr_asm.s
393 mem/i386/memmove_asm.s
394 mem/i386/memset_asm.s
395 misc/i386/readcr4.S
396 setjmp/i386/setjmp.s
397 string/i386/strcat_asm.s
398 string/i386/strchr_asm.s
399 string/i386/strcmp_asm.s
400 string/i386/strcpy_asm.s
401 string/i386/strlen_asm.s
402 string/i386/strncat_asm.s
403 string/i386/strncmp_asm.s
404 string/i386/strncpy_asm.s
405 string/i386/strnlen_asm.s
406 string/i386/strrchr_asm.s
407 string/i386/wcscat_asm.s
408 string/i386/wcschr_asm.s
409 string/i386/wcscmp_asm.s
410 string/i386/wcscpy_asm.s
411 string/i386/wcslen_asm.s
412 string/i386/wcsncat_asm.s
413 string/i386/wcsncmp_asm.s
414 string/i386/wcsncpy_asm.s
415 string/i386/wcsnlen_asm.s
416 string/i386/wcsrchr_asm.s)
417 if(MSVC)
418 list(APPEND CRT_SOURCE
419 except/i386/cpp.s)
420 endif()
421 elseif(ARCH STREQUAL "amd64")
422 list(APPEND CRT_SOURCE
423 except/amd64/seh.s
424 except/amd64/ehandler.c
425 float/amd64/clearfp.S
426 float/amd64/getsetfpcw.S
427 float/i386/cntrlfp.c
428 float/amd64/fpreset.S
429 float/amd64/logb.S
430 float/i386/statfp.c
431 math/amd64/acos.S
432 math/amd64/acosf.S
433 math/amd64/atan.S
434 math/amd64/atan2.S
435 math/amd64/ceil.S
436 math/amd64/ceilf.S
437 math/amd64/exp.S
438 math/amd64/fabs.S
439 math/amd64/floor.S
440 math/amd64/floorf.S
441 math/amd64/fmod.S
442 math/amd64/fmodf.S
443 math/amd64/ldexp.S
444 math/amd64/log.S
445 math/amd64/log10.S
446 math/amd64/pow.S
447 math/amd64/sqrt.S
448 math/amd64/sqrtf.S
449 math/amd64/tan.S
450 setjmp/amd64/setjmp.s)
451 if(MSVC)
452 list(APPEND CRT_SOURCE
453 except/amd64/cpp.s)
454 endif()
455 endif()
456
457 if(NOT ARCH STREQUAL "i386")
458 list(APPEND CRT_SOURCE
459 math/cos.c
460 math/sin.c
461 math/stubs.c
462 mem/memchr.c
463 mem/memcpy.c
464 mem/memmove.c
465 mem/memset.c
466 string/strcat.c
467 string/strchr.c
468 string/strcmp.c
469 string/strcpy.c
470 string/strlen.c
471 string/strncat.c
472 string/strncmp.c
473 string/strncpy.c
474 string/strnlen.c
475 string/strrchr.c
476 string/wcscat.c
477 string/wcschr.c
478 string/wcscmp.c
479 string/wcscpy.c
480 string/wcslen.c
481 string/wcsncat.c
482 string/wcsncmp.c
483 string/wcsncpy.c
484 string/wcsnlen.c
485 string/wcsrchr.c)
486 endif()
487
488 add_library(crt ${CRT_SOURCE})
489 target_link_libraries(crt chkstk)
490 add_target_compile_definitions(crt
491 __MINGW_IMPORT=extern
492 USE_MSVCRT_PREFIX
493 _MSVCRT_LIB_
494 _MSVCRT_
495 _MT
496 CRTDLL)
497 #add_pch(crt precomp.h)
498 add_dependencies(crt psdk asm)