]> git.saurik.com Git - apple/xnu.git/blame_incremental - libkern/conf/Makefile
xnu-792.tar.gz
[apple/xnu.git] / libkern / conf / Makefile
... / ...
CommitLineData
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 LIBKERN_KERNEL_CONFIG
18export LIBKERN_KERNEL_CONFIG = $(KERNEL_CONFIG)
19endif
20
21export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)
22
23$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/doconf:
24 make build_setup
25
26$(COMPOBJROOT)/$(LIBKERN_KERNEL_CONFIG)/Makefile : $(SOURCE)/MASTER \
27 $(SOURCE)/MASTER.$(ARCH_CONFIG_LC) \
28 $(SOURCE)/Makefile.template \
29 $(SOURCE)/Makefile.$(ARCH_CONFIG_LC) \
30 $(SOURCE)/files \
31 $(SOURCE)/files.$(ARCH_CONFIG_LC) \
32 $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/doconf
33 @echo "Running doconf for $(LIBKERN_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_LC) -d $(TARGET)/$(LIBKERN_KERNEL_CONFIG) $(LIBKERN_KERNEL_CONFIG); \
41 );
42
43.ORDER: $(COMPOBJROOT)/$(LIBKERN_KERNEL_CONFIG)/Makefile
44
45do_setup_conf: $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/doconf \
46 $(COMPOBJROOT)/$(LIBKERN_KERNEL_CONFIG)/Makefile
47
48do_all: do_setup_conf
49 @echo "[ $(SOURCE) ] Starting do_all $(COMPONENT) $(LIBKERN_KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"; \
50 next_source=$(subst conf/,,$(SOURCE)); \
51 ${MAKE} -C $(COMPOBJROOT)/$(LIBKERN_KERNEL_CONFIG) \
52 MAKEFILES=$(TARGET)/$(LIBKERN_KERNEL_CONFIG)/Makefile \
53 SOURCE=$${next_source} \
54 TARGET=$(TARGET) \
55 INCL_MAKEDEP=FALSE \
56 KERNEL_CONFIG=$(LIBKERN_KERNEL_CONFIG) \
57 build_all; \
58 echo "[ $(SOURCE) ] Returning do_all $(COMPONENT) $(LIBKERN_KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)";
59
60do_build_all: do_all
61
62include $(MakeInc_rule)
63include $(MakeInc_dir)
64