]>
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 | ||
1c79356b A |
6 | include $(MakeInc_cmd) |
7 | include $(MakeInc_def) | |
8 | ||
6d2010ae | 9 | SETUP_SUBDIRS = |
1c79356b A |
10 | |
11 | COMP_SUBDIRS = | |
12 | ||
13 | INST_SUBDIRS = | |
14 | ||
15 | ifndef OSFMK_KERNEL_CONFIG | |
16 | export OSFMK_KERNEL_CONFIG = $(KERNEL_CONFIG) | |
17 | endif | |
18 | ||
2d21ac55 A |
19 | ifneq ($(MACHINE_CONFIG), DEFAULT) |
20 | export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)_$(MACHINE_CONFIG)/$(COMPONENT) | |
21 | else | |
55e303ae | 22 | export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT) |
2d21ac55 | 23 | endif |
1c79356b | 24 | |
6d2010ae | 25 | MASTER_CPU_PER_SOC = $(SOURCE)/MASTER.$(ARCH_CONFIG_LC).$(MACHINE_CONFIG_LC) |
1c79356b A |
26 | |
27 | $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/Makefile: $(SOURCE)/MASTER \ | |
0b4e3aa0 | 28 | $(SOURCE)/MASTER.$(ARCH_CONFIG_LC) \ |
1c79356b | 29 | $(SOURCE)/Makefile.template \ |
0b4e3aa0 | 30 | $(SOURCE)/Makefile.$(ARCH_CONFIG_LC) \ |
1c79356b | 31 | $(SOURCE)/files \ |
6d2010ae | 32 | $(SOURCE)/files.$(ARCH_CONFIG_LC) |
2d21ac55 | 33 | $(_v)(doconf_target=$(addsuffix /conf, $(TARGET)); \ |
1c79356b A |
34 | $(MKDIR) $${doconf_target}; \ |
35 | cd $${doconf_target}; \ | |
36 | rm -f $(notdir $?); \ | |
37 | cp $? $${doconf_target}; \ | |
6d2010ae A |
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); \ | |
1c79356b A |
40 | ); |
41 | ||
42 | $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/platforms.h: $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/Makefile | |
2d21ac55 | 43 | $(_v)(cd $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG); \ |
1c79356b A |
44 | ${RM} $@; \ |
45 | ${LN} cputypes.h $@; \ | |
46 | ) | |
47 | ||
6d2010ae | 48 | do_all: $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/Makefile \ |
1c79356b | 49 | $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG)/platforms.h |
2d21ac55 | 50 | $(_v)next_source=$(subst conf/,,$(SOURCE)); \ |
316670eb | 51 | next_relsource=$(subst conf/,,$(RELATIVE_SOURCE_PATH)); \ |
9bccf70c A |
52 | ${MAKE} -C $(COMPOBJROOT)/$(OSFMK_KERNEL_CONFIG) \ |
53 | MAKEFILES=$(TARGET)/$(OSFMK_KERNEL_CONFIG)/Makefile \ | |
1c79356b | 54 | SOURCE=$${next_source} \ |
316670eb | 55 | RELATIVE_SOURCE_PATH=$${next_relsource} \ |
1c79356b | 56 | TARGET=$(TARGET) \ |
0b4e3aa0 | 57 | INCL_MAKEDEP=FALSE \ |
55e303ae | 58 | KERNEL_CONFIG=$(OSFMK_KERNEL_CONFIG) \ |
2d21ac55 | 59 | build_all; |
1c79356b A |
60 | |
61 | do_build_all: do_all | |
62 | ||
63 | include $(MakeInc_rule) | |
64 | include $(MakeInc_dir) |