diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -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 |