Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
4349 Serge 1
 
2
AR = ar rc
3
LD = ld
4
5
 
6
LDFLAGS = -nostdlib -shared -s -T libcdll.lds --output-def libc.orig.def --out-implib libc.dll.a --image-base 0
7
8
 
9
LIBC_INCLUDES = $(LIBC_TOPDIR)/include
10
11
 
12
13
 
14
15
 
16
17
 
4362 Serge 18
4349 Serge 19
 
20
         		crt/start.S		\
21
         		crt/crt1.c		\
22
			crt/crt2.c		\
23
         		crt/chkstk.S		\
24
         		crt/exit.S		\
25
			pe/crtloader.c
26
27
 
28
			crt/dllstart.c 		\
29
         		crt/chkstk.S         	\
30
         		crt/exit.S           	\
31
			crt/pseudo-reloc.c	\
32
			crt/setjmp.S
33
34
 
35
 
36
			crt/crtdll.c		\
37
			crt/pseudo-reloc.c	\
38
			crt/chkstk.S		\
39
			crt/exit.S		\
40
			pe/loader.c
41
42
 
43
			crt/start.S		\
44
			crt/chkstk.S		\
45
			crt/crt3.c		\
46
			crt/pseudo-reloc.c	\
47
			pe/crtloader.c
48
49
 
50
			argz/buf_findstr.c	\
51
			argz/envz_get.c		\
52
         		crt/emutls.c         	\
53
         		crt/thread.S         	\
54
         		crt/tls.S            	\
55
			crt/setjmp.S		\
56
         		crt/assert.c         	\
57
			crt/cpu_features.c	\
58
			ctype/ctype_.c 		\
59
			ctype/isascii.c		\
60
			ctype/isblank.c		\
61
         		ctype/isalnum.c      	\
62
         		ctype/isalpha.c      	\
63
         		ctype/iscntrl.c      	\
64
         		ctype/isdigit.c      	\
65
         		ctype/islower.c      	\
66
			ctype/isupper.c      	\
67
         		ctype/isprint.c      	\
68
         		ctype/ispunct.c      	\
69
         		ctype/isspace.c      	\
70
         		ctype/iswctype.c     	\
71
         		ctype/iswalnum.c     	\
72
         		ctype/iswalpha.c     	\
73
         		ctype/iswblank.c     	\
74
         		ctype/iswcntrl.c     	\
75
         		ctype/iswdigit.c     	\
76
         		ctype/iswgraph.c     	\
77
         		ctype/iswlower.c     	\
78
         		ctype/iswprint.c     	\
79
         		ctype/iswpunct.c     	\
80
         		ctype/iswspace.c     	\
81
         		ctype/iswupper.c     	\
82
         		ctype/iswxdigit.c    	\
83
         		ctype/isxdigit.c     	\
84
			ctype/toascii.c		\
85
         		ctype/tolower.c      	\
86
			ctype/toupper.c		\
87
         		ctype/towctrans.c    	\
88
         		ctype/towlower.c     	\
89
         		ctype/towupper.c     	\
90
			ctype/wctrans.c		\
91
         		ctype/wctype.c       	\
92
         		errno/errno.c        	\
93
			locale/locale.c		\
94
			locale/lctype.c		\
95
         		reent/impure.c       	\
96
			reent/init_reent.c	\
97
	         	reent/getreent.c     	\
98
			reent/mutex.c		\
99
			reent/gettimeofdayr.c	\
100
         		reent/hdlman.c       	\
101
			reent/isattyr.c		\
102
         		reent/openr.c        	\
103
         		reent/closer.c       	\
104
         		reent/readr.c        	\
105
         		reent/lseekr.c       	\
106
         		reent/fstatr.c       	\
107
         		reent/writer.c       	\
108
         		search/qsort.c       	\
109
         		search/bsearch.c     	\
110
			signal/signal.c		\
111
         		sys/create.c         	\
112
         		sys/delete.c         	\
113
         		sys/finfo.c          	\
114
         		sys/read.c           	\
115
         		sys/write.c          	\
116
         		sys/fsize.c          	\
117
         		time/asctime.c       	\
118
         		time/asctime_r.c     	\
119
         		time/clock.c         	\
