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
19 export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
20 export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
21 export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
22 export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
24 include $(MakeInc_cmd)
25 include $(MakeInc_def)
30 CFLAGS+= -DKERNEL -DLIBKERN_KERNEL_PRIVATE -DDEBUG \
31 -Wall -Wno-four-char-constants -fno-common
36 # Directories for mig generated files
41 # Make sure we don't remove this by accident if interrupted at the wrong
47 $(SOURCE_DIR)/$(COMPONENT)/conf/version.major \
48 $(SOURCE_DIR)/$(COMPONENT)/conf/version.minor \
49 $(SOURCE_DIR)/$(COMPONENT)/conf/version.variant
52 $(SOURCE_DIR)/$(COMPONENT)/conf/copyright
55 # Theses macros are filled in by the config program depending on the
56 # current configuration. The MACHDEP macro is replaced by the
57 # contents of the machine dependent makefile template and the others
58 # are replaced by the corresponding symbol definitions for the
76 # OBJSDEPS is the set of files (defined in the machine dependent
77 # template if necessary) which all objects depend on (such as an
78 # in-line assembler expansion filter)
87 $(COMPONENT).o: $(LDOBJS)
88 @echo "creating $(COMPONENT).o"
89 $(RM) $(RMFLAGS) vers.c
90 $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/newvers \
91 `$(CAT) ${VERSION_FILES}` ${COPYRIGHT_FILES}
92 ${KCC} $(CFLAGS) $(INCLUDES) -c vers.c
93 @echo [ updating $(COMPONENT).o ${LIBKERN_KERNEL_CONFIG} ]
94 $(LD) $(LDFLAGS_COMPONENT) -o $(COMPONENT).o ${LDOBJS} vers.o /usr/local/lib/libkld.a
95 $(SEG_HACK) __KLD $(COMPONENT).o -o $(COMPONENT)_kld.o
96 mv $(COMPONENT)_kld.o $(COMPONENT).o
98 do_all: $(COMPONENT).o
101 ${MD} -u Makedep -f -d `ls *.d`
103 do_build_all: do_depend
109 include $(MakeInc_rule)
111 include $(MakeInc_dir)