xref: /xnu-8020.140.41/osfmk/default_pager/Makefile (revision 27b03b360a988dfd3dfdf34262bb0042026747cc)
1*27b03b36SApple OSS Distributionsexport MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2*27b03b36SApple OSS Distributionsexport MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3*27b03b36SApple OSS Distributionsexport MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4*27b03b36SApple OSS Distributionsexport MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5*27b03b36SApple OSS Distributions
6*27b03b36SApple OSS Distributionsinclude $(MakeInc_cmd)
7*27b03b36SApple OSS Distributionsinclude $(MakeInc_def)
8*27b03b36SApple OSS Distributions
9*27b03b36SApple OSS DistributionsMIG_TYPES = \
10*27b03b36SApple OSS Distributions	default_pager_types.defs
11*27b03b36SApple OSS Distributions
12*27b03b36SApple OSS DistributionsMIG_DEFS = \
13*27b03b36SApple OSS Distributions
14*27b03b36SApple OSS DistributionsMIG_USHDRS = \
15*27b03b36SApple OSS Distributions
16*27b03b36SApple OSS DistributionsMIG_UUHDRS = \
17*27b03b36SApple OSS Distributions
18*27b03b36SApple OSS DistributionsMIGINCLUDES = ${MIG_UUHDRS} ${MIG_USHDRS}
19*27b03b36SApple OSS Distributions
20*27b03b36SApple OSS DistributionsDATAFILES = \
21*27b03b36SApple OSS Distributions	default_pager_types.h \
22*27b03b36SApple OSS Distributions	${MIG_DEFS}
23*27b03b36SApple OSS Distributions
24*27b03b36SApple OSS DistributionsINSTALL_MI_LIST	= ${DATAFILES}
25*27b03b36SApple OSS Distributions
26*27b03b36SApple OSS DistributionsINSTALL_SF_MI_LCL_LIST = ${DATAFILES}
27*27b03b36SApple OSS Distributions
28*27b03b36SApple OSS DistributionsINSTALL_MI_GEN_LIST = ${MIGINCLUDES}
29*27b03b36SApple OSS Distributions
30*27b03b36SApple OSS DistributionsINSTALL_SF_MI_LCL_GEN_LIST = ${MIGINCLUDES}
31*27b03b36SApple OSS Distributions
32*27b03b36SApple OSS DistributionsINSTALL_MI_DIR = default_pager
33*27b03b36SApple OSS Distributions
34*27b03b36SApple OSS DistributionsEXPORT_MI_LIST	= \
35*27b03b36SApple OSS Distributions	${DATAFILES}
36*27b03b36SApple OSS Distributions
37*27b03b36SApple OSS DistributionsEXPORT_MI_GEN_LIST = \
38*27b03b36SApple OSS Distributions	${MIGINCLUDES}
39*27b03b36SApple OSS Distributions
40*27b03b36SApple OSS DistributionsEXPORT_MI_DIR = default_pager
41*27b03b36SApple OSS Distributions
42*27b03b36SApple OSS Distributions${MIGINCLUDES} : ${MIG_TYPES}
43*27b03b36SApple OSS Distributions
44*27b03b36SApple OSS Distributions${MIG_UUHDRS} : \
45*27b03b36SApple OSS Distributions	%.h : %.defs
46*27b03b36SApple OSS Distributions	@$(LOG_MIG) $@
47*27b03b36SApple OSS Distributions	$(_v)$(MIG) $(MIGFLAGS)		\
48*27b03b36SApple OSS Distributions		-server /dev/null	\
49*27b03b36SApple OSS Distributions		-user /dev/null		\
50*27b03b36SApple OSS Distributions		-header $@		\
51*27b03b36SApple OSS Distributions		$<
52*27b03b36SApple OSS Distributions
53*27b03b36SApple OSS Distributions${MIG_USHDRS} : \
54*27b03b36SApple OSS Distributions	%_server.h : %.defs
55*27b03b36SApple OSS Distributions	@$(LOG_MIG) $@
56*27b03b36SApple OSS Distributions	$(_v)$(MIG) $(MIGFLAGS)		\
57*27b03b36SApple OSS Distributions		-server /dev/null	\
58*27b03b36SApple OSS Distributions		-user /dev/null		\
59*27b03b36SApple OSS Distributions		-header /dev/null	\
60*27b03b36SApple OSS Distributions		-sheader $@		\
61*27b03b36SApple OSS Distributions		$<
62*27b03b36SApple OSS Distributions
63*27b03b36SApple OSS Distributions#
64*27b03b36SApple OSS Distributions# Build path
65*27b03b36SApple OSS Distributions#
66*27b03b36SApple OSS DistributionsINCFLAGS_MAKEFILE= -I..
67*27b03b36SApple OSS Distributions
68*27b03b36SApple OSS DistributionsMIGKSFLAGS	= -DMACH_KERNEL_PRIVATE -DKERNEL_SERVER=1
69*27b03b36SApple OSS DistributionsMIGKUFLAGS	= -DMACH_KERNEL_PRIVATE -DKERNEL_USER=1 -maxonstack 1024
70*27b03b36SApple OSS Distributions
71*27b03b36SApple OSS Distributions#
72*27b03b36SApple OSS Distributions# MIG-generated headers that are traditionally used by kernel
73*27b03b36SApple OSS Distributions# level code.
74*27b03b36SApple OSS Distributions#
75*27b03b36SApple OSS DistributionsMIG_KUHDRS = \
76*27b03b36SApple OSS Distributions
77*27b03b36SApple OSS DistributionsMIG_KUSRC = \
78*27b03b36SApple OSS Distributions
79*27b03b36SApple OSS DistributionsMIG_KSHDRS = \
80*27b03b36SApple OSS Distributions
81*27b03b36SApple OSS DistributionsMIG_KSSRC = \
82*27b03b36SApple OSS Distributions
83*27b03b36SApple OSS Distributions#
84*27b03b36SApple OSS Distributions# JMM -
85*27b03b36SApple OSS Distributions# Since there are two generated header files with the same name, one for
86*27b03b36SApple OSS Distributions# install and export, the other for internal use (and they are different)
87*27b03b36SApple OSS Distributions# we can't explicitly list two rules for the same target.  So rules for
88*27b03b36SApple OSS Distributions# generating internal headers will be handled implicitly by creating rules
89*27b03b36SApple OSS Distributions# to generate the internal C sources, and the headers get created as a
90*27b03b36SApple OSS Distributions# side-effect.
91*27b03b36SApple OSS Distributions#
92*27b03b36SApple OSS Distributions# This is all temporary scaffolding, as we are moving to a model where
93*27b03b36SApple OSS Distributions# the MIG-generated code is identical in all environments.  At first, it
94*27b03b36SApple OSS Distributions# will contain some environment-specific ifdefs, but over time should not
95*27b03b36SApple OSS Distributions# even require that as we move towards making all the environments look
96*27b03b36SApple OSS Distributions# the same.
97*27b03b36SApple OSS Distributions#
98*27b03b36SApple OSS DistributionsCOMP_FILES = ${MIG_KUSRC} ${MIG_KSSRC}
99*27b03b36SApple OSS Distributions
100*27b03b36SApple OSS Distributionsdo_build_all:: $(COMP_FILES)
101*27b03b36SApple OSS Distributions
102*27b03b36SApple OSS Distributions${COMP_FILES} : ${MIG_TYPES}
103*27b03b36SApple OSS Distributions
104*27b03b36SApple OSS Distributions${MIG_KUSRC} : \
105*27b03b36SApple OSS Distributions	%_user.c : %.defs
106*27b03b36SApple OSS Distributions	@$(LOG_MIG) $@
107*27b03b36SApple OSS Distributions	$(_v)${MIG} ${MIGFLAGS} ${MIGKUFLAGS}        \
108*27b03b36SApple OSS Distributions		-user    $*_user.c              \
109*27b03b36SApple OSS Distributions		-header  $*.h              \
110*27b03b36SApple OSS Distributions		-server  /dev/null		\
111*27b03b36SApple OSS Distributions		-sheader /dev/null		\
112*27b03b36SApple OSS Distributions		$<
113*27b03b36SApple OSS Distributions
114*27b03b36SApple OSS Distributions${MIG_KSSRC}: \
115*27b03b36SApple OSS Distributions	%_server.c : %.defs
116*27b03b36SApple OSS Distributions	@$(LOG_MIG) $@
117*27b03b36SApple OSS Distributions	$(_v)${MIG} ${MIGFLAGS} ${MIGKSFLAGS}        \
118*27b03b36SApple OSS Distributions		-user    /dev/null              \
119*27b03b36SApple OSS Distributions		-header  /dev/null              \
120*27b03b36SApple OSS Distributions		-server  $*_server.c		\
121*27b03b36SApple OSS Distributions		-sheader $*_server.h		\
122*27b03b36SApple OSS Distributions		$<
123*27b03b36SApple OSS Distributions
124*27b03b36SApple OSS Distributionsinclude $(MakeInc_rule)
125*27b03b36SApple OSS Distributionsinclude $(MakeInc_dir)
126