]> git.saurik.com Git - apple/xnu.git/blame - osfmk/default_pager/Makefile
xnu-2782.1.97.tar.gz
[apple/xnu.git] / osfmk / default_pager / Makefile
CommitLineData
1c79356b
A
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
1c79356b
A
6include $(MakeInc_cmd)
7include $(MakeInc_def)
8
9MIG_TYPES = \
10 default_pager_types.defs
11
12MIG_DEFS = \
13 default_pager_alerts.defs
14
15MIG_USHDRS = \
16
17MIG_UUHDRS = \
91447636 18 default_pager_object.h
1c79356b
A
19
20
21MIGINCLUDES = ${MIG_UUHDRS} ${MIG_USHDRS}
22
23DATAFILES = \
24 default_pager_types.h \
25 ${MIG_DEFS}
26
27INSTALL_MI_LIST = ${DATAFILES}
28
29INSTALL_MI_GEN_LIST = ${MIGINCLUDES}
30
31INSTALL_MI_DIR = default_pager
32
33EXPORT_MI_LIST = \
34 ${DATAFILES}
35
36EXPORT_MI_GEN_LIST = \
37 ${MIGINCLUDES}
38
39EXPORT_MI_DIR = default_pager
40
1c79356b
A
41${MIGINCLUDES} : ${MIG_TYPES}
42
1c79356b
A
43${MIG_UUHDRS} : \
44 %.h : %.defs
2d21ac55
A
45 @echo MIG $@
46 $(_v)$(MIG) $(MIGFLAGS) \
1c79356b
A
47 -server /dev/null \
48 -user /dev/null \
49 -header $@ \
50 $<
51
1c79356b
A
52${MIG_USHDRS} : \
53 %_server.h : %.defs
2d21ac55
A
54 @echo MIG $@
55 $(_v)$(MIG) $(MIGFLAGS) \
1c79356b
A
56 -server /dev/null \
57 -user /dev/null \
58 -header /dev/null \
59 -sheader $@ \
60 $<
61
62#
63# Build path
64#
65INCFLAGS_MAKEFILE= -I..
66
67MIGKSFLAGS = -DMACH_KERNEL_PRIVATE -DKERNEL_SERVER=1
68MIGKUFLAGS = -DMACH_KERNEL_PRIVATE -DKERNEL_USER=1 -maxonstack 1024
69
70#
71# MIG-generated headers that are traditionally used by kernel
72# level code.
73#
74MIG_KUHDRS = \
75 default_pager_alerts.h
76
77MIG_KUSRC = \
78 default_pager_alerts_user.c
79
80MIG_KSHDRS = \
81 default_pager_object.h
82
83MIG_KSSRC = \
84 default_pager_object_server.c
85
86#
87# JMM -
88# Since there are two generated header files with the same name, one for
89# install and export, the other for internal use (and they are different)
90# we can't explicitly list two rules for the same target. So rules for
91# generating internal headers will be handled implicitly by creating rules
92# to generate the internal C sources, and the headers get created as a
93# side-effect.
94#
95# This is all temporary scaffolding, as we are moving to a model where
96# the MIG-generated code is identical in all environments. At first, it
97# will contain some environment-specific ifdefs, but over time should not
98# even require that as we move towards making all the environments look
99# the same.
100#
101COMP_FILES = ${MIG_KUSRC} ${MIG_KSSRC}
102
39236c6e
A
103do_build_all:: $(COMP_FILES)
104
1c79356b 105${COMP_FILES} : ${MIG_TYPES}
39236c6e 106
1c79356b
A
107${MIG_KUSRC} : \
108 %_user.c : %.defs
2d21ac55
A
109 @echo MIG $@
110 $(_v)${MIG} ${MIGFLAGS} ${MIGKUFLAGS} \
1c79356b
A
111 -user $*_user.c \
112 -header $*.h \
113 -server /dev/null \
114 -sheader /dev/null \
115 $<
116
1c79356b
A
117${MIG_KSSRC}: \
118 %_server.c : %.defs
2d21ac55
A
119 @echo MIG $@
120 $(_v)${MIG} ${MIGFLAGS} ${MIGKSFLAGS} \
1c79356b
A
121 -user /dev/null \
122 -header /dev/null \
123 -server $*_server.c \
124 -sheader $*_server.h \
125 $<
1c79356b
A
126
127include $(MakeInc_rule)
128include $(MakeInc_dir)