1# 2# @(#)Makefile 1.4 95/01/18 3# 4# ==================================================== 5# Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 6# 7# Developed at SunSoft, a Sun Microsystems, Inc. business. 8# Permission to use, copy, modify, and distribute this 9# software is freely granted, provided that this notice 10# is preserved. 11# ==================================================== 12# 13# 14 15# 16# There are two options in making libm at fdlibm compile time: 17# _IEEE_LIBM --- IEEE libm; smaller, and somewhat faster 18# _MULTI_LIBM --- Support multi-standard at runtime by 19# imposing wrapper functions defined in 20# fdlibm.h: 21# _IEEE_MODE -- IEEE 22# _XOPEN_MODE -- X/OPEN 23# _POSIX_MODE -- POSIX/ANSI 24# _SVID3_MODE -- SVID 25# 26# Here is how to set up CFLAGS to create the desired libm at 27# compile time: 28# 29# CFLAGS = -D_IEEE_LIBM ... IEEE libm (recommended) 30# CFLAGS = -D_SVID3_MODE ... Multi-standard supported 31# libm with SVID as the 32# default standard 33# CFLAGS = -D_XOPEN_MODE ... Multi-standard supported 34# libm with XOPEN as the 35# default standard 36# CFLAGS = -D_POSIX_MODE ... Multi-standard supported 37# libm with POSIX as the 38# default standard 39# CFLAGS = ... Multi-standard supported 40# libm with IEEE as the 41# default standard 42# 43# NOTE: if scalb's second arguement is an int, then one must 44# define _SCALB_INT in CFLAGS. The default prototype of scalb 45# is double ieee_scalb(double, double) 46# 47 48prefix = @prefix@ 49 50AR = @AR@ 51 52CC = @CC@ 53 54# 55# Default IEEE libm 56# 57CFLAGS = @CFLAGS@ -D_IEEE_LIBM 58 59CHMOD = @CHMOD@ 60 61CP = @CP@ 62 63INCFILES = fdlibm.h 64 65LDFLAGS = @LDFLAGS@ 66 67LIB = libfdm.a 68 69LIBS = @LIBS@ 70 71RANLIB = @RANLIB@ 72 73RM = @RM@ -f 74 75.INIT: $(INCFILES) 76 77.KEEP_STATE: 78 79src = k_standard.c k_rem_pio2.c \ 80 k_cos.c k_sin.c k_tan.c \ 81 e_acos.c e_acosh.c e_asin.c e_atan2.c \ 82 e_atanh.c e_cosh.c e_exp.c e_fmod.c \ 83 e_gamma.c e_gamma_r.c e_hypot.c e_j0.c \ 84 e_j1.c e_jn.c e_lgamma.c e_lgamma_r.c \ 85 e_log.c e_log10.c e_pow.c e_rem_pio2.c e_remainder.c \ 86 e_scalb.c e_sinh.c e_sqrt.c \ 87 w_acos.c w_acosh.c w_asin.c w_atan2.c \ 88 w_atanh.c w_cosh.c w_exp.c w_fmod.c \ 89 w_gamma.c w_gamma_r.c w_hypot.c w_j0.c \ 90 w_j1.c w_jn.c w_lgamma.c w_lgamma_r.c \ 91 w_log.c w_log10.c w_pow.c w_remainder.c \ 92 w_scalb.c w_sinh.c w_sqrt.c \ 93 s_asinh.c s_atan.c s_cbrt.c s_ceil.c s_copysign.c \ 94 s_cos.c s_erf.c s_expm1.c s_fabs.c s_finite.c s_floor.c \ 95 s_frexp.c s_ilogb.c s_isnan.c s_ldexp.c s_lib_version.c \ 96 s_log1p.c s_logb.c s_matherr.c s_modf.c s_nextafter.c \ 97 s_rint.c s_scalbn.c s_signgam.c s_significand.c s_sin.c \ 98 s_tan.c s_tanh.c 99 100obj = k_standard.o k_rem_pio2.o \ 101 k_cos.o k_sin.o k_tan.o \ 102 e_acos.o e_acosh.o e_asin.o e_atan2.o \ 103 e_atanh.o e_cosh.o e_exp.o e_fmod.o \ 104 e_gamma.o e_gamma_r.o e_hypot.o e_j0.o \ 105 e_j1.o e_jn.o e_lgamma.o e_lgamma_r.o \ 106 e_log.o e_log10.o e_pow.o e_rem_pio2.o e_remainder.o \ 107 e_scalb.o e_sinh.o e_sqrt.o \ 108 w_acos.o w_acosh.o w_asin.o w_atan2.o \ 109 w_atanh.o w_cosh.o w_exp.o w_fmod.o \ 110 w_gamma.o w_gamma_r.o w_hypot.o w_j0.o \ 111 w_j1.o w_jn.o w_lgamma.o w_lgamma_r.o \ 112 w_log.o w_log10.o w_pow.o w_remainder.o \ 113 w_scalb.o w_sinh.o w_sqrt.o \ 114 s_asinh.o s_atan.o s_cbrt.o s_ceil.o s_copysign.o \ 115 s_cos.o s_erf.o s_expm1.o s_fabs.o s_finite.o s_floor.o \ 116 s_frexp.o s_ilogb.o s_isnan.o s_ldexp.o s_lib_version.o \ 117 s_log1p.o s_logb.o s_matherr.o s_modf.o s_nextafter.o \ 118 s_rint.o s_scalbn.o s_signgam.o s_significand.o s_sin.o \ 119 s_tan.o s_tanh.o 120 121all: $(LIB) 122 123check: 124 @echo This package does not have a validation suite. 125 126clean: 127 -$(RM) *~ #* core a.out 128 129distclean: mostlyclean 130 -$(RM) $(LIB) 131 -$(RM) -r autom4te.cache/ 132 -$(RM) config.cache config.log config.status Makefile 133 134install: $(LIB) uninstall 135 $(CP) $(LIB) $(prefix)/lib/$(LIB) 136 $(CHMOD) 664 $(prefix)/lib/$(LIB) 137 $(RANLIB) $(prefix)/lib/$(LIB) || true 138 139$(LIB) : $(obj) 140 $(AR) cru $(LIB) $(obj) 141 $(RANLIB) $(LIB) || true 142 143maintainer-clean: distclean 144 @echo "This command is intended for maintainers to use;" 145 @echo "it deletes files that may require special tools to rebuild." 146 -$(RM) configure 147 148mostlyclean: clean 149 -$(RM) $(obj) 150 151source: $(src) README 152 153uninstall: 154 -$(RM) $(prefix)/lib/$(LIB) 155