$(+includes) $(migdefines) -subrprefix __
# Putting CC in the enivronment makes the mig wrapper script
# use the same compiler setup we are using to run cpp.
-MIG := CC='${CC}' $(MIG)
+MIG := CC='${CC}' CPP='${CPP}' $(MIG)
.SUFFIXES: .defs # Just to set specified_rule_matched.
$(patsubst %,$(objpfx)%.udeps,$(user-interfaces)):
$(objpfx)%.udeps: $(..)mach/Machrules
$(make-target-directory)
+# We must use $(CFLAGS) to get -O flags that affect #if's in header files.
$(include-%.defs) | \
- $(CC) $(CPPFLAGS) -M -x c - | \
+ $(CC) $(CFLAGS) $(CPPFLAGS) -M -x c - | \
sed -e 's,- *:,$@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h)\
$(@:.udeps=_server.c) $(@:.udeps=_server.h):,' \
$(sed-remove-objpfx) > $@.new
$(objpfx)mach-syscalls.mk: syscalls.awk Makefile
# Go kludges!!!
$(make-target-directory)
+# We must use $(CFLAGS) to get -O flags that affect #if's in header files.
echo '#include <mach/syscall_sw.h>' | \
DEPENDENCIES_OUTPUT='$@-dep $@' \
- $(CC) $(CPPFLAGS) -E -x c-header - \
+ $(CC) $(CFLAGS) $(CPPFLAGS) -E -x c-header - \
-D_MACH_`echo $(base-machine) | tr a-z A-Z`_SYSCALL_SW_H_=1 | \
sed -n -e 's/^kernel_trap(\(.*\),\([-0-9]*\),\([0-9]*\))$$/\1 \2 \3/p'\
| $(AWK) -f $< > $@-new