summaryrefslogtreecommitdiff
path: root/procfs/Makefile
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-05-23 02:05:10 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-05-23 02:05:10 +0200
commitbad79d577c8b7e87de5113bbb03c3de72c06f4a1 (patch)
tree2ea1ac5bc936ec5c9b1a154b52d9acf21cac0a09 /procfs/Makefile
parent6f4e22c2fb1bf412e84fe4ca105944921a8c7c5d (diff)
implement /proc/slabinfo
Diffstat (limited to 'procfs/Makefile')
-rw-r--r--procfs/Makefile22
1 files changed, 21 insertions, 1 deletions
diff --git a/procfs/Makefile b/procfs/Makefile
index 5c51c1d2..28205962 100644
--- a/procfs/Makefile
+++ b/procfs/Makefile
@@ -1,6 +1,6 @@
TARGET = procfs
OBJS = procfs.o netfs.o procfs_dir.o \
- process.o proclist.o rootdir.o dircat.o main.o
+ process.o proclist.o rootdir.o dircat.o main.o mach_debugUser.o
LIBS = -lnetfs -lps -lfshelp -lpthread
CC = gcc
@@ -19,8 +19,28 @@ CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
all: $(TARGET)
+rootdir.o: rootdir.c mach_debug_U.h
+
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
clean:
$(RM) $(TARGET) $(OBJS)
+
+# This is the gist of the MIG user stub handling from Hurd's build
+# system:
+
+# Where to find .defs files.
+vpath %.defs /usr/include/mach_debug
+
+MIG = mig
+MIGCOM = $(MIG) -cc cat - /dev/null
+MIGCOMFLAGS := -subrprefix __
+
+%.udefsi: %.defs
+ $(CPP) -x c $(CPPFLAGS) $(MIGUFLAGS) $($*-MIGUFLAGS) \
+ $< -o $*.udefsi
+
+%_U.h %User.c: %.udefsi
+ $(MIGCOM) $(MIGCOMFLAGS) $(MIGCOMUFLAGS) $($*-MIGCOMUFLAGS) < $< \
+ -user $*User.c -server /dev/null -header $*_U.h