1 # If we were configured with `--with-mach=DIR', then config.make sets
2 # mach-srcdir to DIR. Otherwise guess we are in a big source tree.
4 mach-srcdir = ../../mach
7 # Look for header files in mach/ under the top-level library source directory.
8 includes += -I$(..)mach
10 # When compiling, use the Mach header files directly from the kernel sources.
11 includes += -I$(mach-srcdir)
13 # Find Mach header files in the kernel source.
14 vpath mach/%.h $(mach-srcdir)
15 vpath device/%.h $(mach-srcdir)
17 ifneq (mach,$(subdir))
18 # Subdirectories other than mach/ might use the generated Mach headers.
19 # So make sure we get a chance to run in mach/ to make them before all else.
22 mach_interface.h = $(objpfx)mach/mach_interface.h
24 mach_interface.h = $(..)mach/mach/mach_interface.h
27 before-compile += $(mach_interface.h)
28 $(mach_interface.h): # Run only if it doesn't exist.
29 $(MAKE) -C $(..)mach $(patsubst $(..)mach/%,%,$@)