1194701SrpauloSubDir HAIKU_TOP src system libroot posix glibc arch m68k ;
2194701Srpaulo
3194701SrpauloSubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch m68k ;
4194701SrpauloSubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch generic ;
5194701SrpauloSubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
6194701SrpauloSubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc libio ;
7194701SrpauloSubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc stdlib ;
8194701SrpauloSubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc math ;
9194701SrpauloSubDirSysHdrs $(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
19SubDirCcFlags -D_GNU_SOURCE -D_IEEE_LIBM -DPIC ;
20SubDirAsFlags -DMOTOROLA_SYNTAX -DPIC ;
21
22local genericSources =
23	cmp.c dbl2mpn.c divrem.c
24	mpn2dbl.c mpn2flt.c mpn2ldbl.c
25	mul.c mul_n.c
26	ldbl2mpn.c
27
28	s_isnan.c s_isnanf.c s_isinf.c #s_isinff.c
29	s_clog.c s_clogf.c #s_clogl.c
30	s_csqrt.c s_csqrtf.c #s_csqrtl.c
31	s_cacos.c s_cacosf.c #s_cacosl.c
32	s_cacosh.c s_cacoshf.c #s_cacoshl.c
33	s_casin.c s_casinf.c #s_casinl.c
34	s_casinh.c s_casinhf.c #s_casinhl.c
35	s_catan.c s_catanf.c #s_catanl.c
36	s_catanh.c s_catanhf.c #s_catanhl.c
37	s_csin.c s_csinf.c #s_csinl.c
38	s_csinh.c s_csinhf.c #s_csinhl.c
39	s_ctan.c s_ctanf.c #s_ctanl.c
40	s_ctanh.c s_ctanhf.c #s_ctanhl.c
41	s_ccos.c s_ccosf.c #s_ccosl.c
42	s_ccosh.c s_ccoshf.c #s_ccoshl.c
43	s_cexp.c s_cexpf.c #s_cexpl.c
44	s_clog10.c s_clog10f.c #s_clog10l.c
45	s_cpow.c s_cpowf.c #s_cpowl.c
46	s_cproj.c s_cprojf.c #s_cprojl.c
47	;
48
49local architectureObject ;
50for architectureObject in [ MultiArchSubDirSetup m68k ] {
51	on $(architectureObject) {
52		local architecture = $(TARGET_PACKAGING_ARCH) ;
53
54		MergeObject <$(architecture)>posix_gnu_arch_$(TARGET_ARCH).o :
55			add_n.S
56			addmul_1.S
57
58			mul_1.S
59			lshift.S rshift.S
60			sub_n.S
61			submul_1.S
62
63			$(genericSources)
64			;
65
66		SEARCH on [ FGristFiles $(genericSources) ]
67			= [ FDirName $(HAIKU_TOP) src system libroot posix glibc arch
68				generic ] ;
69	}
70}
71