Subversion Repositories Kolibri OS

Rev

Rev 6557 | Rev 6622 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6557 Rev 6621
Line 21... Line 21...
21
  end
21
  end
22
end
22
end
23
LIBPATH = "-L$(SDK_DIR)/lib"
23
LIBPATH = "-L$(SDK_DIR)/lib"
24
STATIC_SRCS = {"crt/start.S", "crt/crt1.c", "crt/crt2.c", "crt/exit.S"}
24
STATIC_SRCS = {"crt/start.S", "crt/crt1.c", "crt/crt2.c", "crt/exit.S"}
25
LIBDLL_SRCS = {"crt/dllstart.c", "crt/exit.S", "crt/pseudo-reloc.c", "crt/setjmp.S"}
25
LIBDLL_SRCS = {"crt/dllstart.c", "crt/exit.S", "crt/pseudo-reloc.c", "crt/setjmp.S"}
-
 
26
LIBCDLL_SRCS = {
-
 
27
  "crt/crtdll.c",
-
 
28
  "crt/crt2.c",
26
LIBCDLL_SRCS = {"crt/crt2.c", "crt/pseudo-reloc.c", "crt/exit.S", "crt/setjmp.S"}
29
  "crt/pseudo-reloc.c",
-
 
30
  "crt/exit.S",
-
 
31
  "pe/loader.c"
-
 
32
}
27
CORE_SRCS = {
33
CORE_SRCS = {
28
  "argz/buf_findstr.c", "argz/envz_get.c",
34
  "argz/buf_findstr.c",
-
 
35
  "argz/envz_get.c",
-
 
36
  "crt/console.asm",
-
 
37
  "crt/thread.S",
-
 
38
  "crt/setjmp.S",
29
  "crt/console.asm", "crt/thread.S", "crt/cpu_features.c", "crt/tls.c",
39
  "crt/cpu_features.c",
-
 
40
  "crt/tls.c",
-
 
41
  "ctype/ctype_.c",
-
 
42
  "ctype/isascii.c",
-
 
43
  "ctype/isblank.c",
-
 
44
  "ctype/isalnum.c",
-
 
45
  "ctype/isalpha.c",
-
 
46
  "ctype/iscntrl.c",
-
 
47
  "ctype/isdigit.c",
-
 
48
  "ctype/islower.c",
-
 
49
  "ctype/isupper.c",
-
 
50
  "ctype/isprint.c",
-
 
51
  "ctype/ispunct.c",
-
 
52
  "ctype/isspace.c",
-
 
53
  "ctype/iswctype.c",
-
 
54
  "ctype/iswalnum.c",
-
 
55
  "ctype/iswalpha.c",
30
  "ctype/ctype_.c", "ctype/isascii.c", "ctype/isblank.c", "ctype/isalnum.c",
56
  "ctype/iswblank.c",
-
 
57
  "ctype/iswcntrl.c",
-
 
58
  "ctype/iswdigit.c",
-
 
59
  "ctype/iswgraph.c",
31
  "ctype/isalpha.c", "ctype/iscntrl.c", "ctype/isdigit.c", "ctype/islower.c",
60
  "ctype/iswlower.c",
32
  "ctype/isupper.c", "ctype/isprint.c", "ctype/ispunct.c", "ctype/isspace.c",
61
  "ctype/iswprint.c",
33
  "ctype/iswctype.c", "ctype/iswalnum.c", "ctype/iswalpha.c", "ctype/iswblank.c",
62
  "ctype/iswpunct.c",
34
  "ctype/iswcntrl.c", "ctype/iswdigit.c", "ctype/iswgraph.c", "ctype/iswlower.c",
63
  "ctype/iswspace.c",
35
  "ctype/iswprint.c", "ctype/iswpunct.c", "ctype/iswspace.c", "ctype/iswupper.c",
64
  "ctype/iswupper.c",
36
  "ctype/iswxdigit.c", "ctype/isxdigit.c", "ctype/toascii.c", "ctype/tolower.c",
65
  "ctype/iswxdigit.c",
-
 
66
  "ctype/isxdigit.c",
-
 
67
  "ctype/toascii.c",
-
 
68
  "ctype/tolower.c",
-
 
69
  "ctype/toupper.c",
37
  "ctype/toupper.c", "ctype/towctrans.c", "ctype/towlower.c", "ctype/towupper.c",
70
  "ctype/towctrans.c",
-
 
71
  "ctype/towlower.c",
-
 
72
  "ctype/towupper.c",
38
  "ctype/wctrans.c", "ctype/wctype.c",
73
  "ctype/wctrans.c",
-
 
74
  "ctype/wctype.c",
39
  "errno/errno.c",
75
  "errno/errno.c",
40
  "locale/locale.c", "locale/lctype.c", "locale/ldpart.c",
76
  "locale/locale.c",
41
 
-
 
-
 
77
  "locale/lctype.c",
-
 
78
  "locale/ldpart.c",
-
 
79
  "reent/closer.c",
-
 
80
  "reent/fstatr.c",
-
 
81
  "reent/getreent.c",
42
  "reent/closer.c", "reent/fstatr.c", "reent/getreent.c", "reent/gettimeofdayr.c",
82
  "reent/gettimeofdayr.c",
-
 
83
  "reent/impure.c",
43
  "reent/impure.c", "reent/init_reent.c", "reent/isattyr.c", "reent/linkr.c",
84
  "reent/init_reent.c",
-
 
85
  "reent/isattyr.c",
-
 
86
  "reent/linkr.c",
-
 
87
  "reent/lseekr.c",
-
 
88
  "reent/mutex.c",
-
 
89
  "reent/openr.c",
-
 
90
  "reent/readr.c",
44
  "reent/lseekr.c", "reent/mutex.c", "reent/openr.c", "reent/readr.c",
91
  "reent/renamer.c",
-
 
92
  "reent/statr.c",
-
 
93
  "reent/timesr.c",
45
  "reent/statr.c", "reent/timesr.c", "reent/unlinkr.c",
94
  "reent/unlinkr.c",
46
  "reent/writer.c",
95
  "reent/writer.c",
-
 
96
  "search/qsort.c",
47
  "search/qsort.c", "search/bsearch.c",
97
  "search/bsearch.c",
48
  "signal/signal.c",
98
  "signal/signal.c",
-
 
99
  "sys/access.c",
49
  "sys/access.c", "sys/clock_gettime.c", "sys/close.c", "sys/conio.c", "sys/create.c",
100
  "sys/clock_gettime.c",
-
 
101
  "sys/close.c",
-
 
102
  "sys/conio.c",
-
 
103
  "sys/create.c",
-
 
104
  "sys/errno.c",
-
 
105
  "sys/finfo.c",
-
 
106
  "sys/fsize.c",
-
 
107
  "sys/fstat.c",
50
  "sys/errno.c", "sys/finfo.c", "sys/fsize.c", "sys/fstat.c", "sys/gettod.c", "sys/io.c",
108
  "sys/gettod.c",
-
 
109
  "sys/io.c",
-
 
110
  "sys/ioread.c",
51
  "sys/ioread.c", "sys/iowrite.c", "sys/isatty.c", "sys/lseek.c", "sys/open.c",
111
  "sys/iowrite.c",
-
 
112
  "sys/isatty.c",
-
 
113
  "sys/lseek.c",
-
 
114
  "sys/open.c",
-
 
115
  "sys/read.c",
52
  "sys/read.c", "sys/_rename.c", "sys/stat.c", "sys/unlink.c", "sys/write.c",
116
  "sys/_rename.c",
-
 
117
  "sys/stat.c",
-
 
118
  "sys/unlink.c",
-
 
119
  "sys/write.c",
-
 
120
  "sys/io_alloc.S",
-
 
121
  "time/asctime.c",
53
  "sys/io_alloc.S", "time/asctime.c", "time/asctime_r.c", "time/clock.c", "time/ctime.c",
122
  "time/asctime_r.c",
-
 
123
  "time/clock.c",
-
 
124
  "time/ctime.c",
-
 
125
  "time/ctime_r.c",
-
 
126
  "time/difftime.c",
54
  "time/ctime_r.c", "time/difftime.c", "time/gettzinfo.c", "time/gmtime.c",
127
  "time/gettzinfo.c",
-
 
128
  "time/gmtime.c",
-
 
129
  "time/gmtime_r.c",
-
 
130
  "time/mktime.c",
55
  "time/gmtime_r.c", "time/mktime.c", "time/month_lengths.c", "time/lcltime.c",
131
  "time/month_lengths.c",
-
 
132
  "time/lcltime.c",
-
 
133
  "time/lcltime_r.c",
-
 
134
  "time/strftime.c",
-
 
135
  "time/time.c",
56
  "time/lcltime_r.c", "time/strftime.c", "time/time.c", "time/tzcalc_limits.c",
136
  "time/tzcalc_limits.c",
57
  "time/timelocal.c", "time/tzlock.c", "time/tzset.c", "time/tzset_r.c", "time/tzvars.c"
137
  "time/timelocal.c",
-
 
138
  "time/tzlock.c",
-
 
139
  "time/tzset.c",
-
 
140
  "time/tzset_r.c",
-
 
141
  "time/tzvars.c"
58
}
142
}
59
STDLIB_SRCS = {
143
STDLIB_SRCS = {
60
  "__atexit.c",
144
  "__atexit.c",
61
  "__call_atexit.c",
145
  "__call_atexit.c",
62
  "abort.c",
146
  "abort.c",
Line 64... Line 148...
64
  "assert.c",
148
  "assert.c",
65
  "atexit.c",
149
  "atexit.c",
66
  "atof.c",
150
  "atof.c",
67
  "atoi.c",
151
  "atoi.c",
68
  "atol.c",
152
  "atol.c",
-
 
153
  "btowc.c",
-
 
154
  "calloc.c",
69
  "cxa_atexit.c",
155
  "cxa_atexit.c",
70
  "cxa_finalize.c",
156
  "cxa_finalize.c",
71
  "div.c",
157
  "div.c",
72
  "dtoa.c",
158
  "dtoa.c",
73
  "dtoastub.c",
159
  "dtoastub.c",
Line 79... Line 165...
79
  "gdtoa-gethex.c",
165
  "gdtoa-gethex.c",
80
  "gdtoa-hexnan.c",
166
  "gdtoa-hexnan.c",
81
  "getenv.c",
167
  "getenv.c",
82
  "getenv_r.c",
168
  "getenv_r.c",
83
  "itoa.c",
169
  "itoa.c",
-
 
170
  "ldiv.c",
84
  "labs.c",
171
  "labs.c",
-
 
172
  "ldtoa.c",
-
 
173
  "malloc.c",
-
 
174
  "mallocr.c",
-
 
175
  "mblen.c",
-
 
176
  "mblen_r.c",
85
  "mprec.c",
177
  "mbrlen.c",
-
 
178
  "mbrtowc.c",
-
 
179
  "mbsinit.c",
-
 
180
  "mbsnrtowcs.c",
-
 
181
  "mbsrtowcs.c",
-
 
182
  "mbstowcs.c",
-
 
183
  "mbstowcs_r.c",
86
  "mbtowc.c",
184
  "mbtowc.c",
87
  "mbtowc_r.c",
185
  "mbtowc_r.c",
88
  "mbrtowc.c",
-
 
89
  "mlock.c",
186
  "mlock.c",
90
  "calloc.c",
-
 
91
  "malloc.c",
187
  "mprec.c",
92
  "mallocr.c",
-
 
93
  "rand.c",
188
  "rand.c",
94
  "rand_r.c",
189
  "rand_r.c",
95
  "rand48.c",
190
  "rand48.c",
-
 
191
  "random.c",
96
  "realloc.c",
192
  "realloc.c",
97
  "seed48.c",
193
  "seed48.c",
98
  "srand48.c",
194
  "srand48.c",
99
  "strtod.c",
195
  "strtod.c",
100
  "strtodg.c",
196
  "strtodg.c",
Line 107... Line 203...
107
  "strtoull.c",
203
  "strtoull.c",
108
  "strtoull_r.c",
204
  "strtoull_r.c",
109
  "system.c",
205
  "system.c",
110
  "utoa.c",
206
  "utoa.c",
111
  "wcrtomb.c",
207
  "wcrtomb.c",
-
 
208
  "wcsnrtombs.c",
-
 
209
  "wcsrtombs.c",
-
 
210
  "wcstod.c",
-
 
211
  "wcstol.c",
-
 
212
  "wcstold.c",
-
 
213
  "wcstoll.c",
-
 
214
  "wcstoll_r.c",
-
 
215
  "wcstombs.c",
-
 
216
  "wcstombs_r.c",
-
 
217
  "wcstoul.c",
-
 
218
  "wcstoull.c",
-
 
219
  "wcstoull_r.c",
-
 
220
  "wctob.c",
-
 
221
  "wctomb.c",
112
  "wctomb_r.c"
222
  "wctomb_r.c"
113
}
223
}
114
STRING_SRCS = {
224
STRING_SRCS = {
115
  "bcmp.c",
225
  "bcmp.c",
116
  "bcopy.c",
226
  "bcopy.c",
Line 204... Line 314...
204
  "asiprintf.c",
314
  "asiprintf.c",
205
  "asniprintf.c",
315
  "asniprintf.c",
206
  "asnprintf.c",
316
  "asnprintf.c",
207
  "asprintf.c",
317
  "asprintf.c",
208
  "clearerr.c",
318
  "clearerr.c",
-
 
319
  "clearerr_u.c",
209
  "diprintf.c",
320
  "diprintf.c",
210
  "dprintf.c",
321
  "dprintf.c",
211
  "fclose.c",
322
  "fclose.c",
212
  "fcloseall.c",
323
  "fcloseall.c",
213
  "fdopen.c",
324
  "fdopen.c",
Line 220... Line 331...
220
  "fgetc.c",
331
  "fgetc.c",
221
  "fgetc_u.c",
332
  "fgetc_u.c",
222
  "fgetpos.c",
333
  "fgetpos.c",
223
  "fgets.c",
334
  "fgets.c",
224
  "fgets_u.c",
335
  "fgets_u.c",
-
 
336
  "fgetwc.c",
-
 
337
  "fgetwc_u.c",
-
 
338
  "fgetws.c",
-
 
339
  "fgetws_u.c",
225
  "fileno.c",
340
  "fileno.c",
226
  "fileno_u.c",
341
  "fileno_u.c",
227
  "findfp.c",
342
  "findfp.c",
228
  "fiprintf.c",
343
  "fiprintf.c",
229
  "fiscanf.c",
344
  "fiscanf.c",
Line 236... Line 351...
236
  "fputc.c",
351
  "fputc.c",
237
  "fputc_u.c",
352
  "fputc_u.c",
238
  "fputs.c",
353
  "fputs.c",
239
  "fputs_u.c",
354
  "fputs_u.c",
240
  "fputwc.c",
355
  "fputwc.c",
-
 
356
  "fputwc_u.c",
-
 
357
  "fputws.c",
-
 
358
  "fputws_u.c"
241
  "fsetpos.c",
359
  "fsetpos.c",
-
 
360
  "funopen.c",
242
  "fread.c",
361
  "fread.c",
243
  "fread_u.c",
362
  "fread_u.c",
244
  "freopen.c",
363
  "freopen.c",
245
  "fscanf.c",
364
  "fscanf.c",
246
  "fseek.c",
365
  "fseek.c",
Line 249... Line 368...
249
  "ftell.c",
368
  "ftell.c",
250
  "ftello.c",
369
  "ftello.c",
251
  "fvwrite.c",
370
  "fvwrite.c",
252
  "fwalk.c",
371
  "fwalk.c",
253
  "fwide.c",
372
  "fwide.c",
-
 
373
  "fwprintf.c",
254
  "fwrite.c",
374
  "fwrite.c",
255
  "fwrite_u.c",
375
  "fwrite_u.c",
-
 
376
  "fwscanf.c",
256
  "getc.c",
377
  "getc.c",
257
  "getc_u.c",
378
  "getc_u.c",
258
  "getchar.c",
379
  "getchar.c",
259
  "getchar_u.c",
380
  "getchar_u.c",
260
  "getdelim.c",
381
  "getdelim.c",
261
  "getline.c",
382
  "getline.c",
262
  "gets.c",
383
  "gets.c",
-
 
384
  "getw.c",
-
 
385
  "getwc.c",
-
 
386
  "getwc_u.c",
-
 
387
  "getwchar.c",
-
 
388
  "getwchar_u.c",
263
  "iprintf.c",
389
  "iprintf.c",
264
  "iscanf.c",
390
  "iscanf.c",
265
  "makebuf.c",
391
  "makebuf.c",
266
  "mbstowcs.c",
392
  "mbstowcs.c",
267
  "mktemp.c",
393
  "mktemp.c",
Line 271... Line 397...
271
  "putc.c",
397
  "putc.c",
272
  "putc_u.c",
398
  "putc_u.c",
273
  "putchar.c",
399
  "putchar.c",
274
  "putchar_u.c",
400
  "putchar_u.c",
275
  "puts.c",
401
  "puts.c",
-
 
402
  "putw.c",
-
 
403
  "putwc.c",
-
 
404
  "putwc_u.c",
-
 
405
  "putwchar.c",
-
 
406
  "putwchar_u.c",
276
  "refill.c",
407
  "refill.c",
277
  "remove.c",
408
  "remove.c",
278
  "rename.c",
409
  "rename.c",
279
  "rewind.c",
410
  "rewind.c",
280
  "rget.c",
411
  "rget.c",
Line 290... Line 421...
290
  "snprintf.c",
421
  "snprintf.c",
291
  "sprintf.c",
422
  "sprintf.c",
292
  "sscanf.c",
423
  "sscanf.c",
293
  "stdio.c",
424
  "stdio.c",
294
  "stdio_ext.c",
425
  "stdio_ext.c",
-
 
426
  "swprintf.c",
-
 
427
  "swscanf.c",
295
  "tmpfile.c",
428
  "tmpfile.c",
296
  "tmpnam.c",
429
  "tmpnam.c",
297
  "ungetc.c",
430
  "ungetc.c",
-
 
431
  "ungetwc.c",
298
  "vasiprintf.c",
432
  "vasiprintf.c",
299
  "vasniprintf.c",
433
  "vasniprintf.c",
300
  "vasnprintf.c",
434
  "vasnprintf.c",
301
  "vasprintf.c",
435
  "vasprintf.c",
302
  "vdiprintf.c",
436
  "vdiprintf.c",
303
  "vdprintf.c",
437
  "vdprintf.c",
-
 
438
  "vfwscanf.c",
304
  "viprintf.c",
439
  "viprintf.c",
305
  "viscanf.c",
440
  "viscanf.c",
306
  "vprintf.c",
441
  "vprintf.c",
307
  "vscanf.c",
442
  "vscanf.c",
308
  "vsiprintf.c",
443
  "vsiprintf.c",
309
  "vsiscanf.c",
444
  "vsiscanf.c",
310
  "vsprintf.c",
445
  "vsprintf.c",
311
  "vsniprintf.c",
446
  "vsniprintf.c",
312
  "vsnprintf.c",
447
  "vsnprintf.c",
313
  "vsscanf.c",
448
  "vsscanf.c",
-
 
449
  "vswprintf.c",
-
 
450
  "vswscanf.c",
-
 
451
  "vwprintf.c",
314
  "wsetup.c",
452
  "vwscanf.c",
315
  "wbuf.c"
453
  "wbuf.c",
-
 
454
  "wprintf.c",
-
 
455
  "wscanf.c",
-
 
456
  "wsetup.c"
316
}
457
}
Line 317... Line 458...
317
 
