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