Subversion Repositories Kolibri OS

Rev

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
 
4930 Serge 2
AR = kos32-ar
3
LD = kos32-ld
4
4349 Serge 5
 
4930 Serge 6
LDFLAGS = -nostdlib -shared -s -T libcdll.lds --output-def libc.orig.def --out-implib libc.dll.a --image-base 0
4349 Serge 7
ARFLAGS = crs
4930 Serge 8
4349 Serge 9
 
4930 Serge 10
11
 
4349 Serge 12
LIBC_INCLUDES = $(LIBC_TOPDIR)/include
13
14
 
15
16
 
17
18
 
19
20
 
4930 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
			locale/ldpart.c		\
4930 Serge 98
         		reent/impure.c       	\
4349 Serge 99
			reent/init_reent.c	\
100
	         	reent/getreent.c     	\
101
			reent/mutex.c		\
102
			reent/gettimeofdayr.c	\
103
			reent/isattyr.c		\
104
         		reent/openr.c        	\
105
         		reent/closer.c       	\
106
			reent/linkr.c		\
4930 Serge 107
         		reent/readr.c        	\
4349 Serge 108
         		reent/lseekr.c       	\
109
         		reent/fstatr.c       	\
110
         		reent/writer.c       	\
111
			reent/timesr.c		\
4930 Serge 112
			reent/unlinkr.c		\
113
         		search/qsort.c       	\
4349 Serge 114
         		search/bsearch.c     	\
115
			signal/signal.c		\
116
			sys/close.c		\
4930 Serge 117
         		sys/create.c         	\
4349 Serge 118
         		sys/delete.c         	\
119
			sys/errno.c		\
4930 Serge 120
         		sys/finfo.c          	\
4349 Serge 121
			sys/fsize.c          	\
4930 Serge 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           	\
4349 Serge 131
			sys/unlink.c		\
4930 Serge 132
         		sys/write.c          	\
4349 Serge 133
			sys/io_alloc.S		\
4930 Serge 134
         		time/asctime.c       	\
4349 Serge 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     	\
141
         		time/gmtime.c        	\
142
			time/gmtime_r.c		\
143
         		time/mktime.c        	\
144
         		time/mktm_r.c        	\
145
         		time/lcltime.c       	\
146
         		time/lcltime_r.c     	\
147
			time/strftime.c		\
148
         		time/time.c          	\
149
			time/timelocal.c	\
4930 Serge 150
         		time/tzlock.c        	\
4349 Serge 151
         		time/tzvars.c
152
153
 
154
 
155
         		__atexit.c          	\
156
         		__call_atexit.c     	\
157
         		abort.c              	\
158
         		abs.c               	\
159
			assert.c		\
4930 Serge 160
			atexit.c		\
161
         		atof.c              	\
4349 Serge 162
         		atoi.c              	\
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
         		memcmp.c             	\
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
 
235
			clearerr.c		\
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
		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 		\
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
 
332
333
 
334
335
 
336
337
 
338
            $(patsubst %.c, %.o, $(CORE_SRCS))))
339
340
 
341
342
 
343
 
344
               $(patsubst %.c, string/%.o, $(STRING_SRCS))))
345
346
 
347
               $(patsubst %.c, stdlib/%.o, $(STDLIB_SRCS))))
348
349
 
350
 
351
               $(patsubst %.c, math/%.o, $(MATH_SRCS))))
352
353
 
354
 
355
		stdio/vfiprintf.o	\
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
 
364
365
 
366
LIB_OBJS:=  	$(STATIC_OBJS)
367
368
 
369
370
 
371
LIB_OBJS:=  	$(LIBCDLL_OBJS)
372
373
 
374
375
 
376
		$(CORE_SRCS)		\
377
		$(STDIO_SRCS) 		\
378
		$(STRING_SRCS)		\
379
		$(STDLIB_SRCS)
380
381
 
382
		$(CORE_OBJS) 		\
383
		$(STRING_OBJS) 		\
384
		$(STDLIB_OBJS)		\
385
		$(STDIO_OBJS) 		\
386
		$(PRINTF_OBJS) 		\
387
		$(MATH_OBJS)
388
389
 
390
 
391
 
392
393
 
394
 
395
	$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIB_OBJS) -lgcc --version-script libc.ver
4930 Serge 396
#sed -e "s/ @[^ ]*//" libc.orig.def > libc.def
6777 siemargl 397
#sed -f cmd2.sed libc.def > mem
398
#sed -f newlib.sed mem > libc.inc
399
4349 Serge 400
 
401
	mv -f libc.dll $(SDK_DIR)/bin
4930 Serge 402
	mv -f libc.dll.a $(SDK_DIR)/lib
403
	mv -f libapp.a $(SDK_DIR)/lib
404
	mv -f libdll.a $(SDK_DIR)/lib
405
4349 Serge 406
 
407
	$(AR) $(ARFLAGS) libapp.a $(LIBCRT_OBJS)
4930 Serge 408
4349 Serge 409
 
410
	$(AR) $(ARFLAGS) libdll.a $(LIBDLL_OBJS)
4930 Serge 411
4349 Serge 412
 
413
 
414
415
 
416
	$(AR) $(ARFLAGS) $(NAME).a $(LIB_OBJS)
4930 Serge 417
4349 Serge 418
 
419
 
420
 
421
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DFLOATING_POINT -c stdio/vfprintf.c -o $@
422
423
 
424
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DINTEGER_ONLY -c stdio/vfprintf.c -o $@
425
426
 
427
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DSTRING_ONLY -c stdio/vfprintf.c -o $@
428
429
 
430
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c stdio/vfprintf.c -o $@
431
432
 
433
 
434
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES)	stdio/vfscanf.c -o $@
435
436
 
437
	$(CC) $(CFLAGS) $(DEFINES) -DINTEGER_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
438
439
 
440
	$(CC) $(CFLAGS) $(DEFINES) -DSTRING_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
441
442
 
443
 
444
	$(CC) $(CFLAGS) $(DEFINES) -DINTEGER_ONLY -DSTRING_ONLY $(INCLUDES) stdio/vfscanf.c -o $@
445
446
 
447
 
448
 
449
	fasm $< $
450
451
 
452
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
453
454
 
455
 
456
	-rm -f */*.o
457
458
 
459
 
460
 
461