OSDN Git Service

By default, leave out the RPC junk (it adds over 30k). Add in a compile
authorEric Andersen <andersen@codepoet.org>
Wed, 9 May 2001 16:40:35 +0000 (16:40 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 9 May 2001 16:40:35 +0000 (16:40 -0000)
time option to include it if NFS support is wanted (does anyone every
use this for anything else these days?)
 -Erik

Makefile
libc/inet/Makefile

index e768d13..5ccc78a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -206,6 +206,11 @@ uClibc_config.h: Config
        else \
            echo "#undef NO_UNDERSCORES" >> uClibc_config.h ; \
        fi
+       @if [ "$(INCLUDE_RPC)" = "true" ] ; then \
+           echo "#define __UCLIBC_HAS_RPC__ 1" >> uClibc_config.h ; \
+       else \
+           echo "#undef __UCLIBC_HAS_RPC__" >> uClibc_config.h ; \
+       fi
 
 .PHONY: dummy subdirs
 
index 47e663f..a22dc4c 100644 (file)
@@ -24,7 +24,12 @@ TOPDIR=../
 include $(TOPDIR)Rules.mak
 LIBC=$(TOPDIR)libc.a
 
-DIRS = rpc
+ifeq ($(strip $(INCLUDE_RPC)),true)
+       DIRS=rpc
+else
+       DIRS=
+endif
+ALL_SUBDIRS = $(shell find * -type d -prune -name [a-z]\*)
 
 MSRC=addr.c
 MOBJ=inet_aton.o inet_addr.o inet_ntoa.o
@@ -78,12 +83,12 @@ clean: subdirs_clean
        rm -f *.[oa] *~ core
 
 subdirs: $(patsubst %, _dir_%, $(DIRS))
-subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
+subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
 
 $(patsubst %, _dir_%, $(DIRS)) : dummy
        $(MAKE) -C $(patsubst _dir_%, %, $@)
 
-$(patsubst %, _dirclean_%, $(DIRS)) : dummy
+$(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
        $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
 
 .PHONY: dummy