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