]> git.saurik.com Git - apple/xnu.git/blob - libkern/conf/Makefile
xnu-1456.1.26.tar.gz
[apple/xnu.git] / libkern / conf / Makefile
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 LIBKERN_KERNEL_CONFIG
18 export LIBKERN_KERNEL_CONFIG = $(KERNEL_CONFIG)
19 endif
20
21 ifneq ($(MACHINE_CONFIG), DEFAULT)
22 export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)_$(MACHINE_CONFIG)/$(COMPONENT)
23 else
24 export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)
25 endif
26
27 $(COMPOBJROOT)/doconf:
28 @make build_setup
29
30 $(COMPOBJROOT)/$(LIBKERN_KERNEL_CONFIG)/Makefile : $(SOURCE)/MASTER \
31 $(SOURCE)/MASTER.$(ARCH_CONFIG_LC) \
32 $(SOURCE)/Makefile.template \
33 $(SOURCE)/Makefile.$(ARCH_CONFIG_LC) \
34 $(SOURCE)/files \
35 $(SOURCE)/files.$(ARCH_CONFIG_LC) \
36 $(COMPOBJROOT)/doconf
37 $(_v)(doconf_target=$(addsuffix /conf, $(TARGET)); \
38 $(MKDIR) $${doconf_target}; \
39 cd $${doconf_target}; \
40 rm -f $(notdir $?); \
41 cp $? $${doconf_target}; \
42 $(COMPOBJROOT)/doconf -c -cpu $(ARCH_CONFIG_LC) -d $(TARGET)/$(LIBKERN_KERNEL_CONFIG) $(LIBKERN_KERNEL_CONFIG); \
43 );
44
45 .ORDER: $(COMPOBJROOT)/$(LIBKERN_KERNEL_CONFIG)/Makefile
46
47 do_setup_conf: $(COMPOBJROOT)/doconf \
48 $(COMPOBJROOT)/$(LIBKERN_KERNEL_CONFIG)/Makefile
49
50 do_all: do_setup_conf
51 $(_v)next_source=$(subst conf/,,$(SOURCE)); \
52 ${MAKE} -C $(COMPOBJROOT)/$(LIBKERN_KERNEL_CONFIG) \
53 MAKEFILES=$(TARGET)/$(LIBKERN_KERNEL_CONFIG)/Makefile \
54 SOURCE=$${next_source} \
55 TARGET=$(TARGET) \
56 INCL_MAKEDEP=FALSE \
57 KERNEL_CONFIG=$(LIBKERN_KERNEL_CONFIG) \
58 build_all;
59
60 do_build_all: do_all
61
62 include $(MakeInc_rule)
63 include $(MakeInc_dir)