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