summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-01-19 00:45:40 +0000
committerMike Frysinger <vapier@gentoo.org>2005-01-19 00:45:40 +0000
commiteaa4b0e899947fdbce06807616d0a53fa6789f86 (patch)
tree84b2d163707ca1b76c51aa5b7e436ba45eefb46a
parent99e973a956a6d682f3014d1b35a8ff4cb557bd0e (diff)
redo targets so the archives are only re-built when needed. also change the logic to use Makefile if statements rather than shell.
-rw-r--r--libm/Makefile36
1 files changed, 16 insertions, 20 deletions
diff --git a/libm/Makefile b/libm/Makefile
index 02e632107..f3a4611a5 100644
--- a/libm/Makefile
+++ b/libm/Makefile
@@ -89,30 +89,26 @@ else
all: $(LIBM) subdirs
endif
-$(LIBM): ar-target
- @if [ -f $(LIBM) ] ; then \
- set -x -e; \
- $(INSTALL) -d $(TOPDIR)lib; \
- $(RM) $(TOPDIR)lib/$(LIBM); \
- $(INSTALL) -m 644 $(LIBM) $(TOPDIR)lib; \
- fi;
+$(LIBM) ar-target: $(OBJS)
+ifeq ($(strip $(UCLIBC_HAS_FLOATS)),y)
+ $(AR) $(ARFLAGS) $(LIBM) $(OBJS)
+ $(INSTALL) -d $(TOPDIR)lib
+ $(RM) $(TOPDIR)lib/$(LIBM)
+ $(INSTALL) -m 644 $(LIBM) $(TOPDIR)lib
+endif
shared: all
- @if [ -f $(LIBM) ] ; then \
- set -x -e; \
- $(LD) $(LDFLAGS) -soname=$(LIBM_SHARED).$(MAJOR_VERSION) \
+ifeq ($(strip $(UCLIBC_HAS_FLOATS)),y)
+ $(LD) $(LDFLAGS) -soname=$(LIBM_SHARED).$(MAJOR_VERSION) \
-o $(LIBM_SHARED_FULLNAME) --whole-archive $(LIBM) \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC); \
- $(INSTALL) -d $(TOPDIR)lib; \
- $(RM) $(TOPDIR)lib/$(LIBM_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBM_SHARED).$(MAJOR_VERSION); \
- $(INSTALL) -m 644 $(LIBM_SHARED_FULLNAME) $(TOPDIR)lib; \
- $(LN) -sf $(LIBM_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBM_SHARED); \
- $(LN) -sf $(LIBM_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBM_SHARED).$(MAJOR_VERSION); \
- fi;
-
-ar-target: $(OBJS)
- $(AR) $(ARFLAGS) $(LIBM) $(OBJS)
+ -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
+ $(INSTALL) -d $(TOPDIR)lib
+ $(RM) $(TOPDIR)lib/$(LIBM_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBM_SHARED).$(MAJOR_VERSION)
+ $(INSTALL) -m 644 $(LIBM_SHARED_FULLNAME) $(TOPDIR)lib
+ $(LN) -sf $(LIBM_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBM_SHARED)
+ $(LN) -sf $(LIBM_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBM_SHARED).$(MAJOR_VERSION)
+endif
$(COBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@