OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2011 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 # Makefile for bootstat utilities | 5 # Makefile for bootstat utilities |
6 # | 6 # |
7 | 7 |
8 # OPT_CFLAGS is here to allow adding options for manual, host-side | 8 # OPT_CFLAGS is here to allow adding options for manual, host-side |
9 # builds. | 9 # builds. |
10 OPT_CFLAGS = | 10 OPT_CFLAGS = |
11 COMMON_CFLAGS += -Wall -Werror -fPIC -fno-exceptions $(OPT_CFLAGS) | 11 COMMON_CFLAGS += -D_GNU_SOURCE |
| 12 COMMON_CFLAGS += -Wall -Werror -fPIC -fno-exceptions |
| 13 COMMON_CFLAGS += $(OPT_CFLAGS) |
12 | 14 |
13 CFLAGS += $(COMMON_CFLAGS) | 15 CFLAGS += $(COMMON_CFLAGS) |
14 CXXFLAGS += $(COMMON_CFLAGS) | 16 CXXFLAGS += $(COMMON_CFLAGS) |
15 | 17 |
16 LIB_OBJS = bootstat_log.o | 18 LIB_OBJS = bootstat_log.o |
17 | 19 |
18 COMMAND_OBJS = bootstat.o | 20 COMMAND_OBJS = bootstat.o |
19 COMMAND_LDFLAGS = $(LDFLAGS) | 21 COMMAND_LDFLAGS = $(LDFLAGS) |
20 | 22 |
21 TEST_OBJS = log_unit_tests.o | 23 TEST_OBJS = log_unit_tests.o |
(...skipping 18 matching lines...) Expand all Loading... |
40 $(CC) -o $@ $(COMMAND_LDFLAGS) $^ | 42 $(CC) -o $@ $(COMMAND_LDFLAGS) $^ |
41 | 43 |
42 $(LIB): $(LIB_OBJS) | 44 $(LIB): $(LIB_OBJS) |
43 $(AR) rcs $@ $^ | 45 $(AR) rcs $@ $^ |
44 | 46 |
45 $(TEST): $(TEST_OBJS) $(LIB) | 47 $(TEST): $(TEST_OBJS) $(LIB) |
46 $(CXX) $(TEST_LDFLAGS) -o $@ $^ | 48 $(CXX) $(TEST_LDFLAGS) -o $@ $^ |
47 | 49 |
48 clean: | 50 clean: |
49 rm -f $(COMMAND) $(LIB) $(OBJS) $(TEST) | 51 rm -f $(COMMAND) $(LIB) $(OBJS) $(TEST) |
OLD | NEW |