xref: /illumos-gate/usr/src/lib/libmvec/Makefile.com (revision 6cb11604688f3d2bf2fb6d030c1f2bb3673a10d2)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
14#
15# Copyright (c) 2019, Joyent, Inc.
16#
17
18LIBMDIR		= $(SRC)/lib/libm
19
20mvecOBJS	= \
21		__vTBL_atan1.o \
22		__vTBL_atan2.o \
23		__vTBL_rsqrt.o \
24		__vTBL_sincos.o \
25		__vTBL_sincos2.o \
26		__vTBL_sqrtf.o \
27		__vatan.o \
28		__vatan2.o \
29		__vatan2f.o \
30		__vatanf.o \
31		__vc_abs.o \
32		__vc_exp.o \
33		__vc_log.o \
34		__vc_pow.o \
35		__vcos.o \
36		__vcosbig.o \
37		__vcosbigf.o \
38		__vcosf.o \
39		__vexp.o \
40		__vexpf.o \
41		__vhypot.o \
42		__vhypotf.o \
43		__vlog.o \
44		__vlogf.o \
45		__vpow.o \
46		__vpowf.o \
47		__vrem_pio2m.o \
48		__vrhypot.o \
49		__vrhypotf.o \
50		__vrsqrt.o \
51		__vrsqrtf.o \
52		__vsin.o \
53		__vsinbig.o \
54		__vsinbigf.o \
55		__vsincos.o \
56		__vsincosbig.o \
57		__vsincosbigf.o \
58		__vsincosf.o \
59		__vsinf.o \
60		__vsqrt.o \
61		__vsqrtf.o \
62		__vz_abs.o \
63		__vz_exp.o \
64		__vz_log.o \
65		__vz_pow.o \
66		vatan2_.o \
67		vatan2f_.o \
68		vatan_.o \
69		vatanf_.o \
70		vc_abs_.o \
71		vc_exp_.o \
72		vc_log_.o \
73		vc_pow_.o \
74		vcos_.o \
75		vcosf_.o \
76		vexp_.o \
77		vexpf_.o \
78		vhypot_.o \
79		vhypotf_.o \
80		vlog_.o \
81		vlogf_.o \
82		vpow_.o \
83		vpowf_.o \
84		vrhypot_.o \
85		vrhypotf_.o \
86		vrsqrt_.o \
87		vrsqrtf_.o \
88		vsin_.o \
89		vsincos_.o \
90		vsincosf_.o \
91		vsinf_.o \
92		vsqrt_.o \
93		vsqrtf_.o \
94		vz_abs_.o \
95		vz_exp_.o \
96		vz_log_.o \
97		vz_pow_.o
98
99mvecvisCOBJS	= \
100		__vTBL_atan1.o \
101		__vTBL_atan2.o \
102		__vTBL_rsqrt.o \
103		__vTBL_sincos.o \
104		__vTBL_sincos2.o \
105		__vTBL_sqrtf.o \
106		__vcosbig.o \
107		__vcosbigf.o \
108		__vrem_pio2m.o \
109		__vsinbig.o \
110		__vsinbigf.o \
111		__vsincosbig.o \
112		__vsincosbigf.o
113
114mvecvisSOBJS	= \
115		__vatan.o \
116		__vatan2.o \
117		__vatan2f.o \
118		__vatanf.o \
119		__vcos.o \
120		__vcosf.o \
121		__vexp.o \
122		__vexpf.o \
123		__vhypot.o \
124		__vhypotf.o \
125		__vlog.o \
126		__vlogf.o \
127		__vpow.o \
128		__vpowf.o \
129		__vrhypot.o \
130		__vrhypotf.o \
131		__vrsqrt.o \
132		__vrsqrtf.o \
133		__vsin.o \
134		__vsincos.o \
135		__vsincosf.o \
136		__vsinf.o \
137		__vsqrt.o \
138		__vsqrtf.o
139
140mvecvis2COBJS	= \
141		__vTBL_sincos.o \
142		__vTBL_sincos2.o \
143		__vTBL_sqrtf.o \
144		__vcosbig.o \
145		__vcosbig_ultra3.o \
146		__vrem_pio2m.o \
147		__vsinbig.o \
148		__vsinbig_ultra3.o
149
150mvecvis2SOBJS	= \
151		__vcos_ultra3.o \
152		__vlog_ultra3.o \
153		__vsin_ultra3.o \
154		__vsqrtf_ultra3.o
155
156include		$(SRC)/lib/Makefile.lib
157include		$(SRC)/lib/Makefile.rootfs
158include		$(LIBMDIR)/Makefile.libm.com
159
160LIBS		= $(DYNLIB)
161SRCDIR		= ../common/
162DYNFLAGS	+= $(ZIGNORE)
163
164LINTERROFF	= -erroff=E_FP_DIVISION_BY_ZERO
165LINTERROFF	+= -erroff=E_FP_INVALID
166LINTERROFF	+= -erroff=E_BAD_PTR_CAST_ALIGN
167LINTERROFF	+= -erroff=E_ASSIGMENT_CAUSE_LOSS_PREC
168LINTERROFF	+= -erroff=E_FUNC_SET_NOT_USED
169
170LINTFLAGS	+= $(LINTERROFF)
171LINTFLAGS64	+= $(LINTERROFF)
172LINTFLAGS64     += -errchk=longptr64
173
174CLAGS		+= $(LINTERROFF)
175CFLAGS64	+= $(LINTERROFF)
176
177FLTRPATH_sparc		= $$ORIGIN/cpu/$$ISALIST/libmvec_isa.so.1
178FLTRPATH_sparcv9	= $$ORIGIN/../cpu/$$ISALIST/sparcv9/libmvec_isa.so.1
179FLTRPATH_i386		= $$ORIGIN/libmvec/$$HWCAP
180FLTRPATH		= $(FLTRPATH_$(TARGET_ARCH))
181
182sparc_CFLAGS += -_cc=-W0,-xintrinsic
183sparcv9_CFLAGS += -_cc=-W0,-xintrinsic
184
185SRCS_mvec_i386 = ../common/__vsqrtf.c
186
187SRCS_mvec_sparc = $(SRCS_mvec_i386)
188
189SRCS_mvec_sparcv9 = $(SRCS_mvec_i386)
190
191
192SRCS_mvec = \
193	$(SRCS_mvec_$(TARGETMACH)) \
194	../common/__vTBL_atan1.c \
195	../common/__vTBL_atan2.c \
196	../common/__vTBL_rsqrt.c \
197	../common/__vTBL_sincos.c \
198	../common/__vTBL_sincos2.c \
199	../common/__vTBL_sqrtf.c \
200	../common/__vatan.c \
201	../common/__vatan2.c \
202	../common/__vatan2f.c \
203	../common/__vatanf.c \
204	../common/__vc_abs.c \
205	../common/__vc_exp.c \
206	../common/__vc_log.c \
207	../common/__vc_pow.c \
208	../common/__vcos.c \
209	../common/__vcosbig.c \
210	../common/__vcosbigf.c \
211	../common/__vcosf.c \
212	../common/__vexp.c \
213	../common/__vexpf.c \
214	../common/__vhypot.c \
215	../common/__vhypotf.c \
216	../common/__vlog.c \
217	../common/__vlogf.c \
218	../common/__vpow.c \
219	../common/__vpowf.c \
220	../common/__vrem_pio2m.c \
221	../common/__vrhypot.c \
222	../common/__vrhypotf.c \
223	../common/__vrsqrt.c \
224	../common/__vrsqrtf.c \
225	../common/__vsin.c \
226	../common/__vsinbig.c \
227	../common/__vsinbigf.c \
228	../common/__vsincos.c \
229	../common/__vsincosbig.c \
230	../common/__vsincosbigf.c \
231	../common/__vsincosf.c \
232	../common/__vsinf.c \
233	../common/__vsqrt.c \
234	../common/__vz_abs.c \
235	../common/__vz_exp.c \
236	../common/__vz_log.c \
237	../common/__vz_pow.c \
238	../common/vatan2_.c \
239	../common/vatan2f_.c \
240	../common/vatan_.c \
241	../common/vatanf_.c \
242	../common/vc_abs_.c \
243	../common/vc_exp_.c \
244	../common/vc_log_.c \
245	../common/vc_pow_.c \
246	../common/vcos_.c \
247	../common/vcosf_.c \
248	../common/vexp_.c \
249	../common/vexpf_.c \
250	../common/vhypot_.c \
251	../common/vhypotf_.c \
252	../common/vlog_.c \
253	../common/vlogf_.c \
254	../common/vpow_.c \
255	../common/vpowf_.c \
256	../common/vrhypot_.c \
257	../common/vrhypotf_.c \
258	../common/vrsqrt_.c \
259	../common/vrsqrtf_.c \
260	../common/vsin_.c \
261	../common/vsincos_.c \
262	../common/vsincosf_.c \
263	../common/vsinf_.c \
264	../common/vsqrt_.c \
265	../common/vsqrtf_.c \
266	../common/vz_abs_.c \
267	../common/vz_exp_.c \
268	../common/vz_log_.c \
269	../common/vz_pow_.c
270
271.KEEP_STATE:
272
273all:	$(LIBS)
274
275lint:	lintcheck
276
277pics/%.o: ../$(TARGET_ARCH)/src/%.S
278	$(COMPILE.s) -o $@ $<
279	$(POST_PROCESS_S_O)
280
281pics/%.o: ../common/$$(CHIP)/%.S
282	$(COMPILE.s) -o $@ $<
283	$(POST_PROCESS_S_O)
284