]> git.saurik.com Git - apple/xnu.git/blame_incremental - osfmk/conf/Makefile
xnu-1699.22.73.tar.gz
[apple/xnu.git] / osfmk / conf / Makefile
... / ...
CommitLineData
1export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5
6include $(MakeInc_cmd)
7include $(MakeInc_def)
8
9SETUP_SUBDIRS =
10
11COMP_SUBDIRS =
12
13INST_SUBDIRS =
14
15ifndef OSFMK_KERNEL_CONFIG
16export OSFMK_KERNEL_CONFIG = $(KERNEL_CONFIG)
17endif
18
19ifneq ($(MACHINE_CONFIG), DEFAULT)
20export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)_$(MACHINE_CONFIG)/$(COMPONENT)
21else
22export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)
23endif
24
25MASTER_CPU_PER_SOC = $(SOURCE)/MASTER.$(ARCH_CONFIG_LC).$(MACHINE_CONFIG_LC)
26
27$(COMPOBJROOT)/$(OSFMK_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)/$(OSFMK_KERNEL_CONFIG) $(OSFMK_KERNEL_CONFIG); \
40 );
41
42$(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/platforms.h: $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/Makefile
43 $(_v)(cd $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG); \
44 ${RM} $@; \
45 ${LN} cputypes.h $@; \
46 )
47
48do_all: $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/Makefile \
49 $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/platforms.h
50 $(_v)next_source=$(subst conf/,,$(SOURCE)); \
51 ${MAKE} -C $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG) \
52 MAKEFILES=$(TARGET)/$(OSFMK_KERNEL_CONFIG)/Makefile \
53 SOURCE=$${next_source} \
54 TARGET=$(TARGET) \
55 INCL_MAKEDEP=FALSE \
56 KERNEL_CONFIG=$(OSFMK_KERNEL_CONFIG) \
57 build_all;
58
59do_build_all: do_all
60
61include $(MakeInc_rule)
62include $(MakeInc_dir)