]>
Commit | Line | Data |
---|---|---|
1c79356b A |
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 | ||
7 | include $(MakeInc_cmd) | |
8 | include $(MakeInc_def) | |
9 | ||
10 | SETUP_SUBDIRS = \ | |
11 | tools | |
12 | ||
13 | COMP_SUBDIRS = | |
14 | ||
15 | INST_SUBDIRS = | |
16 | ||
17 | ifndef OSFMK_KERNEL_CONFIG | |
18 | export OSFMK_KERNEL_CONFIG = $(KERNEL_CONFIG) | |
19 | endif | |
20 | ||
21 | COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT) | |
22 | ||
23 | $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/doconf: | |
24 | make build_setup | |
25 | ||
26 | $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/Makefile: $(SOURCE)/MASTER \ | |
27 | $(SOURCE)/MASTER.$(arch_config) \ | |
28 | $(SOURCE)/Makefile.template \ | |
29 | $(SOURCE)/Makefile.$(arch_config) \ | |
30 | $(SOURCE)/files \ | |
31 | $(SOURCE)/files.$(arch_config) \ | |
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}; \ | |
40 | $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/doconf -c -cpu $(arch_config) -d $(TARGET)/$(OSFMK_KERNEL_CONFIG) $(OSFMK_KERNEL_CONFIG); \ | |
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 | ||
49 | do_setup_conf: $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/doconf \ | |
50 | $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/Makefile \ | |
51 | $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/platforms.h | |
52 | ||
53 | do_all: do_setup_conf | |
54 | @echo "[ $(SOURCE) ] Starting do_all $(COMPONENT) $(OSFMK_KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"; \ | |
55 | (cd $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG); \ | |
56 | next_source=$(subst conf/,,$(SOURCE)); \ | |
57 | ${MAKE} MAKEFILES=$(TARGET)/$(OSFMK_KERNEL_CONFIG)/Makefile \ | |
58 | SOURCE=$${next_source} \ | |
59 | TARGET=$(TARGET) \ | |
60 | build_all \ | |
61 | ); \ | |
62 | echo "[ $(SOURCE) ] Returning do_all $(COMPONENT) $(OSFMK_KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"; | |
63 | ||
64 | do_build_all: do_all | |
65 | ||
66 | include $(MakeInc_rule) | |
67 | include $(MakeInc_dir) | |
68 |