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