2 # Mach Operating System
3 # Copyright (c) 1986 Carnegie-Mellon University
4 # All rights reserved. The CMU software License Agreement specifies
5 # the terms and conditions for use and redistribution.
9 # Export IDENT for sub-makefiles
14 # XXX: INCFLAGS to include libsa prototypes
16 INCFLAGS_MAKEFILE= -I$(SOURCE)libsa
18 export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
19 export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
20 export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
21 export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
23 include $(MakeInc_cmd)
24 include $(MakeInc_def)
29 CFLAGS+= -DMACH_KERNEL_PRIVATE
32 # Directories for mig generated files
45 # Make sure we don't remove this by accident if interrupted at the wrong
51 $(SOURCE_DIR)/$(COMPONENT)/conf/version.major \
52 $(SOURCE_DIR)/$(COMPONENT)/conf/version.minor \
53 $(SOURCE_DIR)/$(COMPONENT)/conf/version.variant
56 $(SOURCE_DIR)/$(COMPONENT)/conf/copyright.osf \
57 $(SOURCE_DIR)/$(COMPONENT)/conf/copyright.cmu
60 # Theses macros are filled in by the config program depending on the
61 # current configuration. The MACHDEP macro is replaced by the
62 # contents of the machine dependent makefile template and the others
63 # are replaced by the corresponding symbol definitions for the
81 # OBJSDEPS is the set of files (defined in the machine dependent
82 # template if necessary) which all objects depend on (such as an
83 # in-line assembler expansion filter)
92 $(COMPONENT).o: $(LDOBJS) assym.s
93 @echo "[ creating $(COMPONENT).o ]"
94 $(RM) $(RMFLAGS) vers.c
95 $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/newvers \
96 `$(CAT) ${VERSION_FILES}` ${COPYRIGHT_FILES}
97 ${KCC} $(CFLAGS) $(INCLUDES) -c vers.c
98 @echo [ updating $(COMPONENT).o ${OSFMK_KERNEL_CONFIG} ]
99 $(LD) $(LDFLAGS_COMPONENT) -o $(COMPONENT).o ${LDOBJS} vers.o
101 do_all: $(COMPONENT).o
104 ${MD} -u Makedep -f -d `ls *.d`;
106 do_build_all: do_depend
108 # genassym.o actually is an assembly file,
109 # we name it genassym.o to help with the automatic
110 # dependency generation
112 genassym.o: $(SOURCE_DIR)/$(COMPONENT)/$(arch_config)/genassym.c
113 ${KCC} ${CFLAGS} -MD ${_HOST_EXTRA_CFLAGS} -S -o ${@} -c ${INCFLAGS} $<
116 sed -e '/#DEFINITION#/!d' -e 's/^.*#DEFINITION#//' -e 's/\$$//' genassym.o > ${@}
125 include $(MakeInc_rule)
126 include $(MakeInc_dir)