]>
Commit | Line | Data |
---|---|---|
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 | ||
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 | # | |
19 | CFLAGS+= -include meta_features.h -DBSD_KERNEL_PRIVATE | |
20 | ||
21 | # Objects that don't want -Wcast-align warning (8474835) | |
22 | OBJS_NO_CAST_ALIGN = \ | |
23 | mac_alloc.o \ | |
24 | mac_base.o | |
25 | ||
26 | $(foreach file,$(OBJS_NO_CAST_ALIGN),$(eval $(call add_perfile_cflags,$(file),-Wno-cast-align))) | |
27 | ||
28 | # | |
29 | # INCFLAGS to include security prototypes | |
30 | # | |
31 | INCFLAGS_MAKEFILE= -I$(SOURCE)/.. | |
32 | ||
33 | # | |
34 | # Directories for mig generated files | |
35 | # | |
36 | COMP_SUBDIRS = | |
37 | ||
38 | # | |
39 | # Make sure we don't remove this by accident if interrupted at the wrong | |
40 | # time. | |
41 | # | |
42 | .PRECIOUS: Makefile | |
43 | ||
44 | # | |
45 | # Theses macros are filled in by the config program depending on the | |
46 | # current configuration. The MACHDEP macro is replaced by the | |
47 | # contents of the machine dependent makefile template and the others | |
48 | # are replaced by the corresponding symbol definitions for the | |
49 | # configuration. | |
50 | # | |
51 | ||
52 | %OBJS | |
53 | ||
54 | %CFILES | |
55 | ||
56 | %CXXFILES | |
57 | ||
58 | %SFILES | |
59 | ||
60 | %MACHDEP | |
61 | ||
62 | # Rebuild if per-file overrides change | |
63 | ${OBJS}: $(firstword $(MAKEFILE_LIST)) | |
64 | ||
65 | # Rebuild if global compile flags change | |
66 | $(COBJS): .CFLAGS | |
67 | .CFLAGS: ALWAYS | |
68 | $(_v)$(REPLACECONTENTS) $@ $(KCC) $(CFLAGS) $(INCFLAGS) | |
69 | $(CXXOBJS): .CXXFLAGS | |
70 | .CXXFLAGS: ALWAYS | |
71 | $(_v)$(REPLACECONTENTS) $@ $(KC++) $(CXXFLAGS) $(INCFLAGS) | |
72 | $(SOBJS): .SFLAGS | |
73 | .SFLAGS: ALWAYS | |
74 | $(_v)$(REPLACECONTENTS) $@ $(S_KCC) $(SFLAGS) $(INCFLAGS) | |
75 | ||
76 | $(COMPONENT).filelist: $(OBJS) | |
77 | @echo "$(ColorL)LDFILELIST$(Color0) $(ColorLF)$(COMPONENT)$(Color0)" | |
78 | $(_v)for obj in ${OBJS}; do \ | |
79 | echo $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \ | |
80 | done > $(COMPONENT).filelist | |
81 | ||
82 | do_all: $(COMPONENT).filelist | |
83 | ||
84 | do_build_all:: do_all | |
85 | ||
86 | %RULES | |
87 | ||
88 | include $(MakeInc_rule) | |
89 | include $(MakeInc_dir) |