]>
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 A |
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))) | |
2d21ac55 A |
27 | |
28 | # | |
39236c6e | 29 | # INCFLAGS to include security prototypes |
2d21ac55 | 30 | # |
39236c6e | 31 | INCFLAGS_MAKEFILE= -I$(SOURCE)/.. |
2d21ac55 | 32 | |
39236c6e A |
33 | # |
34 | # Directories for mig generated files | |
35 | # | |
36 | COMP_SUBDIRS = | |
2d21ac55 | 37 | |
39236c6e | 38 | # |
2d21ac55 A |
39 | # Make sure we don't remove this by accident if interrupted at the wrong |
40 | # time. | |
41 | # | |
42 | .PRECIOUS: Makefile | |
43 | ||
2d21ac55 A |
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 | ||
fe8ab488 A |
56 | %CXXFILES |
57 | ||
2d21ac55 A |
58 | %SFILES |
59 | ||
2d21ac55 A |
60 | %MACHDEP |
61 | ||
fe8ab488 A |
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) | |
b0d623f7 | 77 | @echo LDFILELIST $(COMPONENT) |
3e170ce0 | 78 | $(_v)for obj in ${OBJS}; do \ |
39236c6e | 79 | echo $(TARGET)/$(CURRENT_KERNEL_CONFIG)/$${obj}; \ |
3e170ce0 | 80 | done > $(COMPONENT).filelist |
2d21ac55 | 81 | |
6d2010ae | 82 | do_all: $(COMPONENT).filelist |
2d21ac55 | 83 | |
39236c6e | 84 | do_build_all:: do_all |
2d21ac55 | 85 | |
2d21ac55 A |
86 | %RULES |
87 | ||
88 | include $(MakeInc_rule) | |
89 | include $(MakeInc_dir) |