vbendeb | 70e9509 | 2010-06-14 15:41:27 -0700 | [diff] [blame] | 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 |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | ALL_OBJS = $(ALL_SRCS:%.c=${BUILD_ROOT}/%.o) |
| 6 | ALL_DEPS = $(ALL_OBJS:%.o=%.o.d) |
| 7 | |
vbendeb | 2a01556 | 2010-06-16 12:49:31 -0700 | [diff] [blame] | 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 | |
vbendeb | 70e9509 | 2010-06-14 15:41:27 -0700 | [diff] [blame] | 17 | ${BUILD_ROOT}/%.o : %.c |
| 18 | $(CC) $(CFLAGS) $(INCLUDES) -MMD -MF $@.d -c -o $@ $< |
| 19 | |
| 20 | -include ${ALL_DEPS} |