Subversion Repositories Kolibri OS

Rev

Rev 1908 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1906 serge 1
 
2
3
 
4
LDFLAGS = -nostdlib -shared -s -T libcdll.lds --out-implib libcimp.a --image-base 0
5
6
 
7
LIBC_INCLUDES = $(LIBC_TOPDIR)/include
8
9
 
10
11
 
12
13
 
14
15
 
16
			crt/crt_amz.S		\
17
			crt/chkstk.S		\
18
			crt/exit.S		\
19
			crt/pseudo-reloc.c	\
1908 serge 20
			crt/dllstart.c		\
2040 serge 21
			crt/setjmp.S
1906 serge 22
23
 
24
			crt/start.S		\
25
			crt/crt1.c		\
26
			crt/chkstk.S		\
27
			crt/exit.S		\
28
			crt/setjmp.S
29
30
 
31
			crt/crtdll.c		\
32
			crt/chkstk.S		\
33
			crt/exit.S		\
34
			crt/setjmp.S		\
35
			pe/loader.c
36
37
 
38
			argz/buf_findstr.c	\
39
			argz/envz_get.c		\
40
			crt/emutls.c		\
41
			crt/thread.S		\
42
			crt/tls.S		\
43
			crt/assert.c		\
44
			crt/cpu_features.c	\
45
			ctype/ctype_.c 		\
46
			ctype/isascii.c		\
47
			ctype/isblank.c		\
48
			ctype/isalnum.c 	\
49
			ctype/isalpha.c 	\
50
			ctype/iscntrl.c 	\
51
			ctype/isdigit.c 	\
52
			ctype/islower.c 	\
53
			ctype/isupper.c 	\
54
			ctype/isprint.c 	\
55
			ctype/ispunct.c 	\
56
			ctype/isspace.c 	\
57
			ctype/iswctype.c	\
58
			ctype/iswalnum.c	\
59
			ctype/iswalpha.c	\
60
			ctype/iswblank.c	\
61
			ctype/iswcntrl.c	\
62
			ctype/iswdigit.c	\
63
			ctype/iswgraph.c	\
64
			ctype/iswlower.c	\
65
			ctype/iswprint.c	\
66
			ctype/iswpunct.c	\
67
			ctype/iswspace.c	\
68
			ctype/iswupper.c	\
69
			ctype/iswxdigit.c	\
70
			ctype/isxdigit.c 	\
71
			ctype/toascii.c		\
72
			ctype/tolower.c 	\
73
			ctype/toupper.c		\
74
			ctype/towctrans.c	\
75
			ctype/towlower.c	\
76
			ctype/towupper.c	\
77
			ctype/wctrans.c		\
78
			ctype/wctype.c		\
79
			errno/errno.c		\
80
			locale/locale.c		\
81
			locale/lctype.c		\
82
			reent/impure.c		\
83
			reent/getreent.c	\
84
			reent/gettimeofdayr.c	\
85
			reent/hdlman.c		\
86
			reent/isattyr.c		\
87
			reent/openr.c		\
88
			reent/closer.c		\
89
			reent/readr.c		\
90
			reent/lseekr.c		\
91
			reent/fstatr.c		\
92
			reent/writer.c		\
93
			search/qsort.c		\
94
			search/bsearch.c	\
95
			signal/signal.c		\
96
			sys/create.c		\
97
			sys/delete.c		\
98
			sys/finfo.c		\
99
			sys/read.c		\
100
			sys/write.c		\
101
			sys/fsize.c		\
102
			sys/fload.c		\
103
			time/asctime.c		\
104
			time/asctime_r.c	\
105
			time/clock.c		\
106
			time/ctime.c		\
107
			time/ctime_r.c		\
108
			time/difftime.c		\
109
			time/gettzinfo.c	\
110
			time/gmtime.c		\
111
			time/gmtime_r.c		\
112
			time/mktime.c		\
113
			time/mktm_r.c		\
114
			time/lcltime.c		\
115
			time/lcltime_r.c	\
116
			time/strftime.c		\
117
			time/time.c		\
118
			time/tzlock.c		\
119
			time/tzvars.c		\
120
			unpack/unpacker.asm
121
122
 
123
 
124
			__atexit.c	\
125
			__call_atexit.c	\
126
			abort.c		\
127
			abs.c		\
128
			atof.c		\
129
			atoi.c		\
130
			div.c		\
131
			dtoa.c		\
132
			dtoastub.c	\
