diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-10-19 14:34:51 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-10-19 14:34:51 +0000 |
commit | b6cfa5f080db02f4e7426457511278d3e2d96d67 (patch) | |
tree | 9e97f603430c3fe61ca8341dcea1c3ea1b8a1113 /libm/Makefile.in | |
parent | 65333434157380d01a8bfd0d8913a1335f1939b6 (diff) |
2 more examples that show the handling of different objects in lib*.so and lib*.a, also handle arch specific optimized versions
Diffstat (limited to 'libm/Makefile.in')
-rw-r--r-- | libm/Makefile.in | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/libm/Makefile.in b/libm/Makefile.in new file mode 100644 index 000000000..1a90c567c --- /dev/null +++ b/libm/Makefile.in @@ -0,0 +1,84 @@ +# Makefile.in for uClibc +# +# Licensed under LGPL v2.1, see the file COPYING.LIB in this tarball for details. +# + +CFLAGS+=$(SSP_ALL_CFLAGS) + +CFLAGS+=-D_IEEE_LIBM -D_ISOC99_SOURCE -D_SVID_SOURCE + +LIB_NAME:=libm + +srcdir=$(top_srcdir)$(LIB_NAME) +$(LIB_NAME)_DIR:=$(top_builddir)$(LIB_NAME) + +FL_MSRC:=float_wrappers.c + +ifeq ($(DO_C99_MATH),y) +CSRC:= e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c \ + e_exp.c e_fmod.c e_gamma.c e_gamma_r.c e_hypot.c e_j0.c \ + e_j1.c e_jn.c e_lgamma.c e_lgamma_r.c e_log.c e_log10.c \ + e_pow.c e_remainder.c e_rem_pio2.c e_scalb.c e_sinh.c \ + e_sqrt.c k_cos.c k_rem_pio2.c k_sin.c k_standard.c k_tan.c \ + s_asinh.c s_atan.c s_cbrt.c s_ceil.c s_copysign.c s_cos.c \ + s_erf.c s_expm1.c s_fabs.c s_finite.c s_floor.c s_frexp.c \ + s_ilogb.c s_ldexp.c s_lib_version.c s_log1p.c s_logb.c \ + s_matherr.c s_modf.c s_nextafter.c s_rint.c s_scalbn.c \ + s_signgam.c s_significand.c s_sin.c s_tan.c s_tanh.c \ + w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c w_cabs.c \ + w_cosh.c w_drem.c w_exp.c w_fmod.c w_gamma.c w_gamma_r.c \ + w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c w_lgamma_r.c \ + w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c \ + w_sqrt.c fpmacros.c nan.c s_ceilf.c s_floorf.c +FL_MOBJ:=acosf.o acoshf.o asinf.o asinhf.o atan2f.o atanf.o atanhf.o cbrtf.o \ + ceilf.o copysignf.o cosf.o coshf.o erfcf.o erff.o exp2f.o expf.o \ + expm1f.o fabsf.o fdimf.o floorf.o fmaf.o fmaxf.o fminf.o fmodf.o \ + frexpf.o hypotf.o ilogbf.o ldexpf.o lgammaf.o log10f.o log1pf.o \ + log2f.o logbf.o logf.o lrintf.o lroundf.o modff.o nearbyintf.o \ + nextafterf.o powf.o remainderf.o remquof.o rintf.o roundf.o \ + scalblnf.o scalbnf.o sinf.o sinhf.o sqrtf.o tanf.o tanhf.o \ + tgammaf.o truncf.o +else +# This list of math functions was taken from POSIX/IEEE 1003.1b-1993 +CSRC:= w_acos.c w_asin.c s_atan.c w_atan2.c s_ceil.c s_cos.c \ + w_cosh.c w_exp.c s_fabs.c s_floor.c w_fmod.c s_frexp.c \ + s_ldexp.c w_log.c w_log10.c s_modf.c w_pow.c s_sin.c \ + w_sinh.c w_sqrt.c s_tan.c s_tanh.c \ + s_expm1.c s_scalbn.c s_copysign.c e_acos.c e_asin.c e_atan2.c \ + k_cos.c e_cosh.c e_exp.c e_fmod.c e_log.c e_log10.c e_pow.c \ + k_sin.c e_sinh.c e_sqrt.c k_tan.c e_rem_pio2.c k_rem_pio2.c \ + s_finite.c +# We'll add sqrtf to avoid problems with libstdc++ +FL_MOBJ:=sqrtf.o +endif + +$(LIB_NAME)_SRC:=$(patsubst %.c,$(srcdir)/%.c,$(CSRC)) + +$(LIB_NAME)_MSRC:=$(srcdir)/$(FL_MSRC) +$(LIB_NAME)_MOBJ:=$(patsubst %.o,$($(LIB_NAME)_DIR)/%.o,$(FL_MOBJ)) + +ifeq ($(HAS_FPU),y) +ifeq ($(DO_C99_MATH),y) +$(LIB_NAME)_ARCH_SRC:=$(wildcard $(srcdir)/$(TARGET_ARCH)/*.c) +$(LIB_NAME)_ARCH_OBJ:=$(patsubst $(srcdir)/$(TARGET_ARCH)/%.c,$($(LIB_NAME)_DIR)/$(TARGET_ARCH)/%.o,$($(LIB_NAME)_ARCH_SRC)) + +# remove generic sources, if arch specific version is present +$(LIB_NAME)_NO_SRC:=$(patsubst $(srcdir)/$(TARGET_ARCH)/%.c,$(srcdir)/%.c,$($(LIB_NAME)_ARCH_SRC)) +$(LIB_NAME)_SRC:=$(filter-out $($(LIB_NAME)_NO_SRC),$($(LIB_NAME)_SRC)) +# add arch specific sources (assumed that these are not multi-sources) +$(LIB_NAME)_SRC+=$($(LIB_NAME)_ARCH_SRC) + +# remove generic objects produced from multi-sources, if arch specific version is present +$(LIB_NAME)_NO_MOBJ:=$(patsubst $($(LIB_NAME)_DIR)/$(TARGET_ARCH)/%.o,$($(LIB_NAME)_DIR)/%.o,$($(LIB_NAME)_ARCH_OBJ)) +$(LIB_NAME)_MOBJ:=$(filter-out $($(LIB_NAME)_NO_MOBJ),$($(LIB_NAME)_MOBJ)) +endif +endif + +$(LIB_NAME)_arch_clean: + $(RM) $($(LIB_NAME)_DIR)/$(TARGET_ARCH)/*.{o,os} + +libso-$(UCLIBC_HAS_FLOATS)+=$(top_builddir)lib/$(LIB_NAME).so +liba-$(UCLIBC_HAS_FLOATS)+=$(top_builddir)lib/$(LIB_NAME).a +libclean-y+=$(LIB_NAME)_clean $(LIB_NAME)_arch_clean + +include $(top_srcdir)Makefile.libs |