458
 
318
 
459
 
Line 401... Line 542...
401
}
542
}
402
for i,v in ipairs(vfprintf_extra_objs) do
543
for i,v in ipairs(vfprintf_extra_objs) do
403
  LIB_OBJS += tup.rule("stdio/vfprintf.c", "kos32-gcc $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums " .. v[1] .. " -c %f -o %o", v[2])
544
  LIB_OBJS += tup.rule("stdio/vfprintf.c", "kos32-gcc $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums " .. v[1] .. " -c %f -o %o", v[2])
404
end
545
end
Line -... Line 546...
-
 
546
 
-
 
547
vfwprintf_extra_objs = {
-
 
548
  {"", "stdio/vfwprintf.o"},
-
 
549
  {"-DINTEGER_ONLY", "stdio/vfiwprintf.o"},
-
 
550
  {"-DSTRING_ONLY", "stdio/svfwprintf.o"},
-
 
551
  {"-DINTEGER_ONLY -DSTRING_ONLY", "stdio/svfiwprintf.o"},
-
 
552
}
-
 
553
for i,v in ipairs(vfwprintf_extra_objs) do
-
 
554
  LIB_OBJS += tup.rule("stdio/vfwprintf.c", "kos32-gcc $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums " .. v[1] .. " -c %f -o %o", v[2])