133
			exit.c		\
134
			gdtoa-gethex.c	\
135
			gdtoa-hexnan.c	\
136
			getenv.c	\
137
			mprec.c		\
138
			mbtowc.c	\
139
			mbtowc_r.c	\
140
			mbrtowc.c	\
141
			mlock.c		\
142
			calloc.c	\
143
			malloc.c	\
144
			mallocr.c	\
145
			rand.c		\
146
			rand_r.c	\
147
			rand48.c	\
148
			realloc.c	\
149
			seed48.c	\
150
			srand48.c	\
151
			strtod.c	\
152
			strtol.c	\
153
			strtold.c	\
154
			strtoll.c	\
155
			strtoll_r.c	\
156
			strtoul.c	\
157
			strtoull.c	\
158
			strtoull_r.c	\
159
			system.c	\
160
			wcrtomb.c	\
161
			wctomb_r.c
162
163
 
164
 
165
			memcmp.c	\
166
			memmove.c	\
167
			memset.c	\
168
			memchr.c	\
169
			strcat.c	\
170
			strchr.c	\
171
			strcmp.c	\
172
			strcoll.c	\
173
			strcasecmp.c	\
174
			strncasecmp.c	\
175
			strncat.c	\
176
			strncmp.c	\
177
			strncpy.c	\
178
			strndup.c	\
179
			strndup_r.c	\
180
			strnlen.c	\
181
			strcasestr.c	\
182
			strdup.c	\
183
			strdup_r.c	\
184
			strerror.c	\
185
			strlen.c	\
186
			strrchr.c	\
187
			strpbrk.c	\
188
			strsep.c	\
189
			strstr.c	\
190
			strtok.c	\
191
			strtok_r.c	\
192
			strupr.c	\
193
			strcspn.c	\
194
			strspn.c	\
195
			strcpy.c	\
196
			u_strerr.c
197
198
 
199
			printf.c	\
200
			putchar.c	\
201
			fgets.c		\
202
			fopen.c		\
203
			fclose.c	\
204
			fdopen.c	\
205
			fflush.c	\
206
			flags.c		\
207
			fileno.c	\
2040 serge 208
			findfp.c	\
1906 serge 209
			fiprintf.c	\
210
			fiscanf.c	\
211
			fprintf.c	\
212
			fputc.c		\
213
			fputs.c		\
214
			fputwc.c	\
215
			fread.c		\
216
			freopen.c	\
217
			fscanf.c	\
218
			fseek.c		\
219
			fseeko.c	\
220
			ftell.c		\
221
			ftello.c	\
222
			fwrite.c	\
223
			fvwrite.c	\
224
			fwalk.c		\
225
			putc.c		\
226
			puts.c		\
227
			refill.c	\
228
			rget.c		\
229
			remove.c	\
230
			rename.c	\
231
			setvbuf.c	\
232
			stdio.c		\
233
			tmpfile.c	\
234
			tmpnam.c	\
235
			ungetc.c	\
236
			vscanf.c	\
237
			vsprintf.c	\
238
			vsnprintf.c	\
239
			vsscanf.c	\
240
			makebuf.c	\
241
			wsetup.c	\
242
			wbuf.c		\
243
			sccl.c		\
244
			snprintf.c	\
245
			sprintf.c	\
246
			sscanf.c
247
248
 
249
 
250
		asinl.c atan2f.c atan2l.c atanf.c atanh.c atanhf.c atanhl.c atanl.c cbrt.c \
251
		cbrtf.c cbrtl.c coshf.c coshl.c erfl.c expf.c expl.c expm1.c expm1f.c expm1l.c\
252
		fabs.c fabsf.c fabsl.c fdim.c fdimf.c fdiml.c fmal.c fmax.c fmaxf.c fmaxl.c\
253
		fmin.c fminf.c fminl.c fmodf.c fmodl.c fp_consts.c fp_constsf.c fp_constsl.c\
254
		fpclassify.c fpclassifyf.c fpclassifyl.c frexpf.c fucom.c hypotf.c isnan.c \
255
		isnanf.c isnanl.c ldexp.c ldexpf.c ldexpl.c lgamma.c lgammaf.c lgammal.c \
256
		llrint.c llrintf.c llrintl.c logb.c logbf.c logbl.c lrint.c lrintf.c lrintl.c\
257
		lround_generic.c modff.c modfl.c nextafterf.c nextafterl.c nexttoward.c \