120
         		time/ctime.c         	\
121
         		time/ctime_r.c       	\
122
			time/difftime.c		\
123
         		time/gettzinfo.c     	\
124
         		time/gmtime.c        	\
125
			time/gmtime_r.c		\
126
         		time/mktime.c        	\
127
         		time/mktm_r.c        	\
128
         		time/lcltime.c       	\
129
         		time/lcltime_r.c     	\
130
			time/strftime.c		\
131
         		time/time.c          	\
132
         		time/tzlock.c        	\
133
         		time/tzvars.c
134
135
 
136
 
137
         		__atexit.c          	\
138
         		__call_atexit.c     	\
139
         		abort.c              	\
140
         		abs.c               	\
141
         		atof.c              	\
142
         		atoi.c              	\
143
			atol.c			\
144
         		div.c               	\
145
         		dtoa.c               	\
146
         		dtoastub.c          	\
147
         		exit.c              	\
148
         		gdtoa-gethex.c      	\
149
         		gdtoa-hexnan.c       	\
150
         		getenv.c             	\
151
         		mprec.c              	\
152
         		mbtowc.c             	\
153
         		mbtowc_r.c           	\
154
         		mbrtowc.c           	\
155
         		mlock.c              	\
156
         		calloc.c             	\
157
         		malloc.c             	\
158
        		mallocr.c           	\
159
        		 rand.c               	\
160
         		rand_r.c            	\
161
         		rand48.c            	\
162
         		realloc.c            	\
163
         		seed48.c             	\
164
         		srand48.c            	\
165
         		strtod.c            	\
166
         		strtol.c             	\
167
         		strtold.c            	\
168
         		strtoll.c            	\
169
         		strtoll_r.c         	\
170
         		strtoul.c            	\
171
         		strtoull.c           	\
172
         		strtoull_r.c        	\
173
         		system.c            	\
174
         		wcrtomb.c           	\
175
			wctomb_r.c
176
177
 
178
 
179
         		memcmp.c             	\
180
         		memmove.c            	\
181
         		memset.c             	\
182
         		memchr.c             	\
183
			stpcpy.c	     	\
184
			stpncpy.c		\
185
			strcat.c            	\
186
         		strchr.c           	\
187
         		strcmp.c             \
188
         		strcoll.c            \
189
         		strcasecmp.c         \
190
         		strncasecmp.c        \
191
         		strncat.c            \
192
         		strncmp.c            \
193
         		strncpy.c            \
194
         		strndup.c            \
195
         		strndup_r.c          \
196
         		strnlen.c            \
197
         		strcasestr.c         \
198
         		strdup.c             \
199
         		strdup_r.c           \
200
         		strerror.c           \
201
         		strlen.c             \
202
         		strrchr.c            \
203
         		strpbrk.c            \
204
         		strsep.c             \
205
         		strstr.c             \
206
         		strtok.c             \
207
         		strtok_r.c           \
208
         		strupr.c             \
209
         		strcspn.c            \
210
         		strspn.c             \
211
         		strcpy.c             \
212
			u_strerr.c
213
214
 
215
			clearerr.c		\
216
			diprintf.c		\
217
			dprintf.c		\
218
			printf.c		\
219
			putchar.c		\
220
			fgetc.c			\
221
			fgets.c			\
222
			fopen.c			\
223
			fclose.c		\
224
			fdopen.c		\
225
			fflush.c		\
226
			flags.c			\
227
			fileno.c		\
228
			findfp.c		\
229
			fiprintf.c		\
230
			fiscanf.c		\
231
			fprintf.c		\
232
			fputc.c			\
233
			fputs.c			\
234
			fputwc.c		\
235
			fread.c			\
236
			freopen.c		\
237
			fscanf.c		\
238
			fseek.c			\
239
			fseeko.c		\
240
			ftell.c			\
241
			ftello.c		\
242
			fwrite.c		\
243
			fvwrite.c		\
244
			fwalk.c			\
245
			putc.c			\
246
			puts.c			\
247
			refill.c		\
248
			rget.c			\
249
			remove.c		\
250
			rename.c		\
251
			setvbuf.c		\
252
			stdio.c			\
