Subversion Repositories Kolibri OS

Rev

Rev 3809 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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