xref: /xnu-8796.141.3/libkern/conf/Makefile (revision 1b191cb58250d0705d8a51287127505aa4bc0789)
1*1b191cb5SApple OSS Distributionsexport MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2*1b191cb5SApple OSS Distributionsexport MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3*1b191cb5SApple OSS Distributionsexport MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4*1b191cb5SApple OSS Distributionsexport MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5*1b191cb5SApple OSS Distributions
6*1b191cb5SApple OSS Distributionsinclude $(MakeInc_cmd)
7*1b191cb5SApple OSS Distributionsinclude $(MakeInc_def)
8*1b191cb5SApple OSS Distributions
9*1b191cb5SApple OSS Distributions# Special handling for x86_64h which shares a MASTER config file with x86_64:
10*1b191cb5SApple OSS Distributionsifeq ($(CURRENT_ARCH_CONFIG_LC),x86_64h)
11*1b191cb5SApple OSS DistributionsDOCONF_ARCH_CONFIG_LC = x86_64
12*1b191cb5SApple OSS Distributionselse
13*1b191cb5SApple OSS DistributionsDOCONF_ARCH_CONFIG_LC = $(CURRENT_ARCH_CONFIG_LC)
14*1b191cb5SApple OSS Distributionsendif
15*1b191cb5SApple OSS Distributions
16*1b191cb5SApple OSS DistributionsMASTERCONFDIR = $(SRCROOT)/config
17*1b191cb5SApple OSS DistributionsDOCONFDEPS = $(addprefix $(MASTERCONFDIR)/, MASTER MASTER.$(DOCONF_ARCH_CONFIG_LC)) \
18*1b191cb5SApple OSS Distributions	$(addprefix $(SOURCE)/, Makefile.template Makefile.$(DOCONF_ARCH_CONFIG_LC) files files.$(DOCONF_ARCH_CONFIG_LC))
19*1b191cb5SApple OSS Distributions
20*1b191cb5SApple OSS Distributionsifneq (,$(wildcard $(MASTERCONFDIR)/MASTER.$(DOCONF_ARCH_CONFIG_LC).$(CURRENT_MACHINE_CONFIG_LC)))
21*1b191cb5SApple OSS DistributionsDOCONFDEPS += $(MASTERCONFDIR)/MASTER.$(DOCONF_ARCH_CONFIG_LC).$(CURRENT_MACHINE_CONFIG_LC)
22*1b191cb5SApple OSS Distributionsendif
23*1b191cb5SApple OSS Distributions
24*1b191cb5SApple OSS Distributions$(TARGET)/$(CURRENT_KERNEL_CONFIG)/Makefile: $(SRCROOT)/SETUP/config/doconf $(OBJROOT)/SETUP/config $(DOCONFDEPS)
25*1b191cb5SApple OSS Distributions	$(_v)$(MKDIR) $(TARGET)/$(CURRENT_KERNEL_CONFIG)
26*1b191cb5SApple OSS Distributions	$(_v)$(SRCROOT)/SETUP/config/doconf -c -cpu $(DOCONF_ARCH_CONFIG_LC) -soc $(CURRENT_MACHINE_CONFIG_LC) -platform $(PLATFORM) -d $(TARGET)/$(CURRENT_KERNEL_CONFIG) -s $(SOURCE) -m $(MASTERCONFDIR) $(DOCONF_SEED) $(CURRENT_KERNEL_CONFIG)
27*1b191cb5SApple OSS Distributions
28*1b191cb5SApple OSS Distributionsdo_all: $(TARGET)/$(CURRENT_KERNEL_CONFIG)/Makefile
29*1b191cb5SApple OSS Distributions	$(_v)${MAKE} \
30*1b191cb5SApple OSS Distributions		-C $(TARGET)/$(CURRENT_KERNEL_CONFIG)			\
31*1b191cb5SApple OSS Distributions		-f $(TARGET)/$(CURRENT_KERNEL_CONFIG)/Makefile		\
32*1b191cb5SApple OSS Distributions		CURRENT_KERNEL_CONFIG=${CURRENT_KERNEL_CONFIG}		\
33*1b191cb5SApple OSS Distributions		CURRENT_ARCH_CONFIG=${CURRENT_ARCH_CONFIG}		\
34*1b191cb5SApple OSS Distributions		CURRENT_MACHINE_CONFIG=${CURRENT_MACHINE_CONFIG}	\
35*1b191cb5SApple OSS Distributions		SOURCE=$(subst conf/,,$(SOURCE))			\
36*1b191cb5SApple OSS Distributions		TARGET=${TARGET}					\
37*1b191cb5SApple OSS Distributions		OBJPATH=${OBJPATH}					\
38*1b191cb5SApple OSS Distributions		build_all
39*1b191cb5SApple OSS Distributions
40*1b191cb5SApple OSS Distributionsdo_build_all:: do_all
41*1b191cb5SApple OSS Distributions
42*1b191cb5SApple OSS Distributionsinclude $(MakeInc_rule)
43*1b191cb5SApple OSS Distributionsinclude $(MakeInc_dir)
44