Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Side by Side Diff: Makefile

Issue 3129002: Create a bootstat library for external C and C++ programs (Closed) Base URL: ssh://gitrw.chromium.org/bootstat.git
Patch Set: Fix whitespace issue found by presubmit check Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # Makefile for bootstat utilities 5 # Makefile for bootstat utilities
6 # 6 #
7 7
8 OPT_FLAGS = -O 8 # OPT_CFLAGS is here to allow adding options for manual, host-side
9 CFLAGS += -Wall -Werror -fPIC -fno-exceptions $(OPT_FLAGS) 9 # builds.
10 OPT_CFLAGS =
11 CFLAGS += -Wall -Werror -fPIC -fno-exceptions $(OPT_CFLAGS)
10 12
11 OBJS = \ 13 LIB_OBJS = bootstat_log.o
12 » bootstat.o \
13 » bootstat_log.o
14 14
15 COMMAND_OBJS = bootstat.o
16 COMMAND_LDFLAGS = $(LDFLAGS)
17
18 TEST_OBJS = log_unit_tests.o
19 TEST_LDFLAGS = $(LDFLAGS) -lgtest
20
21 OBJS = $(LIB_OBJS) $(TEST_OBJS) $(COMMAND_OBJS)
22
23 LIB = libbootstat.a
15 COMMAND = bootstat 24 COMMAND = bootstat
25 TEST = log_unit_test
16 26
17 all: $(COMMAND) 27 %.o: %.c
28 » $(CC) $(CFLAGS) -o $@ -c $<
18 29
19 $(COMMAND): $(OBJS) 30 %.o: %.cc
20 » $(CC) -o $@ $(LDFLAGS) $(OBJS) 31 » $(CXX) $(CXXFLAGS) -o $@ -c $<
32
33 all: $(COMMAND) $(LIB)
34 tests: $(TEST)
35
36 $(COMMAND): $(COMMAND_OBJS) $(LIB)
37 » $(CC) -o $@ $(COMMAND_LDFLAGS) $^
38
39 $(LIB): $(LIB_OBJS)
40 » $(AR) rcs $@ $^
41
42 $(TEST): $(TEST_OBJS) $(LIB)
43 » $(CXX) $(TEST_LDFLAGS) -o $@ $^
21 44
22 clean: 45 clean:
23 » rm -f $(COMMAND) $(OBJS) 46 » rm -f $(COMMAND) $(LIB) $(OBJS) $(TEST)
OLDNEW
« no previous file with comments | « no previous file | README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698