OLD | NEW |
| (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 client and library | |
6 # | |
7 | |
8 CFLAGS = -Wall -Werror -I/usr/include -I../../ -fpic -O2 | |
9 CXXFLAGS = $(CFLAGS) -fno-exceptions | |
10 | |
11 CLIENT = metrics_client | |
12 LIB = libmetrics.a | |
13 SHAREDLIB = libmetrics.so | |
14 | |
15 CLIENT_OBJS = metrics_client.o | |
16 LIB_OBJS = metrics_library.o | |
17 | |
18 all: $(LIB) $(SHAREDLIB) $(CLIENT) | |
19 | |
20 $(CLIENT): $(CLIENT_OBJS) | |
21 $(CXX) $(LDFLAGS) $^ -o $@ $(SHAREDLIB) | |
22 | |
23 $(LIB): $(LIB_OBJS) | |
24 ar rcs $@ $^ | |
25 | |
26 $(SHAREDLIB): $(LIB_OBJS) | |
27 $(CXX) $(LDFLAGS) -shared $^ -o $@ | |
28 | |
29 .cc.o: | |
30 $(CXX) $(CXXFLAGS) $(DEFINES) -c $< -o $@ | |
31 | |
32 install: | |
33 install $(CLIENT) $(DESTDIR)/usr/bin | |
34 install $(LIB) $(DESTDIR)/usr/lib | |
35 install $(SHAREDLIB) $(DESTDIR)/usr/lib | |
36 install metrics_library.h $(DESTDIR)/usr/include | |
37 install syslog_parser.sh $(DESTDIR)/usr/bin | |
38 install omaha_tracker.sh $(DESTDIR)/usr/sbin | |
39 | |
40 clean: | |
41 rm -f $(CLIENT) $(CLIENT_OBJS) $(LIB) $(LIB_OBJS) $(SHAREDLIB) | |
OLD | NEW |