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