|
|
xnu-68.4-1.1
#
# Mach Operating System
# Copyright (c) 1986 Carnegie-Mellon University
# All rights reserved. The CMU software License Agreement specifies
# the terms and conditions for use and redistribution.
#
#
# Export IDENT for sub-makefiles
#
export IDENT
#
# XXX: INCFLAGS
#
INCFLAGS_MAKEFILE= $(INCFLAGS_POSIX) -I$(SOURCE) -I$(SOURCE)include
export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
include $(MakeInc_cmd)
include $(MakeInc_def)
#
# XXX: CFLAGS
#
CFLAGS+= -DKERNEL -DDRIVER_PRIVATE \
-Wall -Wno-four-char-constants -fno-common \
-DDEBUG=1 -DIOASSERT=1 \
#-DIOKITDEBUG=-1
# additional flags for cpp
CPPFLAGS_GEN = -x c++ -fno-rtti -fno-exceptions -fcheck-new -fvtable-thunks
CPPFLAGS_PPC =
CPPFLAGS_I386 =
CPPFLAGS = $(CPPFLAGS_GEN) \
$($(addsuffix $(ARCH_CONFIG),CPPFLAGS_)) \
$($(addsuffix $(KERNEL_CONFIG),CPPFLAGS_))
SFLAGS+= -DKERNEL
#
# Directories for mig generated files
#
COMP_SUBDIRS =
#
# Make sure we don't remove this by accident if interrupted at the wrong
# time.
#
.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
# contents of the machine dependent makefile template and the others
# are replaced by the corresponding symbol definitions for the
# configuration.
#
%OBJS
%CFILES
%MFILES
%SFILES
%BFILES
%ORDERED
%MACHDEP
#
# OBJSDEPS is the set of files (defined in the machine dependent
# template if necessary) which all objects depend on (such as an
# in-line assembler expansion filter)
#
${OBJS}: ${OBJSDEPS}
%LOAD
LDOBJS = $(OBJS)
$(COMPONENT).o: $(LDOBJS)
@echo "creating $(COMPONENT).o"
$(RM) $(RMFLAGS) vers.c
$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/newvers \
`$(CAT) ${VERSION_FILES}` ${COPYRIGHT_FILES}
${KCC} $(CFLAGS) $(INCLUDES) -c vers.c
@echo [ updating $(COMPONENT).o ${IOKIT_KERNEL_CONFIG} ]
$(LD) $(LDFLAGS_COMPONENT) -o $(COMPONENT).o ${LDOBJS} vers.o
do_depend:
${MD} -u Makedep -f -d `ls *.d`
do_all: $(COMPONENT).o
.ORDER: do_all do_depend
do_build_all: do_all do_depend
%RULES
-include Makedep
include $(MakeInc_rule)
#
# Compilation rules to generate .co from .cp or .cpo from .cpp
# The config tool slickly changes the last source filename char to 'o'
# for the object filename.
#
P_RULE_1A=${KCC} -o $@ -c ${CPPFLAGS} ${CFLAGS} -MD ${${join $@,_CFLAGS}} ${INCFLAGS} ${${join $@,_INCFLAGS}}
P_RULE_1B=$(<F)
P_RULE_2=@sed 's/.o: /.cpo: /' $(@:.cpo=.d) > $(@:.cpo=.d~) && mv $(@:.cpo=.d~) $(@:.cpo=.d)
P_RULE_3=
P_RULE_4=
include $(MakeInc_dir)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.