* Sync to trunk HEAD (r53473).
[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/abnorter.c
24 except/checkesp.c
25 except/cpp.c
26 except/cppexcept.c
27 except/except.c
28 except/matherr.c
29 except/xcptfil.c
30 float/chgsign.c
31 float/copysign.c
32 float/fpclass.c
33 float/fpecode.c
34 float/isnan.c
35 float/nafter.c
36 float/scalb.c
37 locale/locale.c
38 math/acos.c
39 math/adjust.c
40 math/asin.c
41 math/cabs.c
42 math/cosf.c
43 math/cosh.c
44 math/div.c
45 math/fdivbug.c
46 math/frexp.c
47 math/huge_val.c
48 math/hypot.c
49 math/ieee754/j0_y0.c
50 math/ieee754/j1_y1.c
51 math/ieee754/jn_yn.c
52 math/j0_y0.c
53 math/j1_y1.c
54 math/jn_yn.c
55 math/ldiv.c
56 math/logf.c
57 math/modf.c
58 math/powf.c
59 math/rand.c
60 math/sqrtf.c
61 math/s_modf.c
62 math/sinf.c
63 math/sinh.c
64 math/tanh.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/amsg.c
124 misc/assert.c
125 misc/environ.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/_snprintf.c
135 printf/_snwprintf.c
136 printf/_vcprintf.c
137 printf/_vsnprintf.c
138 printf/_vsnwprintf.c
139 printf/fprintf.c
140 printf/fwprintf.c
141 printf/printf.c
142 printf/sprintf.c
143 printf/streamout.c
144 printf/swprintf.c
145 printf/vfprintf.c
146 printf/vfwprintf.c
147 printf/vprintf.c
148 printf/vsprintf.c
149 printf/vswprintf.c
150 printf/vwprintf.c
151 printf/wprintf.c
152 printf/wstreamout.c
153 process/_cwait.c
154 process/_system.c
155 process/dll.c
156 process/process.c
157 process/procid.c
158 process/thread.c
159 process/threadid.c
160 process/threadx.c
161 process/wprocess.c
162 search/bsearch.c
163 search/lfind.c
164 search/lsearch.c
165 signal/signal.c
166 signal/xcptinfo.c
167 stdio/_flsbuf.c
168 stdio/_flswbuf.c
169 stdio/access.c
170 stdio/file.c
171 stdio/find.c
172 stdio/find64.c
173 stdio/findi64.c
174 stdio/fmode.c
175 stdio/lock_file.c
176 stdio/perror.c
177 stdio/popen.c
178 stdio/stat.c
179 stdio/stat64.c
180 stdio/waccess.c
181 stdio/wfind.c
182 stdio/wfind64.c
183 stdio/wfindi64.c
184 stdio/wpopen.c
185 stdio/wstat.c
186 stdio/wstat64.c
187 stdlib/_exit.c
188 stdlib/abort.c
189 stdlib/atexit.c
190 stdlib/ecvt.c
191 stdlib/errno.c
192 stdlib/fcvt.c
193 stdlib/fcvtbuf.c
194 stdlib/fullpath.c
195 stdlib/gcvt.c
196 stdlib/getenv.c
197 stdlib/makepath.c
198 stdlib/makepath_s.c
199 stdlib/mbtowc.c
200 stdlib/mbstowcs.c
201 stdlib/obsol.c
202 stdlib/putenv.c
203 stdlib/qsort.c
204 stdlib/rot.c
205 stdlib/senv.c
206 stdlib/swab.c
207 stdlib/wfulpath.c
208 stdlib/wputenv.c
209 stdlib/wsenv.c
210 stdlib/wmakpath.c
211 stdlib/wmakpath_s.c
212 string/atof.c
213 string/atoi.c
214 string/atoi64.c
215 string/atol.c
216 string/ctype.c
217 string/itoa.c
218 string/itow.c
219 string/lasttok.c
220 string/scanf.c
221 string/splitp.c
222 string/strcoll.c
223 string/strcspn.c
224 string/strdup.c
225 string/strerror.c
226 string/stricmp.c
227 string/string.c
228 string/strlwr.c
229 string/strncoll.c
230 string/strnicmp.c
231 string/strpbrk.c
232 string/strrev.c
233 string/strset.c
234 string/strspn.c
235 string/strstr.c
236 string/strtod.c
237 string/strtoi64.c
238 string/strtok.c
239 string/strtol.c
240 string/strtoul.c
241 string/strtoull.c
242 string/strupr.c
243 string/strxfrm.c
244 string/wcs.c
245 string/wcstol.c
246 string/wcstoul.c
247 string/wsplitp.c
248 string/wtoi.c
249 string/wtoi64.c
250 string/wtol.c
251 sys_stat/systime.c
252 time/asctime.c
253 time/clock.c
254 time/ctime32.c
255 time/ctime64.c
256 time/ctime.c
257 time/difftime32.c
258 time/difftime64.c
259 time/difftime.c
260 time/ftime32.c
261 time/ftime64.c
262 time/ftime.c
263 time/futime32.c
264 time/futime64.c
265 time/futime.c
266 time/gmtime.c
267 time/localtime32.c
268 time/localtime64.c
269 time/localtime.c
270 time/mktime.c
271 time/strdate.c
272 time/strftime.c
273 time/strtime.c
274 time/time32.c
275 time/time64.c
276 time/time.c
277 time/timezone.c
278 time/tzname.c
279 time/utime32.c
280 time/utime64.c
281 time/utime.c
282 time/wasctime.c
283 time/wcsftime.c
284 time/wctime32.c
285 time/wctime64.c
286 time/wctime.c
287 time/wstrdate.c
288 time/wstrtime.c
289 time/wutime32.c
290 time/wutime64.c
291 time/wutime.c
292 wstring/wcscoll.c
293 wstring/wcscspn.c
294 wstring/wcsicmp.c
295 wstring/wcslwr.c
296 wstring/wcsnicmp.c
297 wstring/wcsspn.c
298 wstring/wcsstr.c
299 wstring/wcstok.c
300 wstring/wcsupr.c
301 wstring/wcsxfrm.c
302 wstring/wlasttok.c
303 wine/heap.c
304 wine/undname.c)
305
306 if(ARCH MATCHES i386)
307 list(APPEND CRT_SOURCE
308 except/i386/prolog.s
309 except/i386/seh.s
310 except/i386/seh_prolog.s
311 except/i386/unwind.c
312 float/i386/clearfp.c
313 float/i386/cntrlfp.c
314 float/i386/fpreset.c
315 float/i386/logb.c
316 float/i386/statfp.c
317 math/i386/alldiv_asm.s
318 math/i386/alldvrm_asm.s
319 math/i386/allmul_asm.s
320 math/i386/allrem_asm.s
321 math/i386/allshl_asm.s
322 math/i386/allshr_asm.s
323 math/i386/atan_asm.s
324 math/i386/aulldiv_asm.s
325 math/i386/aulldvrm_asm.s
326 math/i386/aullrem_asm.s
327 math/i386/aullshr_asm.s
328 math/i386/ceil_asm.s
329 math/i386/ceilf.S
330 math/i386/cos_asm.s
331 math/i386/fabs_asm.s
332 math/i386/floor_asm.s
333 math/i386/floorf.S
334 math/i386/ftol_asm.s
335 math/i386/ftol2_asm.s
336 math/i386/log_asm.s
337 math/i386/log10_asm.s
338 math/i386/pow_asm.s
339 math/i386/sin_asm.s
340 math/i386/sqrt_asm.s
341 math/i386/tan_asm.s
342 math/i386/atan2_asm.s
343 math/i386/ci.c
344 math/i386/exp_asm.s
345 math/i386/fmod_asm.s
346 math/i386/fmodf_asm.s
347 math/i386/ldexp.c
348 mem/i386/memchr_asm.s
349 mem/i386/memmove_asm.s
350 mem/i386/memset_asm.s
351 misc/i386/readcr4.S
352 setjmp/i386/setjmp.s
353 string/i386/strcat_asm.s
354 string/i386/strchr_asm.s
355 string/i386/strcmp_asm.s
356 string/i386/strcpy_asm.s
357 string/i386/strlen_asm.s
358 string/i386/strncat_asm.s
359 string/i386/strncmp_asm.s
360 string/i386/strncpy_asm.s
361 string/i386/strnlen_asm.s
362 string/i386/strrchr_asm.s
363 string/i386/wcscat_asm.s
364 string/i386/wcschr_asm.s
365 string/i386/wcscmp_asm.s
366 string/i386/wcscpy_asm.s
367 string/i386/wcslen_asm.s
368 string/i386/wcsncat_asm.s
369 string/i386/wcsncmp_asm.s
370 string/i386/wcsncpy_asm.s
371 string/i386/wcsnlen_asm.s
372 string/i386/wcsrchr_asm.s)
373 if(MSVC)
374 list(APPEND CRT_SOURCE
375 except/i386/cpp.s)
376 endif()
377 elseif(ARCH MATCHES amd64)
378 list(APPEND CRT_SOURCE
379 except/amd64/seh.s
380 except/amd64/ehandler.c
381 float/amd64/clearfp.S
382 float/i386/cntrlfp.c
383 float/amd64/fpreset.S
384 float/amd64/logb.S
385 float/i386/statfp.c
386 math/amd64/alldiv.S
387 math/amd64/atan.S
388 math/amd64/atan2.S
389 math/amd64/ceil.S
390 math/amd64/ceilf.S
391 math/amd64/exp.S
392 math/amd64/fabs.S
393 math/amd64/floor.S
394 math/amd64/floorf.S
395 math/amd64/fmod.S
396 math/amd64/fmodf.S
397 math/amd64/ldexp.S
398 math/amd64/log.S
399 math/amd64/log10.S
400 math/amd64/pow.S
401 math/amd64/sqrt.S
402 math/amd64/sqrtf.S
403 math/amd64/tan.S
404 setjmp/amd64/setjmp.s)
405 if(MSVC)
406 list(APPEND CRT_SOURCE
407 except/amd64/cpp.s)
408 endif()
409 endif()
410
411 if(NOT ARCH MATCHES i386)
412 list(APPEND CRT_SOURCE
413 math/cos.c
414 math/sin.c
415 math/stubs.c
416 mem/memchr.c
417 mem/memcpy.c
418 mem/memmove.c
419 mem/memset.c
420 string/strcat.c
421 string/strchr.c
422 string/strcmp.c
423 string/strcpy.c
424 string/strlen.c
425 string/strncat.c
426 string/strncmp.c
427 string/strncpy.c
428 string/strnlen.c
429 string/strrchr.c
430 string/wcscat.c
431 string/wcschr.c
432 string/wcscmp.c
433 string/wcscpy.c
434 string/wcslen.c
435 string/wcsncat.c
436 string/wcsncmp.c
437 string/wcsncpy.c
438 string/wcsnlen.c
439 string/wcsrchr.c)
440 endif()
441
442 add_library(crt ${CRT_SOURCE})
443 target_link_libraries(crt chkstk)
444 set_property(TARGET crt PROPERTY COMPILE_DEFINITIONS __MINGW_IMPORT=extern USE_MSVCRT_PREFIX _MSVCRT_LIB_ _MSVCRT_ _MT)
445 add_pch(crt precomp.h)
446 add_dependencies(crt psdk asm)