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