253
			tmpfile.c		\
254
			tmpnam.c		\
255
			ungetc.c		\
256
			vasniprintf.c		\
257
			vasnprintf.c		\
258
			vdprintf.c		\
259
			vdiprintf.c		\
260
			vscanf.c		\
261
			vsprintf.c		\
262
			vsnprintf.c		\
263
			vsscanf.c		\
264
			makebuf.c		\
265
			wsetup.c		\
266
			wbuf.c			\
267
			sccl.c			\
268
			siprintf.c		\
269
			sniprintf.c		\
270
			snprintf.c		\
271
			sprintf.c		\
272
			sscanf.c
273
274
 
275
 
276
		e_hypot.c e_j0.c e_j1.c e_jn.c e_log.c e_log10.c e_pow.c e_rem_pio2.c 		\
277
		e_remainder.c e_scalb.c e_sinh.c e_sqrt.c ef_acos.c ef_acosh.c ef_asin.c	\
278
		ef_atan2.c ef_atanh.c ef_cosh.c ef_exp.c ef_fmod.c ef_hypot.c ef_j0.c ef_j1.c	\
279
		ef_jn.c ef_log.c ef_log10.c ef_pow.c ef_rem_pio2.c ef_remainder.c ef_scalb.c	\
280
		ef_sinh.c ef_sqrt.c er_gamma.c er_lgamma.c erf_gamma.c erf_lgamma.c f_exp.c	\
281
		f_expf.c f_llrint.c f_llrintf.c f_llrintl.c f_lrint.c f_lrintf.c f_lrintl.c	\
282
		f_pow.c f_powf.c f_rint.c f_rintf.c f_rintl.c k_cos.c k_rem_pio2.c k_sin.c	\
283
		k_standard.c k_tan.c kf_cos.c kf_rem_pio2.c kf_sin.c kf_tan.c s_asinh.c 	\
284
		s_atan.c s_cbrt.c s_ceil.c s_copysign.c s_cos.c s_erf.c s_exp10.c s_expm1.c	\
285
		s_fabs.c s_fdim.c s_finite.c s_floor.c s_fma.c s_fmax.c s_fmin.c s_fpclassify.c	\
286
		s_frexp.c s_ilogb.c s_infconst.c s_infinity.c s_isinf.c s_isinfd.c s_isnan.c	\
287
		s_isnand.c s_ldexp.c s_lib_ver.c s_llrint.c s_llround.c s_log1p.c s_log2.c	\
288
		s_logb.c s_lrint.c s_lround.c s_matherr.c s_modf.c s_nan.c s_nearbyint.c	\
289
		s_nextafter.c s_pow10.c s_remquo.c s_rint.c s_round.c s_scalbln.c s_scalbn.c	\
290
		s_signbit.c s_signif.c s_sin.c s_tan.c s_tanh.c s_trunc.c scalblnl.c scalbnl.c	\
291
		sf_asinh.c sf_atan.c sf_cbrt.c sf_ceil.c sf_copysign.c sf_cos.c sf_erf.c 	\
292
		sf_exp10.c sf_expm1.c sf_fabs.c sf_fdim.c sf_finite.c sf_floor.c sf_fma.c	\
293
		sf_fmax.c sf_fmin.c sf_fpclassify.c sf_frexp.c sf_ilogb.c sf_infinity.c		\
294
		sf_isinf.c sf_isinff.c sf_isnan.c sf_isnanf.c sf_ldexp.c sf_llrint.c		\
295
		sf_llround.c sf_log1p.c sf_log2.c sf_logb.c sf_lrint.c sf_lround.c sf_modf.c	\
296
		sf_nan.c sf_nearbyint.c sf_nextafter.c sf_pow10.c sf_remquo.c sf_rint.c		\
297
		sf_round.c sf_scalbln.c sf_scalbn.c sf_signif.c sf_sin.c sf_tan.c sf_tanh.c	\
298
		sf_trunc.c w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c w_cosh.c w_drem.c	\
299
		w_exp.c w_exp2.c w_fmod.c w_gamma.c w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c	\
300
		w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sincos.c w_sinh.c w_sqrt.c	\
