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.
8 export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
9 export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
10 export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
11 export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
13 include $(MakeInc_cmd)
14 include $(MakeInc_def)
19 CFLAGS+= -include meta_features.h -DMACH_KERNEL_PRIVATE
21 # Objects that don't want -Wcast-align warning (8474835)
22 OBJS_NO_CAST_ALIGN = \
55 sched_fixedpriority.o \
68 $(foreach file,$(OBJS_NO_CAST_ALIGN),$(eval $(call add_perfile_cflags,$(file),-Wno-cast-align)))
71 # Do not provide CTF symbolic these files
73 chud_glue.o_SKIP_CTFCONVERT = 1
76 # XXX: INCFLAGS to include libsa prototypes
78 INCFLAGS_MAKEFILE= -I$(SOURCE)libsa
81 # Directories for mig generated files
93 # Make sure we don't remove this by accident if interrupted at the wrong
99 # Theses macros are filled in by the config program depending on the
100 # current configuration. The MACHDEP macro is replaced by the
101 # contents of the machine dependent makefile template and the others
102 # are replaced by the corresponding symbol definitions for the
115 # OBJSDEPS is the set of files (defined in the machine dependent
116 # template if necessary) which all objects depend on (such as an
117 # in-line assembler expansion filter)
123 $(COMPONENT).filelist: $(LDOBJS) assym.s
124 $(_v)for hib_file in ${HIB_FILES}; \
126 $(SEG_HACK) -n __HIB -o $${hib_file}__ $${hib_file} ; \
127 mv $${hib_file}__ $${hib_file} ; \
129 @echo LDFILELIST $(COMPONENT)
130 $(_v)( for obj in ${LDOBJS}; do \
131 echo $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \
132 done; ) > $(COMPONENT).filelist
134 do_all: $(COMPONENT).filelist
136 do_build_all:: do_all
138 # genassym.o actually is an assembly file,
139 # we name it genassym.o to help with the automatic
140 # dependency generation
142 GENASSYM_LOCATION = $(CURRENT_ARCH_CONFIG_LC)
144 ifeq ($(CURRENT_ARCH_CONFIG_LC),x86_64)
145 GENASSYM_LOCATION = i386
148 genassym.o: $(SOURCE_DIR)/$(COMPONENT)/$(GENASSYM_LOCATION)/genassym.c
150 $(_v)${KCC} $(subst -flto,,${CFLAGS}) -MD -S -o ${@} ${INCFLAGS} $<
153 $(_v)sed -e '/#DEFINITION#/!d' -e 's/^.*#DEFINITION#//' -e 's/\$$//' -e 'p' -e 's/#//2' -e 's/[^A-Za-z0-9_]*\([A-Za-z0-9_]*\)/ \1_NUM/2' genassym.o > $@
159 include $(MakeInc_rule)
160 include $(MakeInc_dir)