xref: /haiku/src/system/libroot/posix/glibc/arch/x86_64/Jamfile (revision efafab643ce980e3f3c916795ed302599f6b4f66)
1SubDir HAIKU_TOP src system libroot posix glibc arch x86_64 ;
2
3SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch x86_64 ;
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 -DPIC ;
23SubDirAsFlags -DPIC ;
24
25local genericSources =
26	cmp.c dbl2mpn.c divrem.c
27	memrchr.c
28	mpn2dbl.c mpn2flt.c mpn2ldbl.c
29	mul.c mul_n.c
30
31	branred.c doasin.c dosincos.c halfulp.c mpa.c mpatan.c mpatan2.c mpexp.c
32	mplog.c mpsqrt.c mptan.c sincos32.c slowexp.c slowpow.c
33
34	e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_acoshl.c e_asin.c e_asinf.c
35	e_asinl.c e_atan2.c e_atan2f.c e_atanh.c e_atanhf.c e_atanhl.c e_cosh.c
36	e_coshf.c e_coshl.c e_exp.c e_exp10.c e_exp10f.c e_exp10l.c e_exp2.c
37	e_exp2f.c e_expf.c e_fmod.c e_fmodf.c e_gamma_r.c e_gammaf_r.c e_gammal_r.c
38	e_hypot.c e_hypotf.c e_hypotl.c e_ilogbl.c e_j0.c e_j0f.c e_j0l.c e_j1.c
39	e_j1f.c	e_j1l.c e_jn.c e_jnf.c e_jnl.c e_lgamma_r.c e_lgammaf_r.c
40	e_lgammal_r.c e_log.c e_log10.c e_log10f.c e_log2.c e_log2f.c e_logf.c e_pow.c
41	e_powf.c e_rem_pio2.c e_rem_pio2f.c e_remainder.c e_remainderf.c e_scalb.c
42	e_scalbf.c e_sinh.c e_sinhf.c e_sinhl.c
43
44	k_cos.c k_cosf.c k_rem_pio2.c k_rem_pio2f.c k_sin.c k_sinf.c k_tan.c
45	k_tanf.c
46
47	s_asinh.c s_asinhf.c s_asinhl.c s_atan.c s_atanf.c s_cacos.c s_cacosf.c
48	s_cacosh.c s_cacoshf.c s_cacoshl.c s_cacosl.c s_casin.c s_casinf.c
49	s_casinh.c s_casinhf.c s_casinhl.c s_casinl.c s_catan.c s_catanf.c
50	s_catanh.c s_catanhf.c s_catanhl.c s_catanl.c s_cbrt.c s_cbrtf.c
51	s_cbrtl.c s_ccos.c s_ccosf.c s_ccosh.c s_ccoshf.c s_ccoshl.c s_ccosl.c
52	s_ceil.c s_ceilf.c s_cexp.c s_cexpf.c s_cexpl.c s_clog.c s_clog10.c
53	s_clog10f.c s_clog10l.c s_clogf.c s_clogl.c s_cos.c s_cosf.c s_cpow.c
54	s_cpowf.c s_cpowl.c s_cproj.c s_cprojf.c s_cprojl.c s_csin.c s_csinf.c
55	s_csinh.c s_csinhf.c s_csinhl.c s_csinl.c s_csqrt.c s_csqrtf.c s_csqrtl.c
56	s_ctan.c s_ctanf.c s_ctanh.c s_ctanhf.c s_ctanhl.c s_ctanl.c s_erf.c
57	s_erff.c s_erfl.c s_expm1.c s_expm1f.c s_fdim.c s_fdimf.c s_finite.c
58	s_finitef.c s_floor.c s_floorf.c s_fma.c s_fmaf.c s_fmal.c s_fpclassify.c
59	s_fpclassifyf.c s_frexp.c s_frexpf.c s_frexpl.c s_ilogb.c s_ilogbf.c
60	s_isinf.c s_isinff.c s_isnan.c s_isnanf.c s_ldexp.c s_ldexpf.c s_ldexpl.c
61	s_llround.c s_llroundf.c s_llroundl.c s_log1p.c s_log1pf.c s_logb.c
62	s_logbf.c s_lround.c s_lroundf.c s_lroundl.c s_matherr.c s_modf.c s_modff.c
63	s_modfl.c s_nan.c s_nanf.c s_nanl.c s_nearbyint.c s_nearbyintf.c
64	s_nextafter.c s_nextafterf.c s_nexttowardl.c s_remquo.c s_remquof.c
65	s_remquol.c s_rint.c s_rintf.c s_round.c s_roundf.c s_roundl.c s_scalbln.c
66	s_scalblnf.c s_scalblnl.c s_scalbn.c s_scalbnf.c s_signbit.c s_signbitf.c
67	s_signbitl.c s_signgam.c s_significand.c s_significandf.c s_sin.c
68	s_sincosf.c s_sinf.c s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_tanhl.c
69	s_trunc.c s_truncf.c
70
71	t_exp.c
72
73	w_acos.c w_acosf.c w_acosh.c w_acoshf.c w_acoshl.c w_acosl.c w_asin.c
74	w_asinf.c w_asinl.c w_atan2.c w_atan2f.c w_atan2l.c w_atanh.c w_atanhf.c
75	w_atanhl.c w_cosh.c w_coshf.c w_coshl.c w_drem.c w_dremf.c w_dreml.c
76	w_exp.c w_exp10.c w_exp10f.c w_exp10l.c w_exp2.c w_exp2f.c w_exp2l.c
77	w_expf.c w_expl.c w_fmod.c w_fmodf.c w_fmodl.c w_hypot.c w_hypotf.c
78	w_hypotl.c w_j0.c w_j0f.c w_j0l.c w_j1.c w_j1f.c w_j1l.c w_jn.c w_jnf.c
79	w_jnl.c w_lgamma.c w_lgamma_r.c w_lgammaf.c w_lgammaf_r.c w_lgammal.c
80	w_lgammal_r.c w_log.c w_log10.c w_log10f.c w_log10l.c w_log2.c w_log2f.c
81	w_log2l.c w_logf.c w_logl.c w_pow.c w_powf.c w_powl.c w_remainder.c
82	w_remainderf.c w_remainderl.c w_scalb.c w_scalbf.c w_scalbl.c w_sinh.c
83	w_sinhf.c w_sinhl.c w_sqrt.c w_sqrtf.c w_sqrtl.c w_tgamma.c w_tgammaf.c
84	w_tgammal.c
85	;
86
87local architectureObject ;
88for architectureObject in [ MultiArchSubDirSetup x86_64 ] {
89	on $(architectureObject) {
90		local architecture = $(TARGET_PACKAGING_ARCH) ;
91
92		MergeObject <$(architecture)>posix_gnu_arch_$(TARGET_ARCH)_e.o :
93			e_acosl.c e_atan2l.c e_exp2l.S e_expl.S e_fmodl.S e_log10l.S
94			e_log2l.S e_logl.S e_powl.S e_remainderl.S e_rem_pio2l.c e_scalbl.S
95			e_sqrt.c e_sqrtf.c e_sqrtl.c
96			;
97
98
99		MergeObject <$(architecture)>posix_gnu_arch_$(TARGET_ARCH)_k.o :
100			k_cosl.c k_rem_pio2l.c k_sinl.c k_tanl.c
101			;
102
103		MergeObject <$(architecture)>posix_gnu_arch_$(TARGET_ARCH)_s.o :
104			s_atanl.c s_ceill.S s_copysignf.S s_copysignl.S s_copysign.S
105			s_cosl.S s_expm1l.S s_fabs.c s_fabsf.c s_fabsl.S s_fdiml.S
106			s_finitel.S s_floorl.S s_fmaxf.S s_fmaxl.S s_fmax.S s_fminf.S
107			s_fminl.S s_fmin.S s_fpclassifyl.c s_ilogbl.S s_isinfl.c s_isnanl.c
108			s_llrintf.S s_llrintl.S s_llrint.S s_log1pl.S s_logbl.c s_lrintf.S
109			s_lrintl.S s_lrint.S s_nearbyintl.S s_nextafterl.c s_nexttoward.c
110			s_nexttowardf.c s_rintl.c s_scalbnl.S s_significandl.c s_sincosl.S
111			s_sincos.S s_sinl.S s_tanl.S s_truncl.S
112			;
113
114		MergeObject <$(architecture)>posix_gnu_arch_$(TARGET_ARCH)_other.o :
115			add_n.S
116			addmul_1.S
117			fegetround.c
118			fesetenv.c
119			fesetround.c
120			ldbl2mpn.c
121
122			mul_1.S
123			lshift.S rshift.S
124			sub_n.S
125			submul_1.S
126			;
127
128		MergeObject <$(architecture)>posix_gnu_arch_$(TARGET_ARCH)_generic.o :
129			$(genericSources)
130			;
131
132		MergeObjectFromObjects <$(architecture)>posix_gnu_arch_$(TARGET_ARCH).o
133			: :
134			<$(architecture)>posix_gnu_arch_$(TARGET_ARCH)_e.o
135			<$(architecture)>posix_gnu_arch_$(TARGET_ARCH)_k.o
136			<$(architecture)>posix_gnu_arch_$(TARGET_ARCH)_s.o
137			<$(architecture)>posix_gnu_arch_$(TARGET_ARCH)_other.o
138			<$(architecture)>posix_gnu_arch_$(TARGET_ARCH)_generic.o
139			;
140
141		SEARCH on [ FGristFiles $(genericSources) ]
142			= [ FDirName $(HAIKU_TOP) src system libroot posix glibc arch
143				generic ] ;
144	}
145}
146