1SubDir HAIKU_TOP src system libroot posix glibc arch x86 ;
2
3SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch $(TARGET_ARCH) ;
4SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
5SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
6SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc libio ;
7SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc stdlib ;
8SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc math ;
9SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ;
10
11SubDirHdrs $(HAIKU_TOP) src system libroot posix glibc arch generic ;
12
13UsePrivateHeaders libroot ;
14
15if $(OPTIM) = -O0 {
16	OPTIM = -O ;
17}
18
19# don't compile with debugging
20DEBUG = 0 ;
21
22SubDirCcFlags -D_GNU_SOURCE -D_IEEE_LIBM ;
23
24local genericSources =
25	cmp.c dbl2mpn.c divrem.c 
26	memrchr.c
27	mpn2dbl.c mpn2flt.c mpn2ldbl.c
28	mul.c mul_n.c
29	e_cosh.c e_coshf.c e_coshl.c
30	e_sinh.c e_sinhf.c e_sinhl.c
31	e_asinl.c
32	e_gamma_r.c e_gammaf_r.c e_gammal_r.c
33	e_j0.c e_j0f.c
34	e_j1.c e_j1f.c
35	e_jn.c e_jnf.c
36	e_hypotl.c
37	e_lgamma_r.c e_lgammaf_r.c e_lgammal_r.c
38	k_cos.c k_cosf.c
39	k_sin.c k_sinf.c
40	k_tan.c k_tanf.c
41	s_cacos.c s_cacosf.c
42	s_cacosh.c s_cacoshf.c
43	s_casin.c s_casinf.c
44	s_casinh.c s_casinhf.c
45	s_catan.c s_catanf.c
46	s_catanh.c s_catanhf.c
47	s_ccos.c s_ccosf.c #s_ccosl.c
48	s_ccosh.c s_ccoshf.c #s_ccoshl.c
49	s_clog.c s_clogf.c #s_clogl.c
50	s_clog10.c s_clog10f.c #s_clog10l.c
51	s_cpow.c s_cpowf.c #s_cpowl.c
52	s_cproj.c s_cprojf.c #s_cprojl.c
53	s_csin.c s_csinf.c #s_csinl.c
54	s_csinh.c s_csinhf.c #s_csinhl.c
55	s_csqrt.c s_csqrtf.c #s_csqrtl.c
56	s_ctan.c s_ctanf.c #s_ctanl.c
57	s_ctanh.c s_ctanhf.c #s_ctanhl.c
58	s_erf.c s_erff.c s_erfl.c
59	s_fpclassify.c s_fpclassifyf.c # s_fpclassifyl.c
60	s_isinf.c s_isinff.c
61	s_isnan.c s_isnanf.c
62	s_ldexp.c s_ldexpf.c #s_ldexpl.c
63	s_llround.c s_llroundf.c s_llroundl.c
64	s_lround.c s_lroundf.c s_lroundl.c
65	s_matherr.c
66	s_modf.c s_modff.c s_modfl.c
67	s_nan.c s_nanf.c s_nanl.c
68	s_nextafter.c s_nextafterf.c
69	s_nexttowardl.c
70	s_signbit.c s_signbitf.c s_signbitl.c
71	s_round.c s_roundf.c s_roundl.c
72	s_signgam.c
73	s_tanh.c s_tanhf.c
74
75	w_acos.c w_acosf.c w_acosl.c
76	w_acosh.c w_acoshf.c w_acoshl.c
77	w_asin.c w_asinf.c w_asinl.c
78	w_atan2.c w_atan2f.c w_atan2l.c
79	w_atanh.c w_atanhf.c w_atanhl.c
80	w_cosh.c w_coshf.c w_coshl.c
81	w_drem.c w_dremf.c w_dreml.c
82	w_exp.c w_expf.c w_expl.c
83	w_exp10.c w_exp10f.c w_exp10l.c
84	w_exp2.c w_exp2f.c w_exp2l.c
85	w_fmod.c w_fmodf.c w_fmodl.c
86	w_hypot.c w_hypotf.c w_hypotl.c
87	w_j0.c w_j0f.c
88	w_j1.c w_j1f.c
89	w_jn.c w_jnf.c
90	w_lgamma.c w_lgammaf.c w_lgammal.c
91	w_lgamma_r.c w_lgammaf_r.c w_lgammal_r.c
92	w_log.c w_logf.c w_logl.c
93	w_log10.c w_log10f.c w_log10l.c
94	w_log2.c w_log2f.c w_log2l.c
95	w_pow.c w_powf.c w_powl.c
96	w_remainder.c w_remainderf.c w_remainderl.c
97	w_scalb.c w_scalbf.c w_scalbl.c
98	w_sinh.c w_sinhf.c w_sinhl.c
99	w_sqrt.c w_sqrtf.c w_sqrtl.c
100	w_tgamma.c w_tgammaf.c w_tgammal.c
101;
102
103MergeObject posix_gnu_arch_$(TARGET_ARCH)_other.o :
104	add_n.S
105	addmul_1.S
106	fegetround.c
107	fesetround.c
108	fraiseexcpt.c
109	ldbl2mpn.c
110	mpa.c mpatan.c mpatan2.c mptan.c
111	
112	mplog.c
113	mul_1.S
114	lshift.S rshift.S
115	sub_n.S
116	submul_1.S
117;
118
119
120MergeObject posix_gnu_arch_$(TARGET_ARCH)_e.o :
121	e_acos.S e_acosf.S e_acosl.c
122	e_acosh.S e_acoshf.S e_acoshl.S
123	e_asin.S e_asinf.S
124	e_atan2.S e_atan2f.S e_atan2l.c
125	e_atanh.S e_atanhf.S e_atanhl.S
126	e_exp.S e_expf.S e_expl.c
127	e_exp2.S e_exp2f.S e_exp2l.S
128	e_exp10.S e_exp10f.S e_exp10l.S
129	e_fmod.S e_fmodf.S e_fmodl.c
130	e_hypot.S e_hypotf.S
131	e_log.S e_logf.S e_logl.S
132	e_log2.S e_log2f.S e_log2l.S
133	e_log10.S e_log10f.S e_log10l.S
134	e_pow.S e_powf.S e_powl.S
135	e_remainder.S e_remainderf.S e_remainderl.S
136	e_scalb.S e_scalbf.S e_scalbl.S
137	e_sqrt.S e_sqrtf.S e_sqrtl.c
138;
139
140MergeObject posix_gnu_arch_$(TARGET_ARCH)_s.o :
141	s_asinh.S s_asinhf.S s_asinhl.S
142	s_atan.S s_atanf.S s_atanl.c
143	s_cbrt.S s_cbrtf.S s_cbrtl.S
144	s_ceil.S s_ceilf.S s_ceill.S
145	s_cexp.S s_cexpf.S s_cexpl.S
146	s_copysign.S s_copysignf.S s_copysignl.S
147	s_cos.S s_cosf.S s_cosl.S
148	s_expm1.S s_expm1f.S s_expm1l.S
149	s_fdim.S s_fdimf.S s_fdiml.S
150	s_fabs.S s_fabsf.S s_fabsl.S
151	s_finite.S s_finitef.S s_finitel.S
152	s_floor.S s_floorf.S s_floorl.S
153	s_fma.S s_fmaf.S s_fmal.S
154	s_fmax.S s_fmaxf.S s_fmaxl.S
155	s_fmin.S s_fminf.S s_fminl.S
156	s_fpclassifyl.c
157	s_frexp.S s_frexpf.S s_frexpl.S
158	s_ilogb.S s_ilogbf.S
159	s_isinfl.c
160	s_isnanl.c
161	s_llrint.S s_llrintf.S s_llrintl.S
162	s_log1p.S s_log1pf.S s_log1pl.S
163	s_logb.S s_logbf.S s_logbl.c
164	s_lrint.S s_lrintf.S s_lrintl.S
165	s_nearbyint.S s_nearbyintf.S s_nearbyintl.S
166	s_nextafterl.c
167	s_nexttoward.c s_nexttowardf.c
168	s_remquo.S s_remquof.S s_remquol.S
169	s_rint.S s_rintf.S s_rintl.c
170	s_scalbln.c s_scalblnf.c s_scalblnl.c
171	s_scalbn.S s_scalbnf.S s_scalbnl.S
172	s_significand.S s_significandf.S
173	s_sin.S s_sinf.S s_sinl.S
174	s_sincos.S s_sincosf.S s_sincosl.S
175	s_tan.S s_tanf.S s_tanl.S
176	s_trunc.S s_truncf.S s_truncl.S
177;
178
179MergeObject posix_gnu_arch_$(TARGET_ARCH)_generic.o :
180	$(genericSources)
181;
182
183MergeObjectFromObjects posix_gnu_arch_$(TARGET_ARCH).o : :
184	posix_gnu_arch_$(TARGET_ARCH)_e.o
185	posix_gnu_arch_$(TARGET_ARCH)_generic.o
186	posix_gnu_arch_$(TARGET_ARCH)_other.o
187	posix_gnu_arch_$(TARGET_ARCH)_s.o
188;
189
190SEARCH on [ FGristFiles $(genericSources) ]
191	= [ FDirName $(HAIKU_TOP) src system libroot posix glibc arch generic ] ;
192