export IDENT
#
-# XXX: INCFLAGS
+# INCFLAGS
#
INCFLAGS_MAKEFILE=
include $(MakeInc_def)
#
-# XXX: CFLAGS
+# CFLAGS
#
-CFLAGS+= -DKERNEL -DLIBKERN_KERNEL_PRIVATE -DOSALLOCDEBUG=1 \
- -Wall -Wno-four-char-constants -fno-common
+CFLAGS+= -include meta_features.h -DLIBKERN_KERNEL_PRIVATE -DOSALLOCDEBUG=1 \
+ $(CFLAGS_INLINE_CONFIG)
-SFLAGS+= -DKERNEL
+# zlib is 3rd party source
+compress.o_CWARNFLAGS_ADD = -Wno-cast-qual
+deflate.o_CWARNFLAGS_ADD = -Wno-cast-qual
+infback.o_CWARNFLAGS_ADD = -Wno-cast-qual
+inffast.o_CWARNFLAGS_ADD = -Wno-cast-qual
+inflate.o_CWARNFLAGS_ADD = -Wno-cast-qual
+trees.o_CWARNFLAGS_ADD = -Wno-cast-qual
+uncompr.o_CWARNFLAGS_ADD = -Wno-cast-qual
+
+# warnings in bison-generated code
+OSUnserializeXML.cpo_CXXWARNFLAGS_ADD = -Wno-uninitialized
+
+# Runtime support functions don't interact well with LTO (9294679)
+stack_protector.o_CFLAGS_ADD += $(CFLAGS_NOLTO_FLAG)
#
# Directories for mig generated files
#
.PRECIOUS: Makefile
-VERSION_FILES= \
- $(SOURCE_DIR)/$(COMPONENT)/conf/version.major \
- $(SOURCE_DIR)/$(COMPONENT)/conf/version.minor \
- $(SOURCE_DIR)/$(COMPONENT)/conf/version.variant
-
-COPYRIGHT_FILES = \
- $(SOURCE_DIR)/$(COMPONENT)/conf/copyright
-
#
# Theses macros are filled in by the config program depending on the
# current configuration. The MACHDEP macro is replaced by the
LDOBJS = $(OBJS)
-$(COMPONENT).o: $(LDOBJS)
- @echo "creating $(COMPONENT).o"
- $(RM) $(RMFLAGS) vers.c
- $(COMPOBJROOT)/newvers \
- `$(CAT) ${VERSION_FILES}` ${COPYRIGHT_FILES}
- ${KCC} $(CFLAGS) $(INCLUDES) -c vers.c
- @echo [ updating $(COMPONENT).o ${LIBKERN_KERNEL_CONFIG} ]
- $(LD) $(LDFLAGS_COMPONENT) -o $(COMPONENT).o ${LDOBJS} vers.o
-
-do_all: $(COMPONENT).o
+$(COMPONENT).filelist: $(LDOBJS)
+ $(_v)if [ $(BUILD_MACHO_OBJ) -eq 1 ]; then \
+ for hib_file in ${HIB_FILES}; \
+ do \
+ $(SEG_HACK) __HIB $${hib_file} -o $${hib_file}__; \
+ mv $${hib_file}__ $${hib_file} ; \
+ done; \
+ fi
+ @echo LDFILELIST $(COMPONENT)
+ $(_v)( for obj in ${LDOBJS}; do \
+ echo $(TARGET)$(COMP_OBJ_DIR)/$(KERNEL_CONFIG)/$${obj}; \
+ done; ) > $(COMPONENT).filelist
+
+do_all: $(COMPONENT).filelist
do_depend: do_all
- ${MD} -u Makedep -f -d `ls *.d`
+ $(_v)${MD} -u Makedep -f -d `ls *.d`
do_build_all: do_depend
include $(MakeInc_rule)
include $(MakeInc_dir)
-