-
 
555
end
-
 
556
 
405
 
557
 
406
vfscanf_extra_objs = {
558
vfscanf_extra_objs = {
407
  {"", "stdio/vfscanf.o"},
559
  {"", "stdio/vfscanf.o"},
408
  {"-DINTEGER_ONLY", "stdio/vfiscanf.o"},
560
  {"-DINTEGER_ONLY", "stdio/vfiscanf.o"},
409
  {"-DSTRING_ONLY", "stdio/svscanf.o"},
561
  {"-DSTRING_ONLY", "stdio/svscanf.o"},
410
  {"-DINTEGER_ONLY -DSTRING_ONLY", "stdio/svfiscanf.o"},
562
  {"-DINTEGER_ONLY -DSTRING_ONLY", "stdio/svfiscanf.o"},
411
}
563
}
412
for i,v in ipairs(vfscanf_extra_objs) do
564
for i,v in ipairs(vfscanf_extra_objs) do
413
  LIB_OBJS += tup.rule("stdio/vfscanf.c", "kos32-gcc $(CFLAGS) $(DEFINES) $(INCLUDES) " .. v[1] .. " -c %f -o %o", v[2])
565
  LIB_OBJS += tup.rule("stdio/vfscanf.c", "kos32-gcc $(CFLAGS) $(DEFINES) $(INCLUDES) " .. v[1] .. " -c %f -o %o", v[2])