258
		nexttowardf.c pow.c powf.c powi.c powif.c powil.c powl.c rint.c rintf.c \
259
		rintl.c round_generic.c s_erf.c sf_erf.c signbit.c signbitf.c signbitl.c \
260
		sinhf.c sinhl.c sqrtf.c sqrtl.c tanhf.c tanhl.c tgamma.c tgammaf.c tgammal.c \
261
		trunc.c truncf.c truncl.c e_sqrt.c e_sinh.c e_cosh.c e_hypot.c s_tanh.c	\
262
		s_roundf.c s_fpclassify.c s_isnand.c w_hypot.c s_modf.c e_atan2.c w_atan2.c\
263
		ceil.S ceilf.S ceill.S copysign.S copysignf.S copysignl.S cos.S cosf.S cosl.S exp.S exp2.S \
264
		exp2f.S exp2l.S floor.S floorf.S floorl.S fma.S fmaf.S frexp.S frexpl.S ilogb.S ilogbf.S \
265
		ilogbl.S log10.S log10f.S log10l.S log1p.S log1pf.S log1pl.S log2.S log2f.S log2l.S \
266
		log.S logf.S logl.S nearbyint.S nearbyintf.S nearbyintl.S remainder.S remainderf.S \
267
		remainderl.S remquo.S remquof.S remquol.S scalbn.S scalbnf.S scalbnl.S sin.S \
268
		sinf.S sinl.S tan.S tanf.S tanl.S s_expm1.S
269
270
 
271
 
1908 serge 272
1906 serge 273
 
274
275
 
276
277
 
278
            $(patsubst %.c, %.o, $(CORE_SRCS))))
279
280
 
281
282
 
283
 
284
               $(patsubst %.c, string/%.o, $(STRING_SRCS))))
285
286
 
287
               $(patsubst %.c, stdlib/%.o, $(STDLIB_SRCS))))
288
289
 
290
 
291
               $(patsubst %.c, math/%.o, $(MATH_SRCS))))
292
293
 
294
 
295
		stdio/vfiprintf.o	\
296
		stdio/svfprintf.o	\
297
		stdio/svfiprintf.o	\
298
		stdio/vfscanf.o		\
299
		stdio/vfiscanf.o	\
300
		stdio/svscanf.o		\
301
		stdio/svfiscanf.o
302
303
 
304
305
 
306
LIB_OBJS:=  	$(STATIC_OBJS)
307
308
 
309
310
 
311
LIB_OBJS:=  	$(DLL_OBJS)
312
313
 
314
315
 
316
		$(CORE_SRCS)		\
317
		$(STDIO_SRCS) 		\
318
		$(STRING_SRCS)		\
319
		$(STDLIB_SRCS)
320
321
 
322
		$(CORE_OBJS) 		\
323
		$(STRING_OBJS) 		\
324
		$(STDLIB_OBJS)		\
325
		$(STDIO_OBJS) 		\
326
		$(PRINTF_OBJS) 		\
327
		$(MATH_OBJS)
328
329
 
330
 
331
 
1907 serge 332
1906 serge 333
 
334
 
335
	ld $(LDFLAGS) -L. -o $@ $(LIB_OBJS) -lgcc
336
337
 
338
 
339
	ar rc libamz.a $(AMZ_OBJS)
340
341
 
1907 serge 342
	fasm pe/libc.asm ./libc.obj
343
1906 serge 344
 
1907 serge 345
 
1906 serge 346
347
 
348
	ar rc $(NAME).a $(LIB_OBJS)
349
350
 
351
 
352
 
353
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DFLOATING_POINT -c stdio/vfprintf.c -o $@
354
355
 
356
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DINTEGER_ONLY -c stdio/vfprintf.c -o $@
357
358
 
359
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DSTRING_ONLY -c stdio/vfprintf.c -o $@
360
361
 
362
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c stdio/vfprintf.c -o $@
363
364
 
365
 
366
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES)	stdio/vfscanf.c -o $@
367
368
 
369
	$(CC) $(CFLAGS) $(DEFINES) -DINTEGER_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
370
371
 
372
	$(CC) $(CFLAGS) $(DEFINES) -DSTRING_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
373
374
 
375
 
376
	$(CC) $(CFLAGS) $(DEFINES) -DINTEGER_ONLY -DSTRING_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
377
378
 
379
 
380
 
381
	fasm $< $@
382
383
 
384
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
385
386
 
387
 
388
	-rm -f */*.o
389
390
 
391