svn commit: trunk/uClibc: ldso/ldso ldso/libdl libc libcrypt libin etc...
psm at uclibc.org
psm at uclibc.org
Tue Oct 11 23:05:44 UTC 2005
Author: psm
Date: 2005-10-11 16:05:36 -0700 (Tue, 11 Oct 2005)
New Revision: 11834
Log:
Do not defer expansions where useless, like CSRC/OBJS/LIB_NAME/AR_LIB_NAME, defer only for shared lib related stuff, because it is optional. Run STRIPTOOL only once. More use of /$^/$<.
Modified:
trunk/uClibc/ldso/ldso/Makefile
trunk/uClibc/ldso/libdl/Makefile
trunk/uClibc/libc/Makefile
trunk/uClibc/libcrypt/Makefile
trunk/uClibc/libintl/Makefile
trunk/uClibc/libm/Makefile
trunk/uClibc/libnsl/Makefile
trunk/uClibc/libpthread/linuxthreads/Makefile
trunk/uClibc/libpthread/linuxthreads_db/Makefile
trunk/uClibc/libresolv/Makefile
trunk/uClibc/librt/Makefile
trunk/uClibc/libutil/Makefile
Changeset:
Modified: trunk/uClibc/ldso/ldso/Makefile
===================================================================
--- trunk/uClibc/ldso/ldso/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/ldso/ldso/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -67,34 +67,33 @@
LDFLAGS+=-s
endif
-LIB_NAME=ld-uClibc
-SO_LIB_NAME=$(TOPDIR)lib/$(UCLIBC_LDSO)
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+LIB_NAME := ld-uClibc
+SO_LIB_NAME := $(TOPDIR)lib/$(UCLIBC_LDSO)
+SO_FULL_NAME := $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-CSRC= ldso.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := ldso.c
+COBJS := $(patsubst %.c,%.o, $(CSRC))
-ASRC=$(wildcard $(TARGET_ARCH)/*.S)
-AOBJS=$(patsubst %.S,%.o, $(ASRC))
+ASRC := $(wildcard $(TARGET_ARCH)/*.S)
+AOBJS := $(patsubst %.S,%.o, $(ASRC))
-OBJS=$(AOBJS) $(COBJS)
+OBJS := $(AOBJS) $(COBJS)
all: $(SO_LIB_NAME)
$(SO_LIB_NAME): $(OBJS)
$(INSTALL) -d $(TOPDIR)lib
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME)
+ $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $@
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(LD) $(LDFLAGS) -soname=$(UCLIBC_LDSO) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) $(OBJS) $(LIBGCC)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
+ -o $(TOPDIR)lib/$(SO_FULL_NAME) $^ $(LIBGCC)
+ $(LN) -sf $(SO_FULL_NAME) $@
$(COBJS): %.o : %.c
$(CC) $(XXFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(AOBJS): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
$(RM) *.o */*.o *~ core
Modified: trunk/uClibc/ldso/libdl/Makefile
===================================================================
--- trunk/uClibc/ldso/libdl/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/ldso/libdl/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -45,14 +45,14 @@
XXFLAGS := $(XXFLAGS:-O0=-O1)
endif
-LIB_NAME=libdl
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+LIB_NAME := libdl
+AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
+SO_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).so
+SO_FULL_NAME := $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-CSRC = libdl.c
-OBJS = libdl.o
-PIC_OBJS = libdl_pic.o
+CSRC := libdl.c
+OBJS := libdl.o
+PIC_OBJS := libdl_pic.o
# we do not get here, do we need a libdl.a, if ld.so is not ours?
#ifeq ($(strip $(HAVE_SHARED)),y)
@@ -63,24 +63,25 @@
$(AR_LIB_NAME): $(OBJS) ../ldso/$(TARGET_ARCH)/resolve.o
$(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS) ../ldso/$(TARGET_ARCH)/resolve.o
+ $(RM) $@
+ $(AR) $(ARFLAGS) $@ $^
shared_$(LIB_NAME).a: $(PIC_OBJS)
- $(RM) shared_$(LIB_NAME).a
- $(AR) $(ARFLAGS) shared_$(LIB_NAME).a $(PIC_OBJS)
+ $(RM) $@
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ $(AR) $(ARFLAGS) $@ $^
# this will be built only on the second round, when libc.so is present,
# else we would link against libc.a
$(SO_LIB_NAME): shared_$(LIB_NAME).a
if [ -f $(TOPDIR)lib/libc.so ] ; then \
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME) ; \
+ $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $@ ; \
$(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) -fini dl_cleanup --whole-archive shared_$(LIB_NAME).a \
+ -o $(TOPDIR)lib/$(SO_FULL_NAME) -fini dl_cleanup --whole-archive $< \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(TOPDIR)lib/$(UCLIBC_LDSO) $(LIBGCC) ; \
$(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) ; \
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME) ; \
+ $(LN) -sf $(SO_FULL_NAME) $@ ; \
fi
$(OBJS): %.o : %.c
@@ -89,7 +90,6 @@
libdl_pic.o: libdl.c
$(CC) $(XXFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
$(RM) *.[oa] *~ core
Modified: trunk/uClibc/libc/Makefile
===================================================================
--- trunk/uClibc/libc/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/libc/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -38,10 +38,10 @@
echo "--version-script sysdeps/linux/$(TARGET_ARCH)/libc.map"; fi}
# we have SHARED_MAJORNAME=libc.so.$(MAJOR_VERSION) defined in Rules.mak
-LIB_NAME=libc
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=libuClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+LIB_NAME := libc
+AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
+SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
+SO_FULL_NAME = libuClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
ifeq ($(strip $(HAVE_SHARED)),y)
all: $(SO_LIB_NAME)
@@ -61,31 +61,31 @@
# target is evaluated. That means if you run `rm obj.* ; make`, the wildcard
# will evaluate to no files :(.
shared_$(LIB_NAME).a: subdirs
- $(RM) shared_$(LIB_NAME).a
+ $(RM) $@
objs=`cat obj.*` ; \
- $(AR) $(ARFLAGS) shared_$(LIB_NAME).a $$objs && \
- $(AR) dN 2 shared_$(LIB_NAME).a $$objs && \
- $(AR) dN 2 shared_$(LIB_NAME).a $$objs
+ $(AR) $(ARFLAGS) $@ $$objs && \
+ $(AR) dN 2 $@ $$objs && \
+ $(AR) dN 2 $@ $$objs
@for objfile in obj.signal \
obj.string.generic obj.string.$(TARGET_ARCH) obj.string \
obj.sysdeps.common obj.sysdeps.$(TARGET_ARCH) ; do \
if [ -e $$objfile ] ; then \
if [ "$(MAKE_IS_SILENT)" = "n" ] ; then \
- echo $(AR) $(ARFLAGS) shared_$(LIB_NAME).a $$objfile ; \
+ echo $(AR) $(ARFLAGS) $@ $$objfile ; \
fi ; \
objs=`cat $$objfile` ; \
fi ; \
- $(AR) $(ARFLAGS) shared_$(LIB_NAME).a $$objs || exit 1 ; \
+ $(AR) $(ARFLAGS) $@ $$objs || exit 1 ; \
done
$(AR_LIB_NAME): shared_$(LIB_NAME).a
$(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- cp shared_$(LIB_NAME).a $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) misc/internals/static.o `cat nonshared_obj.*`
+ $(RM) $@
+ cp $< $@
+ $(AR) $(ARFLAGS) $@ misc/internals/static.o `cat nonshared_obj.*`
$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(TOPDIR)lib/$(SHARED_MAJORNAME) $(SO_LIB_NAME)
+ $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(TOPDIR)lib/$(SHARED_MAJORNAME) $@
$(LD) $(LDFLAGS) $(VERSION_SCRIPT) -soname=$(SHARED_MAJORNAME) \
-o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive shared_$(LIB_NAME).a \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
@@ -93,15 +93,15 @@
$(LN) -sf $(SO_FULL_NAME) $(TOPDIR)lib/$(SHARED_MAJORNAME)
$(RM) $(TOPDIR)lib/$(NONSHARED_LIBNAME)
$(AR) $(ARFLAGS) $(TOPDIR)lib/$(NONSHARED_LIBNAME) `cat nonshared_obj.*`
- echo "/* GNU ld script" > $(SO_LIB_NAME)
- echo " * Use the shared library, but some functions are only in" >> $(SO_LIB_NAME)
- echo " * the static library, so try that secondarily. */" >> $(SO_LIB_NAME)
+ echo "/* GNU ld script" > $@
+ echo " * Use the shared library, but some functions are only in" >> $@
+ echo " * the static library, so try that secondarily. */" >> $@
#OUT_FORMAT:=$(shell $(LD) --verbose | grep OUTPUT_FORMAT | awk -F '"' '{print $2}')
- #echo "OUTPUT_FORMAT($(OUT_FORMAT))" >> $(SO_LIB_NAME)
+ #echo "OUTPUT_FORMAT($(OUT_FORMAT))" >> $@
ifeq ($(strip $(COMPAT_ATEXIT)),y)
- echo "GROUP ( $(TOPDIR)lib/$(NONSHARED_LIBNAME) $(TOPDIR)lib/$(SHARED_MAJORNAME) )" >> $(SO_LIB_NAME)
+ echo "GROUP ( $(TOPDIR)lib/$(NONSHARED_LIBNAME) $(TOPDIR)lib/$(SHARED_MAJORNAME) )" >> $@
else
- echo "GROUP ( $(TOPDIR)lib/$(SHARED_MAJORNAME) $(TOPDIR)lib/$(NONSHARED_LIBNAME) )" >> $(SO_LIB_NAME)
+ echo "GROUP ( $(TOPDIR)lib/$(SHARED_MAJORNAME) $(TOPDIR)lib/$(NONSHARED_LIBNAME) )" >> $@
endif
tags:
Modified: trunk/uClibc/libcrypt/Makefile
===================================================================
--- trunk/uClibc/libcrypt/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/libcrypt/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -28,8 +28,8 @@
LIB_NAME := libcrypt
AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME := $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
+SO_FULL_NAME = $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
CSRC := $(wildcard *.c)
@@ -47,6 +47,7 @@
$(AR_LIB_NAME): $(OBJS)
$(INSTALL) -d $(TOPDIR)lib
$(RM) $@
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(AR) $(ARFLAGS) $@ $^
$(SO_LIB_NAME): $(AR_LIB_NAME)
@@ -60,11 +61,9 @@
$(LIB_NAME).o: $(CSRC)
$(CC) $(CFLAGS) -o $@ -c $^
- $(STRIPTOOL) -x -R .note -R .comment $@
$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
$(RM) *.o *~ core
Modified: trunk/uClibc/libintl/Makefile
===================================================================
--- trunk/uClibc/libintl/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/libintl/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -26,17 +26,17 @@
CFLAGS+=$(SSP_ALL_CFLAGS)
-LIB_NAME=libintl
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+LIB_NAME := libintl
+AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
+SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
+SO_FULL_NAME = $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-MSRC= intl.c
-MOBJ= gettext.o ngettext.o dgettext.o dcgettext.o dngettext.o dcngettext.o \
+MSRC := intl.c
+MOBJ := gettext.o ngettext.o dgettext.o dcgettext.o dngettext.o dcngettext.o \
textdomain.o bindtextdomain.o bind_textdomain_codeset.o \
_nl_expand_alias.o _nl_msg_cat_cntr.o # glibc-isms
-OBJS=$(MOBJ)
+OBJS := $(MOBJ)
ifeq ($(strip $(HAVE_SHARED)),y)
all: $(SO_LIB_NAME)
@@ -46,21 +46,21 @@
$(AR_LIB_NAME): $(OBJS)
$(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
+ $(RM) $@
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ $(AR) $(ARFLAGS) $@ $^
$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
+ $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $@
$(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
+ -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $< \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
$(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
+ $(LN) -sf $(SO_FULL_NAME) $@
$(MOBJ): $(MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
$(RM) *.o *~ core
Modified: trunk/uClibc/libm/Makefile
===================================================================
--- trunk/uClibc/libm/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/libm/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -38,15 +38,15 @@
CFLAGS+=-D_IEEE_LIBM -D_ISOC99_SOURCE -D_SVID_SOURCE
-LIB_NAME=libm
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+LIB_NAME := libm
+AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
+SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
+SO_FULL_NAME = $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-FL_MSRC = float_wrappers.c
+FL_MSRC := float_wrappers.c
ifeq ($(strip $(DO_C99_MATH)),y)
-CSRC = e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c\
+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\
@@ -61,7 +61,7 @@
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 \
+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 \
@@ -71,27 +71,27 @@
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 \
+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
-CSRC+= s_expm1.c s_scalbn.c s_copysign.c e_acos.c e_asin.c e_atan2.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
+FL_MOBJ := sqrtf.o
endif
ifeq ($(strip $(HAS_FPU)),y)
ifeq ($(strip $(DO_C99_MATH)),y)
-ARCH_CSRC=$(wildcard $(TARGET_ARCH)/*.c)
-ARCH_OBJS=$(patsubst %.c,%.o, $(ARCH_CSRC))
+ARCH_CSRC := $(wildcard $(TARGET_ARCH)/*.c)
+ARCH_OBJS := $(patsubst %.c,%.o, $(ARCH_CSRC))
endif
endif
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS) $(FL_MOBJ)
+COBJS := $(patsubst %.c,%.o, $(CSRC))
+OBJS := $(COBJS) $(FL_MOBJ)
ifeq ($(strip $(HAVE_SHARED)),y)
all: $(SO_LIB_NAME)
@@ -101,26 +101,25 @@
$(AR_LIB_NAME): $(OBJS) $(ARCH_OBJS)
$(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(ARCH_OBJS)
+ $(RM) $@
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(AR) $(ARFLAGS) $@ $(ARCH_OBJS)
$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
+ $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $@
$(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
+ -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $< \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
$(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
+ $(LN) -sf $(SO_FULL_NAME) $@
$(COBJS) $(ARCH_OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(FL_MOBJ): $(FL_MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
tags:
ctags -R
Modified: trunk/uClibc/libnsl/Makefile
===================================================================
--- trunk/uClibc/libnsl/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/libnsl/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -21,14 +21,14 @@
CFLAGS+=$(SSP_ALL_CFLAGS)
-LIB_NAME=libnsl
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+LIB_NAME := libnsl
+AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
+SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
+SO_FULL_NAME = $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-CSRC = $(wildcard *.c)
+CSRC := $(wildcard *.c)
-OBJS=$(patsubst %.c,%.o, $(CSRC))
+OBJS := $(patsubst %.c,%.o, $(CSRC))
ifeq ($(strip $(HAVE_SHARED)),y)
all: $(SO_LIB_NAME)
@@ -38,21 +38,21 @@
$(AR_LIB_NAME): $(OBJS)
$(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
+ $(RM) $@
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ $(AR) $(ARFLAGS) $@ $^
$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
+ $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $@
$(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
+ -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $< \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
$(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
+ $(LN) -sf $(SO_FULL_NAME) $@
$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
$(RM) *.o *~ core
Modified: trunk/uClibc/libpthread/linuxthreads/Makefile
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/libpthread/linuxthreads/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -28,28 +28,28 @@
# Get the thread include dependencies
CFLAGS += $(PTINC)
-ARCH_CFLAGS = $(CFLAGS)
+ARCH_CFLAGS := $(CFLAGS)
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
- SHARED_START_FILES = $(TOPDIR)lib/crti.o $(LIBGCC_DIR)crtbeginS.o
- SHARED_END_FILES = $(LIBGCC_DIR)crtendS.o $(TOPDIR)lib/crtn.o
+SHARED_START_FILES := $(TOPDIR)lib/crti.o $(LIBGCC_DIR)crtbeginS.o
+SHARED_END_FILES := $(LIBGCC_DIR)crtendS.o $(TOPDIR)lib/crtn.o
endif
-LIB_NAME=libpthread
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+LIB_NAME := libpthread
+AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
+SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
+SO_FULL_NAME = $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-ARCH_CSRC=$(wildcard sysdeps/$(TARGET_ARCH)/*.c)
-ARCH_OBJS=$(patsubst %.c,%.o, $(ARCH_CSRC))
+ARCH_CSRC := $(wildcard sysdeps/$(TARGET_ARCH)/*.c)
+ARCH_OBJS := $(patsubst %.c,%.o, $(ARCH_CSRC))
-include sysdeps/$(TARGET_ARCH)/Makefile.in
-CSRC = $(wildcard *.c)
+CSRC = $(wildcard *.c)
ifneq ($(strip $(UCLIBC_HAS_XLOCALE)),y)
CSRC := $(filter-out locale.c,$(CSRC))
endif
-OBJS=$(patsubst %.c,%.o, $(CSRC))
+OBJS := $(patsubst %.c,%.o, $(CSRC))
ifeq ($(strip $(HAVE_SHARED)),y)
all: $(SO_LIB_NAME)
@@ -59,34 +59,29 @@
$(AR_LIB_NAME): $(OBJS) $(ARCH_OBJS)
$(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(ARCH_OBJS)
+ $(RM) $@
+ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
+ $(STRIPTOOL) -X --strip-debug -R .note -R .comment $^
+else
+ $(STRIPTOOL) -x -R .note -R .comment $^
+endif
+ $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(AR) $(ARFLAGS) $@ $(ARCH_OBJS)
$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
+ $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $@
$(LD) $(LDFLAGS_NOSTRIP) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) $(SHARED_START_FILES) --whole-archive $(AR_LIB_NAME) \
+ -o $(TOPDIR)lib/$(SO_FULL_NAME) $(SHARED_START_FILES) --whole-archive $< \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC) $(SHARED_END_FILES)
$(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
+ $(LN) -sf $(SO_FULL_NAME) $@
$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
-ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
- $(STRIPTOOL) -X --strip-debug -R .note -R .comment $*.o
-else
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-endif
$(ARCH_OBJS): %.o : %.c
$(CC) $(ARCH_CFLAGS) -c $< -o $@
-ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
- $(STRIPTOOL) -X --strip-debug -R .note -R .comment $*.o
-else
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-endif
clean:
$(RM) *.o sysdeps/*/*.o *~ core
Modified: trunk/uClibc/libpthread/linuxthreads_db/Makefile
===================================================================
--- trunk/uClibc/libpthread/linuxthreads_db/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/libpthread/linuxthreads_db/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -21,20 +21,20 @@
#CFLAGS+=$(SSP_ALL_CFLAGS)
-LIB_NAME=libthread_db
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+LIB_NAME := libthread_db
+AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
+SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
+SO_FULL_NAME = $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
# Get the thread include dependencies and shared object name
CFLAGS += $(PTINC) -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
# Remove any -z defs since this lib will have undefined symbols
-LDFLAGS := $(subst -z defs,,$(LDFLAGS)) --warn-unresolved-symbols
+LDFLAGS = $(subst -z defs,,$(LDFLAGS)) --warn-unresolved-symbols
-CSRC=$(wildcard *.c)
+CSRC := $(wildcard *.c)
-OBJS=$(patsubst %.c,%.o, $(CSRC))
+OBJS := $(patsubst %.c,%.o, $(CSRC))
ifeq ($(strip $(HAVE_SHARED)),y)
all: $(SO_LIB_NAME)
@@ -44,21 +44,21 @@
$(AR_LIB_NAME): $(OBJS)
$(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
+ $(RM) $@
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ $(AR) $(ARFLAGS) $@ $^
$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).1 $(SO_LIB_NAME)
+ $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).1 $@
$(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.1 \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
+ -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $< \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
$(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).1
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
+ $(LN) -sf $(SO_FULL_NAME) $@
$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
$(RM) *.o *~ core
Modified: trunk/uClibc/libresolv/Makefile
===================================================================
--- trunk/uClibc/libresolv/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/libresolv/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -26,14 +26,14 @@
CFLAGS+=$(SSP_ALL_CFLAGS)
-LIB_NAME=libresolv
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+LIB_NAME := libresolv
+AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
+SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
+SO_FULL_NAME = $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-CSRC = $(wildcard *.c)
+CSRC := $(wildcard *.c)
-OBJS=$(patsubst %.c,%.o, $(CSRC))
+OBJS := $(patsubst %.c,%.o, $(CSRC))
ifeq ($(strip $(HAVE_SHARED)),y)
all: $(SO_LIB_NAME)
@@ -43,21 +43,21 @@
$(AR_LIB_NAME): $(OBJS)
$(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
+ $(RM) $@
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ $(AR) $(ARFLAGS) $@ $^
$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
+ $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $@
$(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
+ -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $< \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
$(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
+ $(LN) -sf $(SO_FULL_NAME) $@
$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
$(RM) *.o *~ core
Modified: trunk/uClibc/librt/Makefile
===================================================================
--- trunk/uClibc/librt/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/librt/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -21,16 +21,16 @@
CFLAGS+=$(SSP_ALL_CFLAGS)
-LIB_NAME=librt
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+LIB_NAME := librt
+AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
+SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
+SO_FULL_NAME = $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
# uClibc's librt lacks all aio routines, all clock routines,
# and all shm routines
-CSRC=$(wildcard *.c)
+CSRC := $(wildcard *.c)
-OBJS=$(patsubst %.c,%.o, $(CSRC))
+OBJS := $(patsubst %.c,%.o, $(CSRC))
ifeq ($(strip $(HAVE_SHARED)),y)
all: $(SO_LIB_NAME)
@@ -40,21 +40,21 @@
$(AR_LIB_NAME): $(OBJS)
$(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
+ $(RM) $@
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ $(AR) $(ARFLAGS) $@ $^
$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
+ $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $@
$(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
+ -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $< \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
$(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
+ $(LN) -sf $(SO_FULL_NAME) $@
$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
$(RM) *.o *~ core
Modified: trunk/uClibc/libutil/Makefile
===================================================================
--- trunk/uClibc/libutil/Makefile 2005-10-11 20:49:07 UTC (rev 11833)
+++ trunk/uClibc/libutil/Makefile 2005-10-11 23:05:36 UTC (rev 11834)
@@ -28,8 +28,8 @@
LIB_NAME := libutil
AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME := $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
+SO_FULL_NAME = $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
CSRC = $(wildcard *.c)
ifneq ($(strip $(ARCH_HAS_MMU)),y)
@@ -50,6 +50,7 @@
$(AR_LIB_NAME): $(OBJS)
$(INSTALL) -d $(TOPDIR)lib
$(RM) $@
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(AR) $(ARFLAGS) $@ $^
$(SO_LIB_NAME): $(AR_LIB_NAME)
@@ -63,11 +64,9 @@
$(LIB_NAME).o: $(CSRC)
$(CC) $(CFLAGS) -o $@ -c $^
- $(STRIPTOOL) -x -R .note -R .comment $@
$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
$(RM) *.o *~ core
More information about the uClibc-cvs
mailing list