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

Side by Side Diff: src/platform/metrics/Makefile

Issue 1650006: Unify metrics_collection and metrics_daemon into metrics. (Closed)
Patch Set: PTAL -- further cleanup based on the ebuild cleanup. Created 10 years, 8 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 | src/platform/metrics/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 # Makefile for metrics utilities -- library, client and daemon
6 #
7
8 CCONFIG = $(shell $(PKG_CONFIG) --cflags dbus-1 glib-2.0 dbus-glib-1)
9 LDCONFIG = $(shell $(PKG_CONFIG) --libs dbus-1 glib-2.0 gthread-2.0 dbus-glib-1)
10
11 CFLAGS = -Wall -Werror -I/usr/include -fpic -O2 $(CCONFIG)
12 CXXFLAGS = $(CFLAGS) -fno-exceptions
13
14 CLIENT = metrics_client
15 DAEMON = metrics_daemon
16 TESTDAEMON = test_daemon
17 LIB = libmetrics.a
18 SHAREDLIB = libmetrics.so
19
20 CLIENT_OBJS = \
21 metrics_client.o
22 LIB_OBJS = \
23 metrics_library.o
24 DAEMON_OBJS = \
25 marshal_void__string_boxed.o \
26 metrics_daemon.o \
27 metrics_daemon_main.o
28 TESTDAEMON_OBJS = \
29 marshal_void__string_boxed.o \
30 metrics_daemon.o \
31 metrics_daemon_unittest.o
32
33 DAEMON_LDFLAGS = $(LDCONFIG) -lrt -lbase -lpthread -lgflags
34 TESTDAEMON_LIBS = -lgtest
35
36 all: $(LIB) $(SHAREDLIB) $(CLIENT) $(DAEMON) $(TESTDAEMON)
37
38 $(CLIENT): $(CLIENT_OBJS) $(SHAREDLIB)
39 $(CXX) $(LDFLAGS) $^ -o $@
40
41 $(DAEMON): $(DAEMON_OBJS) $(SHAREDLIB)
42 $(CXX) -o $@ $^ $(DAEMON_LDFLAGS)
43
44 $(TESTDAEMON): $(TESTDAEMON_OBJS) $(SHAREDLIB)
45 $(CXX) -o $@ $^ $(DAEMON_LDFLAGS) $(TESTDAEMON_LIBS)
46
47 $(LIB): $(LIB_OBJS)
48 ar rcs $@ $^
49
50 $(SHAREDLIB): $(LIB_OBJS)
51 $(CXX) $(LDFLAGS) -shared $^ -o $@
52
53 %.o: %.cc
54 $(CXX) $(CXXFLAGS) -c $< -o $@
55
56 %.o: %.c
57 $(CC) $(CFLAGS) -c $< -o $@
58
59 %.c: %.list
60 glib-genmarshal --body --prefix=marshal $< > $@
61
62 %.h: %.list
63 glib-genmarshal --header --prefix=marshal $< > $@
64
65 # dependencies in addition to those defined by the rules
66
67 metrics_daemon.o: \
68 marshal_void__string_boxed.h \
69 metrics_daemon.h \
70 network_states.h
71 metrics_daemon_unittest.o: \
72 marshal_void__string_boxed.h \
73 metrics_daemon.h \
74 network_states.h
75 marshal_void__string_boxed.o: \
76 marshal_void__string_boxed.h
77
78 .PRECIOUS: marshal_void__string_boxed.c # keep around for debugging
79
80 install:
81 install $(CLIENT) $(DESTDIR)/usr/bin
82 install $(DAEMON) $(DESTDIR)/usr/bin
83 install $(LIB) $(DESTDIR)/usr/lib
84 install $(SHAREDLIB) $(DESTDIR)/usr/lib
85 install metrics_library.h $(DESTDIR)/usr/include
86 install syslog_parser.sh $(DESTDIR)/usr/bin
87 install omaha_tracker.sh $(DESTDIR)/usr/sbin
88
89 clean:
90 rm -f $(CLIENT) $(DAEMON) $(LIB) $(SHAREDLIB) $(TESTDAEMON)
91 rm -f *.o marshal_void__string_boxed.[ch]
OLDNEW
« no previous file with comments | « no previous file | src/platform/metrics/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698