summaryrefslogtreecommitdiff
path: root/libc/inet
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet')
-rw-r--r--libc/inet/Makefile21
-rw-r--r--libc/inet/rpc/Makefile2
2 files changed, 19 insertions, 4 deletions
diff --git a/libc/inet/Makefile b/libc/inet/Makefile
index 07d84d6eb..572263eb1 100644
--- a/libc/inet/Makefile
+++ b/libc/inet/Makefile
@@ -24,6 +24,8 @@ TOPDIR=../
include $(TOPDIR)Rules.make
LIBC=$(TOPDIR)libc.a
+DIRS = #rpc
+
MSRC=addr.c
MOBJ=inet_aton.o inet_addr.o inet_ntoa.o
@@ -34,9 +36,11 @@ MOBJ2=encodeh.o decodeh.o encoded.o decoded.o lengthd.o encodeq.o \
opennameservers.o closenameservers.o resolvename.o gethostbyname.o\
gethostbyaddr.o
OBJS=$(MOBJ) $(MOBJ2)
+
+
all: $(OBJS) $(LIBC)
-$(LIBC): ar-target
+$(LIBC): ar-target subdirs
ar-target: $(OBJS)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
@@ -49,6 +53,17 @@ $(MOBJ2): $(MSRC2)
$(OBJS): Makefile
-clean:
- rm -f *.[oa] *~ core
+clean: subdirs_clean
+ rm -f libc.a
+
+subdirs: $(patsubst %, _dir_%, $(DIRS))
+subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
+
+$(patsubst %, _dir_%, $(DIRS)) : dummy
+ $(MAKE) -C $(patsubst _dir_%, %, $@)
+
+$(patsubst %, _dirclean_%, $(DIRS)) : dummy
+ $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
+
+.PHONY: dummy
diff --git a/libc/inet/rpc/Makefile b/libc/inet/rpc/Makefile
index cc6403648..a9a4717ac 100644
--- a/libc/inet/rpc/Makefile
+++ b/libc/inet/rpc/Makefile
@@ -20,7 +20,7 @@
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-TOPDIR=../
+TOPDIR=../../
include $(TOPDIR)Rules.make
LIBC=$(TOPDIR)libc.a
CFLAGS+=-I$(TOPDIR)include/linux