301
		w_tgamma.c wf_acos.c wf_acosh.c wf_asin.c wf_atan2.c wf_atanh.c wf_cosh.c	\
302
		wf_drem.c wf_exp.c wf_exp2.c wf_fmod.c wf_gamma.c wf_hypot.c wf_j0.c wf_j1.c	\
303
		wf_jn.c wf_lgamma.c wf_log.c wf_log10.c wf_pow.c wf_remainder.c wf_scalb.c	\
304
		wf_sincos.c wf_sinh.c wf_sqrt.c wf_tgamma.c wr_gamma.c wr_lgamma.c wrf_gamma.c	\
305
		wrf_lgamma.c	\
306
		f_atan2.S f_atan2f.S f_frexp.S f_frexpf.S f_ldexp.S f_ldexpf.S f_log.S		\
307
		f_log10.S f_log10f.S f_logf.S f_tan.S f_tanf.S
308
309
 
310
 
311
312
 
313
314
 
315
316
 
317
318
 
319
            $(patsubst %.c, %.o, $(CORE_SRCS))))
320
321
 
322
323
 
324
 
325
               $(patsubst %.c, string/%.o, $(STRING_SRCS))))
326
327
 
328
               $(patsubst %.c, stdlib/%.o, $(STDLIB_SRCS))))
329
330
 
331
 
332
               $(patsubst %.c, math/%.o, $(MATH_SRCS))))
333
334
 
335
 
336
		stdio/vfiprintf.o	\
337
		stdio/svfprintf.o	\
338
		stdio/svfiprintf.o	\
339
		stdio/vfscanf.o		\
340
		stdio/vfiscanf.o	\
341
		stdio/svscanf.o		\
342
		stdio/svfiscanf.o
343
344
 
345
346
 
347
LIB_OBJS:=  	$(STATIC_OBJS)
348
349
 
350
351
 
352
LIB_OBJS:=  	$(LIBCDLL_OBJS)
353
354
 
355
356
 
357
		$(CORE_SRCS)		\
358
		$(STDIO_SRCS) 		\
359
		$(STRING_SRCS)		\
360
		$(STDLIB_SRCS)
361
362
 
363
		$(CORE_OBJS) 		\
364
		$(STRING_OBJS) 		\
365
		$(STDLIB_OBJS)		\
366
		$(STDIO_OBJS) 		\
367
		$(PRINTF_OBJS) 		\
368
		$(MATH_OBJS)
369
370
 
371
 
372
 
373
374
 
375
 
376
	$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIB_OBJS) -lgcc --version-script libc.ver
377
	sed -e "s/ @[^ ]*//" libc.orig.def > libc.def
378
	sed -f cmd2.sed libc.def > mem
379
	sed -f newlib.sed mem > libc.inc
380
381
 
382
	mv -f libc.dll ../../bin
4362 Serge 383
	mv -f libc.dll.a ../../lib
384
	mv -f libapp.a ../../lib
385
	mv -f libdll.a ../../lib
386
4349 Serge 387
 
388
	$(AR) libapp.a $(LIBCRT_OBJS)
389
390
 
391
	$(AR) libdll.a $(LIBDLL_OBJS)
392
393
 
394
 
395
396
 
397
	$(AR) $(NAME).a $(LIB_OBJS)
398
399
 
400
 
401
 
402
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DFLOATING_POINT -c stdio/vfprintf.c -o $@
403
404
 
405
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DINTEGER_ONLY -c stdio/vfprintf.c -o $@
406
407
 
408
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DSTRING_ONLY -c stdio/vfprintf.c -o $@
409
410
 
411
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c stdio/vfprintf.c -o $@
412
413
 
414
 
415
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES)	stdio/vfscanf.c -o $@
416
417
 
418
	$(CC) $(CFLAGS) $(DEFINES) -DINTEGER_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
419
420
 
421
	$(CC) $(CFLAGS) $(DEFINES) -DSTRING_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
422
423
 
424
 
425
	$(CC) $(CFLAGS) $(DEFINES) -DINTEGER_ONLY -DSTRING_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
426
427
 
428
 
429
 
430
	fasm $< $
431
432
 
433
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
434
435
 
436
 
437
	-rm -f */*.o
438
439
 
440
 
441
 
442