Subversion Repositories Kolibri OS

Rev

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