]>
Commit | Line | Data |
---|---|---|
2d21ac55 A |
1 | # |
2 | # Mach Operating System | |
3 | # Copyright (c) 1986 Carnegie-Mellon University | |
4 | # All rights reserved. The CMU software License Agreement specifies | |
5 | # the terms and conditions for use and redistribution. | |
6 | # | |
7 | ||
2d21ac55 A |
8 | export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd |
9 | export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def | |
10 | export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule | |
11 | export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir | |
12 | ||
13 | include $(MakeInc_cmd) | |
14 | include $(MakeInc_def) | |
15 | ||
16 | # | |
17 | # XXX: CFLAGS | |
18 | # | |
39236c6e | 19 | CFLAGS+= -include meta_features.h -DBSD_KERNEL_PRIVATE |
5ba3f43e | 20 | SFLAGS+= -include meta_features.h |
39236c6e | 21 | |
2d21ac55 | 22 | # |
39236c6e | 23 | # INCFLAGS to include security prototypes |
2d21ac55 | 24 | # |
39236c6e | 25 | INCFLAGS_MAKEFILE= -I$(SOURCE)/.. |
2d21ac55 | 26 | |
39236c6e A |
27 | # |
28 | # Directories for mig generated files | |
29 | # | |
39037602 | 30 | COMP_SUBDIRS = |
2d21ac55 | 31 | |
39236c6e | 32 | # |
2d21ac55 A |
33 | # Make sure we don't remove this by accident if interrupted at the wrong |
34 | # time. | |
35 | # | |
36 | .PRECIOUS: Makefile | |
37 | ||
2d21ac55 A |
38 | # |
39 | # Theses macros are filled in by the config program depending on the | |
40 | # current configuration. The MACHDEP macro is replaced by the | |
41 | # contents of the machine dependent makefile template and the others | |
42 | # are replaced by the corresponding symbol definitions for the | |
43 | # configuration. | |
44 | # | |
45 | ||
46 | %OBJS | |
47 | ||
a991bd8d A |
48 | %LIBOBJS |
49 | ||
2d21ac55 A |
50 | %CFILES |
51 | ||
fe8ab488 A |
52 | %CXXFILES |
53 | ||
2d21ac55 A |
54 | %SFILES |
55 | ||
2d21ac55 A |
56 | %MACHDEP |
57 | ||
f427ee49 A |
58 | # |
59 | # Diagnostic opt-outs. We need to make this list empty. | |
60 | # | |
61 | # DO NOT ADD MORE HERE. | |
62 | # | |
63 | # -Wno-cast-align | |
64 | mac_base.o_CFLAGS_ADD += -Wno-cast-align | |
65 | # -Wno-shorten-64-to-32 | |
66 | mac_audit.o_CFLAGS_ADD += -Wno-shorten-64-to-32 | |
67 | mac_base.o_CFLAGS_ADD += -Wno-shorten-64-to-32 | |
68 | mac_process.o_CFLAGS_ADD += -Wno-shorten-64-to-32 | |
69 | # -Wno-sign-conversion | |
70 | mac_base.o_CFLAGS_ADD += -Wno-sign-conversion | |
71 | mac_mach.o_CFLAGS_ADD += -Wno-sign-conversion | |
72 | mac_vfs.o_CFLAGS_ADD += -Wno-sign-conversion | |
73 | mac_vfs_subr.o_CFLAGS_ADD += -Wno-sign-conversion | |
74 | ||
fe8ab488 A |
75 | # Rebuild if per-file overrides change |
76 | ${OBJS}: $(firstword $(MAKEFILE_LIST)) | |
77 | ||
78 | # Rebuild if global compile flags change | |
79 | $(COBJS): .CFLAGS | |
80 | .CFLAGS: ALWAYS | |
81 | $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS) | |
82 | $(CXXOBJS): .CXXFLAGS | |
83 | .CXXFLAGS: ALWAYS | |
84 | $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS) | |
85 | $(SOBJS): .SFLAGS | |
86 | .SFLAGS: ALWAYS | |
87 | $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS) | |
88 | ||
89 | $(COMPONENT).filelist: $(OBJS) | |
f427ee49 | 90 | @$(LOG_LDFILELIST) "$(COMPONENT)" |
3e170ce0 | 91 | $(_v)for obj in ${OBJS}; do \ |
cb323159 | 92 | $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \ |
3e170ce0 | 93 | done > $(COMPONENT).filelist |
2d21ac55 | 94 | |
a991bd8d A |
95 | $(COMPONENT).libfilelist: $(LIBOBJS) |
96 | @$(LOG_LDFILELIST) "lib$(COMPONENT)" | |
97 | $(_v)for obj in ${LIBOBJS}; do \ | |
98 | $(ECHO) $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \ | |
99 | done > $(COMPONENT).libfilelist | |
100 | ||
101 | ifeq ($(RC_ProjectName),xnu_libraries) | |
102 | do_all: $(COMPONENT).libfilelist | |
103 | else | |
6d2010ae | 104 | do_all: $(COMPONENT).filelist |
a991bd8d | 105 | endif |
2d21ac55 | 106 | |
39236c6e | 107 | do_build_all:: do_all |
2d21ac55 | 108 | |
2d21ac55 A |
109 | %RULES |
110 | ||
111 | include $(MakeInc_rule) | |
112 | include $(MakeInc_dir) |