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.
21 before-compile += $(common-objpfx)mach/mach_interface.h
22 $(common-objpfx)mach/%: # Run only if it doesn't exist.
23 $(MAKE) -C $(..)mach $(patsubst $(..)mach/%,%,$@)