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