]> git.saurik.com Git - apple/xnu.git/blob - bsd/conf/Makefile
xnu-792.21.3.tar.gz
[apple/xnu.git] / bsd / 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 export vnode_pager.o_CFLAGS_ADD=-Werror
7 export vm_unix.o_CFLAGS_ADD=-Werror
8 export dp_backing_file.o_CFLAGS_ADD=-Werror
9 export if_mib.o_CFLAGS_ADD=-Wno-unused-parameter
10
11 include $(MakeInc_cmd)
12 include $(MakeInc_def)
13
14 SETUP_SUBDIRS = \
15 tools
16
17 COMP_SUBDIRS =
18
19 INST_SUBDIRS =
20
21 ifndef BSD_KERNEL_CONFIG
22 export BSD_KERNEL_CONFIG = $(KERNEL_CONFIG)
23 endif
24
25 export COMPOBJROOT=$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)
26
27 $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/doconf:
28 make build_setup
29
30 $(COMPOBJROOT)/$(BSD_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 $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/doconf
37 @echo "Running doconf for $(BSD_KERNEL_CONFIG)";
38 (doconf_target=$(addsuffix /conf, $(TARGET)); \
39 echo $${doconf_target};\
40 $(MKDIR) $${doconf_target}; \
41 cd $${doconf_target}; \
42 rm -f $(notdir $?); \
43 cp $? $${doconf_target}; \
44 $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/doconf -c -cpu $(ARCH_CONFIG_LC) -d $(TARGET)/$(BSD_KERNEL_CONFIG) $(BSD_KERNEL_CONFIG); \
45 );
46
47 .ORDER: $(COMPOBJROOT)/$(BSD_KERNEL_CONFIG)/Makefile
48
49 do_setup_conf: $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(COMPONENT)/doconf \
50 $(COMPOBJROOT)/$(BSD_KERNEL_CONFIG)/Makefile
51
52 do_all: do_setup_conf
53 @echo "[ $(SOURCE) ] Starting do_all $(COMPONENT) $(BSD_KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)"; \
54 next_source=$(subst conf/,,$(SOURCE)); \
55 ${MAKE} -C $(COMPOBJROOT)/$(BSD_KERNEL_CONFIG) \
56 MAKEFILES=$(TARGET)/$(BSD_KERNEL_CONFIG)/Makefile \
57 SOURCE=$${next_source} \
58 TARGET=$(TARGET) \
59 INCL_MAKEDEP=FALSE \
60 KERNEL_CONFIG=$(BSD_KERNEL_CONFIG) \
61 build_all; \
62 echo "[ $(SOURCE) ] Returning do_all $(COMPONENT) $(BSD_KERNEL_CONFIG) $(ARCH_CONFIG) $(TARGET)";
63
64 do_build_all: do_all
65
66 include $(MakeInc_rule)
67 include $(MakeInc_dir)