]> git.saurik.com Git - apple/xnu.git/blame_incremental - osfmk/conf/Makefile
xnu-1504.9.17.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 tools
11
12COMP_SUBDIRS =
13
14INST_SUBDIRS =
15
16ifndef OSFMK_KERNEL_CONFIG
17export OSFMK_KERNEL_CONFIG = $(KERNEL_CONFIG)
18endif
19
20ifneq ($(MACHINE_CONFIG), DEFAULT)
21export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)_$(MACHINE_CONFIG)/$(COMPONENT)
22else
23export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)
24endif
25
26$(COMPOBJROOT)/doconf:
27 @make build_setup
28
29$(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/Makefile: $(SOURCE)/MASTER \
30 $(SOURCE)/MASTER.$(ARCH_CONFIG_LC) \
31 $(SOURCE)/Makefile.template \
32 $(SOURCE)/Makefile.$(ARCH_CONFIG_LC) \
33 $(SOURCE)/files \
34 $(SOURCE)/files.$(ARCH_CONFIG_LC) \
35 $(COMPOBJROOT)/doconf
36 $(_v)(doconf_target=$(addsuffix /conf, $(TARGET)); \
37 $(MKDIR) $${doconf_target}; \
38 cd $${doconf_target}; \
39 rm -f $(notdir $?); \
40 cp $? $${doconf_target}; \
41 $(COMPOBJROOT)/doconf -c -cpu $(ARCH_CONFIG_LC) -d $(TARGET)/$(OSFMK_KERNEL_CONFIG) $(OSFMK_KERNEL_CONFIG); \
42 );
43
44$(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/platforms.h: $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/Makefile
45 $(_v)(cd $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG); \
46 ${RM} $@; \
47 ${LN} cputypes.h $@; \
48 )
49
50do_setup_conf: $(COMPOBJROOT)/doconf \
51 $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/Makefile \
52 $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/platforms.h
53
54do_all: do_setup_conf
55 $(_v)next_source=$(subst conf/,,$(SOURCE)); \
56 ${MAKE} -C $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG) \
57 MAKEFILES=$(TARGET)/$(OSFMK_KERNEL_CONFIG)/Makefile \
58 SOURCE=$${next_source} \
59 TARGET=$(TARGET) \
60 INCL_MAKEDEP=FALSE \
61 KERNEL_CONFIG=$(OSFMK_KERNEL_CONFIG) \
62 build_all;
63
64do_build_all: do_all
65
66include $(MakeInc_rule)
67include $(MakeInc_dir)