Browse Source

no check needed in libm/libpthread, we do not recurse anymore if the related option is not set, more Makefile cleanups

Peter S. Mazinger 15 years ago
parent
commit
0929e196d2
12 changed files with 19 additions and 51 deletions
  1. 1 5
      Makefile
  2. 0 2
      extra/Makefile
  3. 2 4
      libc/Makefile
  4. 3 5
      libcrypt/Makefile
  5. 2 2
      libintl/Makefile
  6. 1 13
      libm/Makefile
  7. 2 4
      libnsl/Makefile
  8. 0 6
      libpthread/Makefile
  9. 2 4
      libresolv/Makefile
  10. 2 2
      librt/Makefile
  11. 2 2
      libutil/Makefile
  12. 2 2
      utils/Makefile

+ 1 - 5
Makefile

@@ -258,7 +258,7 @@ endif
 	# Ugh!!! Remember that libdl.a and libdl_pic.a are different.  Since
 	# libdl is pretty small, and not likely to benefit from mklibs.py and
 	# similar, lets just remove libdl_pic.a and avoid the issue
-	rm -f $(PREFIX)$(DEVEL_PREFIX)lib/libdl_pic.a
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libdl_pic.a
 endif
 
 
@@ -277,7 +277,6 @@ ifeq ($(strip $(HAVE_SHARED)),y)
 	fi;
 endif
 
-.PHONY: utils
 utils:
 	$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils
 
@@ -351,9 +350,6 @@ clean: subdirs_clean
 	- find . \( -name \*.o -o -name \*.a -o -name \*.so -o -name core -o -name .\#\* \) -exec $(RM) {} \;
 	@$(RM) -r lib include/bits
 	$(MAKE) -C libc/misc/internals clean
-	$(MAKE) -C libc/misc/wchar clean
-	$(MAKE) -C libc/unistd clean
-	$(MAKE) -C libc/sysdeps/linux/common clean
 	$(MAKE) -C extra/locale clean
 	@set -e; \
 	for i in `(cd $(TOPDIR)/libc/sysdeps/linux/common/sys; ls *.h)` ; do \

+ 0 - 2
extra/Makefile

@@ -23,8 +23,6 @@
 
 TOPDIR=../
 include $(TOPDIR)Rules.mak
-LIBC=$(TOPDIR)libc.a
-
 
 DIRS = 
 EXTRA_DIRS_TO_CLEAN = config

+ 2 - 4
libc/Makefile

@@ -39,7 +39,7 @@ VERSION_SCRIPT:=${shell if [ -f sysdeps/linux/$(TARGET_ARCH)/libc.map ] ; then \
 
 LIBNAME_TARGET:=$(TOPDIR)lib/$(LIBNAME)
 
-all: halfclean $(LIBNAME_TARGET) $(DO_SHARED)
+all: halfclean $(LIBNAME_TARGET)
 
 # Some functions are duplicated across subdirs, and when you pass $(AR)
 # the same object file more than once, it'll add it to the archive multiple 
@@ -83,7 +83,6 @@ shared: shared_$(LIBNAME)
 		--whole-archive shared_$(LIBNAME) \
 		$(TOPDIR)libc/misc/internals/interp.o --no-whole-archive \
 		-init __uClibc_init $(TOPDIR)lib/$(UCLIBC_LDSO) $(LIBGCC) $(LDADD_LIBFLOAT)
-	@true #$(RM) -r tmp
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $(TOPDIR)lib/$(SHARED_FULLNAME)
 	$(INSTALL) -m 644 $(SHARED_FULLNAME) $(TOPDIR)lib
@@ -91,8 +90,7 @@ shared: shared_$(LIBNAME)
 	$(LN) -sf $(SHARED_FULLNAME) $(TOPDIR)lib/$(SHARED_MAJORNAME)
 
 halfclean:
-	@$(RM) $(LIBNAME) shared_$(LIBNAME) uClibc_config.h
-	@$(RM) $(SHARED_FULLNAME) $(SHARED_MAJORNAME) uClibc-0.* libc.so*
+	$(RM) $(LIBNAME) shared_$(LIBNAME) $(SHARED_FULLNAME)
 
 tags:
 	ctags -R

+ 3 - 5
libcrypt/Makefile

@@ -45,18 +45,16 @@ $(OBJS): %.o : %.c
 	$(CC) $(CFLAGS) -c $< -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
-$(OBJ): Makefile
-
 shared: all
 	$(LD) $(LDFLAGS) -soname=$(LIBCRYPT_SHARED).$(MAJOR_VERSION) \
 		-o $(LIBCRYPT_SHARED_FULLNAME) --whole-archive $(LIBCRYPT) \
 		--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC);
+		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $(TOPDIR)lib/$(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBCRYPT_SHARED).$(MAJOR_VERSION)
-	$(INSTALL) -m 644 $(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib;
+	$(INSTALL) -m 644 $(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib
 	$(LN) -sf $(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBCRYPT_SHARED)
 	$(LN) -sf $(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBCRYPT_SHARED).$(MAJOR_VERSION)
 
 clean: 
-	$(RM) *.[oa] *~ core $(LIBCRYPT_SHARED)* $(LIBCRYPT_SHARED_FULLNAME)*
+	$(RM) *.[oa] *~ core $(LIBCRYPT) $(LIBCRYPT_SHARED_FULLNAME)

+ 2 - 2
libintl/Makefile

@@ -53,7 +53,7 @@ shared: all
 	$(LD) $(LDFLAGS) -soname=$(LIBINTL_SHARED).$(MAJOR_VERSION) \
 		-o $(LIBINTL_SHARED_FULLNAME) --whole-archive $(LIBINTL) \
 		--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC);
+		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $(TOPDIR)lib/$(LIBINTL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBINTL_SHARED).$(MAJOR_VERSION)
 	$(INSTALL) -m 644 $(LIBINTL_SHARED_FULLNAME) $(TOPDIR)lib
@@ -61,4 +61,4 @@ shared: all
 	$(LN) -sf $(LIBINTL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBINTL_SHARED).$(MAJOR_VERSION)
 
 clean:
-	$(RM) *.[oa] *~ core $(LIBINTL_SHARED)* $(LIBINTL_SHARED_FULLNAME)*
+	$(RM) *.[oa] *~ core $(LIBINTL) $(LIBINTL_SHARED_FULLNAME)

+ 1 - 13
libm/Makefile

@@ -93,25 +93,16 @@ COBJS=$(patsubst %.c,%.o, $(CSRC))
 OBJS=$(COBJS) $(FL_MOBJ)
 
 
-ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
-all:
-else
 all: $(LIBM) subdirs
-endif
 
-ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
-$(LIBM) ar-target:
-else
 ar-target: $(OBJS)
 	$(AR) $(ARFLAGS) $(LIBM) $(OBJS)
 $(LIBM): ar-target
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $(TOPDIR)lib/$(LIBM)
 	$(INSTALL) -m 644 $(LIBM) $(TOPDIR)lib
-endif
 
 shared: all
-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 \
@@ -121,7 +112,6 @@ ifeq ($(strip $(UCLIBC_HAS_FLOATS)),y)
 	$(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 $@
@@ -131,13 +121,11 @@ $(FL_MOBJ): $(FL_MSRC)
 	$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
-$(OBJ): Makefile
-
 tags:
 	ctags -R
 
 clean: subdirs_clean
-	$(RM) *.[oa] *~ core $(LIBM_SHARED)* $(LIBM_SHARED_FULLNAME)*
+	$(RM) *.[oa] *~ core $(LIBM) $(LIBM_SHARED_FULLNAME)
 
 subdirs: $(patsubst %, _dir_%, $(DIRS))
 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))

+ 2 - 4
libnsl/Makefile

@@ -40,13 +40,11 @@ $(OBJS): %.o : %.c
 	$(CC) $(CFLAGS) -c $< -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
-$(OBJ): Makefile
-
 shared: all
 	$(LD) $(LDFLAGS) -soname=$(LIBNSL_SHARED).$(MAJOR_VERSION) \
 		-o $(LIBNSL_SHARED_FULLNAME) --whole-archive $(LIBNSL) \
 		--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC);
