Subversion Repositories Kolibri OS

Rev

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

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