about summary refs log tree commit diff
path: root/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/sunrpc/Makefile b/sunrpc/Makefile
index 428e6a1ad1..11f5541542 100644
--- a/sunrpc/Makefile
+++ b/sunrpc/Makefile
@@ -73,11 +73,18 @@ rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \
 distribute := rpc_util.h rpc_parse.h rpc_scan.h $(rpcgen-objs:.o=.c) etc.rpc
 extra-objs = $(rpcgen-objs)
 
+all: # Make this the default target; it will be defined in Rules.
+
+include ../Makeconfig
+
+ifeq (no,$(cross-compile))
+# We can only build this library if we can run the rpcgen we build.
 extra-libs := librpcsvc
 extra-libs-others := librpcsvc # Make it in `others' pass, not `lib' pass.
 librpcsvc-routines = $(rpcsvc:%.x=x%)
 librpcsvc-inhibit-o = .so # Build no shared rpcsvc library.
 omit-deps = $(librpcsvc-routines)
+endif
 
 # Sun's code is not too clean.
 override +gccwarn := -w