+		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $(TOPDIR)lib/$(LIBNSL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBNSL_SHARED).$(MAJOR_VERSION)
 	$(INSTALL) -m 644 $(LIBNSL_SHARED_FULLNAME) $(TOPDIR)lib
@@ -54,4 +52,4 @@ shared: all
 	$(LN) -sf $(LIBNSL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBNSL_SHARED).$(MAJOR_VERSION)
 
 clean: 
-	$(RM) *.[oa] *~ core $(LIBNSL_SHARED)* $(LIBNSL_SHARED_FULLNAME)*
+	$(RM) *.[oa] *~ core $(LIBNSL) $(LIBNSL_SHARED_FULLNAME)

+ 0 - 6
libpthread/Makefile

@@ -66,11 +66,9 @@ endif
 endif
 
 $(LIBPTHREAD): subdirs
-ifeq ($(strip $(UCLIBC_HAS_THREADS)),y)
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $(TOPDIR)lib/$(LIBPTHREAD)
 	$(INSTALL) -m 644 $(LIBPTHREAD) $(TOPDIR)lib
-endif
 
 $(LIBTHREAD_DB): subdirs
 ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
@@ -84,10 +82,7 @@ $(OBJS): %.o : %.c
 	$(CC) $(CFLAGS) -c $< -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
-$(OBJ): Makefile
-
 shared: all
-ifeq ($(strip $(UCLIBC_HAS_THREADS)),y)
 	$(LD) $(LDFLAGS_NOSTRIP) -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \
 		-o $(LIBPTHREAD_SHARED_FULLNAME) $(SHARED_START_FILES) --whole-archive $(LIBPTHREAD) \
 		--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
