summaryrefslogtreecommitdiff
path: root/libm/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'libm/Makefile.in')
-rw-r--r--libm/Makefile.in37
1 files changed, 20 insertions, 17 deletions
diff --git a/libm/Makefile.in b/libm/Makefile.in
index fa9429165..a5bd41ebe 100644
--- a/libm/Makefile.in
+++ b/libm/Makefile.in
@@ -1,6 +1,6 @@
# Makefile for uClibc
#
-# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
@@ -21,11 +21,7 @@
#
CFLAGS-libm := -DNOT_IN_libc -DIS_IN_libm $(SSP_ALL_CFLAGS)
-CFLAGS-libm += -D_IEEE_LIBM -D_ISOC99_SOURCE -D_SVID_SOURCE
-
-CFLAGS-libm/$(TARGET_ARCH)/ := $(CFLAGS-libm)
-
-CFLAGS-s_lib_version.c := -D_POSIX_MODE
+CFLAGS-libm += -D_IEEE_LIBM -D_ISOC99_SOURCE -D_SVID_SOURCE -D_POSIX_MODE
LDFLAGS-libm.so := $(LDFLAGS)
@@ -34,8 +30,10 @@ LIBS-libm.so := $(LIBS)
libm_FULL_NAME := libm-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
ifeq ($(UCLIBC_HAS_FPU),y)
+ifeq ($(DO_C99_MATH),y)
-include $(top_srcdir)libm/$(TARGET_ARCH)/Makefile.arch
endif
+endif
FL_MSRC := float_wrappers.c
@@ -85,7 +83,9 @@ libm_OUT := $(top_builddir)libm
# assume that arch specific versions are provided as single sources/objects
ifeq ($(UCLIBC_HAS_FPU),y)
+ifeq ($(DO_C99_MATH),y)
ifneq ($(strip $(libm_ARCH_OBJS)),)
+CFLAGS-libm/$(TARGET_ARCH)/ := $(CFLAGS-libm)
# remove generic sources, if arch specific version is present
ifneq ($(strip $(libm_ARCH_SRC)),)
@@ -99,12 +99,6 @@ FL_MOBJ := $(filter-out $(notdir $(libm_ARCH_OBJS)),$(FL_MOBJ))
FL_MOBJ := $(filter-out $(patsubst s_%.o,%.o,$(notdir $(libm_ARCH_OBJS))),$(FL_MOBJ))
endif
endif
-
-ifneq ($(DOMULTI),n)
-ifeq ($(DO_C99_MATH),y)
-LIBM_NO_MULTI := s_lib_version.c
-CSRC := $(filter-out $(LIBM_NO_MULTI),$(CSRC))
-endif
endif
libm_SRC := $(patsubst %.c,$(libm_DIR)/%.c,$(CSRC))
@@ -113,7 +107,10 @@ libm_OBJ := $(patsubst $(libm_DIR)/%.c,$(libm_OUT)/%.o,$(libm_SRC))
libm_MSRC := $(libm_DIR)/$(FL_MSRC)
libm_MOBJ := $(patsubst %.o,$(libm_OUT)/%.o,$(FL_MOBJ))
+ifeq ($(DOMULTI),y)
libm_DEF := $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ))))
+CFLAGS-libm += $(libm_DEF)
+endif
libm_OBJS := $(libm_OBJ) $(libm_MOBJ)
@@ -124,26 +121,32 @@ libm-a-y += $(libm_OBJS)
endif
libm-so-y += $(libm_OBJS:.o=.os)
-CFLAGS-multi-y := $(libm_DEF)
-libm-multi-y += $(libm_SRC) $(libm_MSRC)
-libm-nomulti-$(DO_C99_MATH) += $(patsubst %.c,$(libm_OUT)/%.o,$(LIBM_NO_MULTI))
-
lib-a-$(UCLIBC_HAS_FLOATS) += $(top_builddir)lib/libm.a
lib-so-$(UCLIBC_HAS_FLOATS) += $(top_builddir)lib/libm.so
objclean-y += libm_clean
+ifeq ($(DOMULTI),n)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libm.so: $(top_builddir)lib/libm.a $(libc)
else
$(top_builddir)lib/libm.so: $(libm_OUT)/libm_so.a $(libc)
endif
$(call link.so,$(libm_FULL_NAME),$(MAJOR_VERSION))
+else
+$(top_builddir)lib/libm.so: $(libm_OUT)/libm.oS $(libc)
+ $(call linkm.so,$(libm_FULL_NAME),$(MAJOR_VERSION))
+endif
$(libm_OUT)/libm_so.a: $(libm-so-y)
$(Q)$(RM) $@
$(do_strip)
$(do_ar)
+$(libm_OUT)/libm.oS: $(libm_SRC) $(libm_MSRC) $(libm_ARCH_SRC)
+ $(Q)$(RM) $@
+ $(compile-m)
+ $(do_t_strip)
+
$(top_builddir)lib/libm.a: $(libm-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
@@ -157,4 +160,4 @@ $(libm_MOBJ:.o=.os): $(libm_MSRC)
$(compile.m)
libm_clean:
- $(RM) $(libm_OUT)/*.{o,os,a}
+ $(RM) $(libm_OUT)/*.{o,os,oS,a}