Line -... Line 566...
-
 
566
end
-
 
567
 
-
 
568
vfwscanf_extra_objs = {
-
 
569
  {"-DINTEGER_ONLY", "stdio/vfiwscanf.o"},
-
 
570
  {"-DSTRING_ONLY", "stdio/svfwscanf.o"},
-
 
571
  {"-DINTEGER_ONLY -DSTRING_ONLY", "stdio/svfiwscanf.o"},
-
 
572
}
-
 
573
for i,v in ipairs(vfscanf_extra_objs) do
-
 
574
  LIB_OBJS += tup.rule("stdio/vfwscanf.c", "kos32-gcc $(CFLAGS) $(DEFINES) $(INCLUDES) " .. v[1] .. " -c %f -o %o", v[2])
-
 
575
end
-
 
576
 
414
end
577
 
415
 
578
 
416
tup.rule(LIB_OBJS, "kos32-ld " .. LDFLAGS .. " " .. LIBPATH .. " -o %o %f -lgcc --version-script libc.ver " .. tup.getconfig("KPACK_CMD"),
579
tup.rule(LIB_OBJS, "kos32-ld " .. LDFLAGS .. " " .. LIBPATH .. " -o %o %f -lgcc --version-script libc.ver " .. tup.getconfig("KPACK_CMD"),