1# 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. 6# 7 8export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd 9export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def 10export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule 11export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir 12 13include $(MakeInc_cmd) 14include $(MakeInc_def) 15 16# 17# XXX: CFLAGS 18# 19CFLAGS+= -include meta_features.h -DBSD_KERNEL_PRIVATE 20 21# Objects that don't want -Wcast-align warning (8474835) 22OBJS_NO_CAST_ALIGN = \ 23 mac_alloc.o \ 24 mac_base.o 25 26$(foreach file,$(OBJS_NO_CAST_ALIGN),$(eval $(call add_perfile_cflags,$(file),-Wno-cast-align))) 27 28# 29# INCFLAGS to include security prototypes 30# 31INCFLAGS_MAKEFILE= -I$(SOURCE)/.. 32 33# 34# Directories for mig generated files 35# 36COMP_SUBDIRS = 37 38# 39# Make sure we don't remove this by accident if interrupted at the wrong 40# time. 41# 42.PRECIOUS: Makefile 43 44VERSION_FILES= \ 45 $(SOURCE_DIR)/$(COMPONENT)/conf/version.major \ 46 $(SOURCE_DIR)/$(COMPONENT)/conf/version.minor \ 47 $(SOURCE_DIR)/$(COMPONENT)/conf/version.variant 48 49COPYRIGHT_FILES = \ 50 $(SOURCE_DIR)/$(COMPONENT)/conf/copyright.nai 51 52# 53# Theses macros are filled in by the config program depending on the 54# current configuration. The MACHDEP macro is replaced by the 55# contents of the machine dependent makefile template and the others 56# are replaced by the corresponding symbol definitions for the 57# configuration. 58# 59 60%OBJS 61 62%CFILES 63 64%SFILES 65 66%MACHDEP 67 68# 69# OBJSDEPS is the set of files (defined in the machine dependent 70# template if necessary) which all objects depend on (such as an 71# in-line assembler expansion filter) 72# 73${OBJS}: ${OBJSDEPS} 74 75LDOBJS = $(OBJS) 76 77$(COMPONENT).filelist: $(LDOBJS) vers.o 78 @echo LDFILELIST $(COMPONENT) 79 $(_v)( for obj in ${LDOBJS} vers.o; do \ 80 echo $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \ 81 done; ) > $(COMPONENT).filelist 82 83do_all: $(COMPONENT).filelist 84 85do_build_all:: do_all 86 87vers.o: vers.c 88 @echo CC $@ 89 $(_v)${KCC} $(CFLAGS) -o ${@} -c ${INCFLAGS} $< 90 91vers.c: 92 $(_v)$(SRCROOT)/SETUP/newvers \ 93 `$(CAT) ${VERSION_FILES}` ${COPYRIGHT_FILES} 94 95%RULES 96 97include $(MakeInc_rule) 98include $(MakeInc_dir) 99