OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 ALL_OBJS = $(ALL_SRCS:%.c=${BUILD_ROOT}/%.o) | 5 ALL_OBJS = $(ALL_SRCS:%.c=${BUILD_ROOT}/%.o) |
6 ALL_DEPS = $(ALL_OBJS:%.o=%.o.d) | 6 ALL_DEPS = $(ALL_OBJS:%.o=%.o.d) |
7 | 7 |
| 8 # |
| 9 # For this target (all) to be built by default, the including file must not |
| 10 # define any other targets above the line including this file. |
| 11 # |
| 12 # This all: rule must be above the %.o: %.c rule below, otherwise the |
| 13 # rule below becomes the default target. |
| 14 # |
| 15 all: ${ALL_OBJS} |
| 16 |
8 ${BUILD_ROOT}/%.o : %.c | 17 ${BUILD_ROOT}/%.o : %.c |
9 $(CC) $(CFLAGS) $(INCLUDES) -MMD -MF $@.d -c -o $@ $< | 18 $(CC) $(CFLAGS) $(INCLUDES) -MMD -MF $@.d -c -o $@ $< |
10 | 19 |
11 -include ${ALL_DEPS} | 20 -include ${ALL_DEPS} |
OLD | NEW |