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