+$(TARGET)/mach_kernel: $(addprefix $(TARGET)/,$(foreach component,$(COMPONENT_LIST), $(addprefix $(component)/$(firstword $($(addsuffix _KERNEL_CONFIG, $(shell printf $(component) | tr a-z A-Z))) $(KERNEL_CONFIG))/, $(addsuffix .o, $(component))))) lastkernelconstructor.o
+ $(_v)${MAKE} version.o
+ @echo LD mach_kernel.sys
+ $(_v)$(CAT) $(addprefix $(TARGET)/,$(foreach component,$(COMPONENT_LIST), $(addprefix $(component)/$(firstword $($(addsuffix _KERNEL_CONFIG, $(shell printf $(component) | tr a-z A-Z))) $(KERNEL_CONFIG))/, $(addsuffix .o, $(component))))) > mach_kernel.filelist
+ $(_v)$(LD) $(LDFLAGS_KERNEL) -filelist mach_kernel.filelist version.o lastkernelconstructor.o `if [ -e $(STATIC_KMODS) ]; then echo $(STATIC_KMODS); fi` \
+ -o $(TARGET)/mach_kernel.sys $(LD_KERNEL_LIBS)
+ @echo DSYMUTIL mach_kernel.sys
+ $(_v)if [ $(BUILD_DWARF) -eq 1 ]; then \
+ $(DSYMUTIL) $(DSYMUTIL_FLAGS) $(TARGET)/mach_kernel.sys -o $(TARGET)/mach_kernel.sys.dSYM > /dev/null; \
+ fi;
+ @echo STRIP mach_kernel
+ $(_v)$(STRIP) $(STRIP_FLAGS) $(TARGET)/mach_kernel.sys -o $(TARGET)/mach_kernel
+ @echo CTFMERGE mach_kernel
+ $(_v)if [ $(BUILD_DWARF) -eq 1 ]; then \
+ $(FIND) $(OBJPATH)/ -name \*.ctf -size 0 \
+ -exec $(RM) -rf {} \; ; \
+ $(CTFMERGE) -l xnu -o $(TARGET)/mach_kernel \
+ $(OBJPATH)/*/$(KERNEL_CONFIG)/*.*o.ctf || true; \
+ fi; \
+
+version.o: $(OBJPATH)/version.c
+ ${C_RULE_1A}$<
+ ${C_RULE_2}
+ ${C_RULE_4}