@@ -101,7 +96,6 @@ ifeq ($(strip $(UCLIBC_HAS_THREADS)),y)
 		$(TOPDIR)lib/$(LIBPTHREAD_SHARED)
 	$(LN) -sf $(LIBPTHREAD_SHARED_FULLNAME) \
 		$(TOPDIR)lib/$(LIBPTHREAD_SHARED).$(MAJOR_VERSION)
-endif
 ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
 	$(LD) $(LIBTHREAD_DB_LDFLAGS) --warn-unresolved-symbols -soname=$(LIBTHREAD_DB_SHARED).1 \
 		-o $(LIBTHREAD_DB_SHARED_FULLNAME) --whole-archive $(LIBTHREAD_DB) \

+ 2 - 4
libresolv/Makefile

@@ -46,13 +46,11 @@ $(OBJS): %.o : %.c
 	$(CC) $(CFLAGS) -c $< -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
-$(OBJ): Makefile
-
 shared: all
 	$(LD) $(LDFLAGS) -soname=$(LIBRESOLV_SHARED).$(MAJOR_VERSION) \
 		-o $(LIBRESOLV_SHARED_FULLNAME) --whole-archive $(LIBRESOLV) \
 		--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC);
+		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $(TOPDIR)lib/$(LIBRESOLV_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBRESOLV_SHARED).$(MAJOR_VERSION)
 	$(INSTALL) -m 644 $(LIBRESOLV_SHARED_FULLNAME) $(TOPDIR)lib
@@ -60,4 +58,4 @@ shared: all
 	$(LN) -sf $(LIBRESOLV_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBRESOLV_SHARED).$(MAJOR_VERSION)
 
 clean: 
-	$(RM) *.[oa] *~ core $(LIBRESOLV_SHARED)* $(LIBRESOLV_SHARED_FULLNAME)*
+	$(RM) *.[oa] *~ core $(LIBRESOLV) $(LIBRESOLV_SHARED_FULLNAME)

+ 2 - 2
librt/Makefile

@@ -33,7 +33,7 @@ shared: all
 	$(LD) $(LDFLAGS) -soname=$(LIBRT_SHARED).$(MAJOR_VERSION) \
 		-o $(LIBRT_SHARED_FULLNAME) --whole-archive $(LIBRT) \
 		--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC);
+		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $(TOPDIR)lib/$(LIBRT_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBRT_SHARED).$(MAJOR_VERSION)
 	$(INSTALL) -m 644 $(LIBRT_SHARED_FULLNAME) $(TOPDIR)lib
@@ -41,4 +41,4 @@ shared: all
 	$(LN) -sf $(LIBRT_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBRT_SHARED).$(MAJOR_VERSION)
 
 clean:
-	$(RM) *.[oa] *~ core $(LIBRT_SHARED)* $(LIBRT_SHARED_FULLNAME)*
+	$(RM) *.[oa] *~ core $(LIBRT) $(LIBRT_SHARED_FULLNAME)

+ 2 - 2
libutil/Makefile

@@ -52,7 +52,7 @@ shared: all
 	$(LD) $(LDFLAGS) -soname=$(LIBUTIL_SHARED).$(MAJOR_VERSION) \
 		-o $(LIBUTIL_SHARED_FULLNAME) --whole-archive $(LIBUTIL) \
 		--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC);
+		-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $(TOPDIR)lib/$(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBUTIL_SHARED).$(MAJOR_VERSION)
 	$(INSTALL) -m 644 $(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib
@@ -60,4 +60,4 @@ shared: all
 	$(LN) -sf $(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBUTIL_SHARED).$(MAJOR_VERSION)
 
 clean:
-	$(RM) *.[oa] *~ core $(LIBUTIL_SHARED)* $(LIBUTIL_SHARED_FULLNAME)*
+	$(RM) *.[oa] *~ core $(LIBUTIL) $(LIBUTIL_SHARED_FULLNAME)

+ 2 - 2
utils/Makefile

@@ -96,14 +96,14 @@ readelf.host: readelf.c
 	$(HOSTCC) $(HOSTCFLAGS) -Wl,-s $^ -o $@
 
 clean:
-	$(RM) $(TARGETS) *.o *~ core *.target elf.h link.h iconv *.host
+	$(RM) $(TARGETS) *.o *~ core elf.h link.h readelf iconv *.host
 
 install: all
 ifeq ($(strip $(HAVE_SHARED)),y)
 	$(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)sbin
 	$(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)usr/bin
 	$(INSTALL) -m 755 ldd $(PREFIX)$(RUNTIME_PREFIX)usr/bin/ldd
-	$(INSTALL) -m 755 ldconfig $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig;
+	$(INSTALL) -m 755 ldconfig $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
 	#$(INSTALL) -m 755 readelf $(PREFIX)$(RUNTIME_PREFIX)usr/bin/readelf
 endif
 ifeq ($(strip $(UCLIBC_HAS_LOCALE)),y)