]> git.saurik.com Git - apple/xnu.git/blob - bsd/conf/Makefile
xnu-1699.22.73.tar.gz
[apple/xnu.git] / bsd / conf / Makefile
1 export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2 export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3 export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4 export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5
6 include $(MakeInc_cmd)
7 include $(MakeInc_def)
8
9 SETUP_SUBDIRS =
10
11 COMP_SUBDIRS =
12
13 INST_SUBDIRS =
14
15 ifndef BSD_KERNEL_CONFIG
16 export BSD_KERNEL_CONFIG = $(KERNEL_CONFIG)
17 endif
18
19 ifneq ($(MACHINE_CONFIG), DEFAULT)
20 export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)_$(MACHINE_CONFIG)/$(COMPONENT)
21 else
22 export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)
23 endif
24
25 MASTER_CPU_PER_SOC = $(SOURCE)/MASTER.$(ARCH_CONFIG_LC).$(MACHINE_CONFIG_LC)
26
27 $(COMPOBJROOT)/$(BSD_KERNEL_CONFIG)/Makefile : $(SOURCE)/MASTER \
28 $(SOURCE)/MASTER.$(ARCH_CONFIG_LC) \
29 $(SOURCE)/Makefile.template \
30 $(SOURCE)/Makefile.$(ARCH_CONFIG_LC) \
31 $(SOURCE)/files \
32 $(SOURCE)/files.$(ARCH_CONFIG_LC)
33 $(_v)(doconf_target=$(addsuffix /conf, $(TARGET)); \
34 $(MKDIR) $${doconf_target}; \
35 cd $${doconf_target}; \
36 rm -f $(notdir $?); \
37 cp $? $${doconf_target}; \
38 if [ -f $(MASTER_CPU_PER_SOC) ]; then cp $(MASTER_CPU_PER_SOC) $${doconf_target}; fi; \
39 $(SRCROOT)/SETUP/config/doconf -c -cpu $(ARCH_CONFIG_LC) -soc $(MACHINE_CONFIG_LC) -d $(TARGET)/$(BSD_KERNEL_CONFIG) $(BSD_KERNEL_CONFIG); \
40 );
41
42 do_all: $(COMPOBJROOT)/$(BSD_KERNEL_CONFIG)/Makefile
43 $(_v)next_source=$(subst conf/,,$(SOURCE)); \
44 ${MAKE} -C $(COMPOBJROOT)/$(BSD_KERNEL_CONFIG) \
45 MAKEFILES=$(TARGET)/$(BSD_KERNEL_CONFIG)/Makefile \
46 SOURCE=$${next_source} \
47 TARGET=$(TARGET) \
48 INCL_MAKEDEP=FALSE \
49 KERNEL_CONFIG=$(BSD_KERNEL_CONFIG) \
50 build_all;
51
52 do_build_all: do_all
53
54 include $(MakeInc_rule)
55 include $(MakeInc_dir)