Makefile revision a1401311d1ab56c4ed0a474bd38c108f75cb0cd9
1# Copyright (c) 2012 The Chromium 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# This Makefile is used by debhelper, which supplies the appropriate value of
6# variables not defined here, such as DESTDIR.
7
8SRC_DIR = ../../../..
9BUILD_DIR = $(SRC_DIR)/out/Release
10
11INSTALL_DIR = $(DESTDIR)/opt/google/chrome-remote-desktop
12CRON_DIR = $(DESTDIR)/etc/cron.daily
13NATIVE_MESSAGING_DIR = $(DESTDIR)/etc/opt/chrome/native-messaging-hosts
14
15ME2ME_PROGNAME = $(BUILD_DIR)/remoting_me2me_host
16ME2ME_DEBUGFILE = $(ME2ME_PROGNAME).debug
17START_PROGNAME = $(BUILD_DIR)/remoting_start_host
18START_DEBUGFILE = $(START_PROGNAME).debug
19ME2ME_NM_PROGNAME = $(BUILD_DIR)/remoting_native_messaging_host
20ME2ME_NM_DEBUGFILE = $(ME2ME_NM_PROGNAME).debug
21REMOTE_ASSISTANCE_PROGNAME = $(BUILD_DIR)/remoting_it2me_native_messaging_host
22REMOTE_ASSISTANCE_DEBUGFILE = $(REMOTE_ASSISTANCE_PROGNAME).debug
23
24all:
25
26install:
27	install -d "$(INSTALL_DIR)"
28	install -d "$(INSTALL_DIR)/remoting_locales"
29	install -d "$(NATIVE_MESSAGING_DIR)"
30	install -d "$(CRON_DIR)"
31
32	install "$(SRC_DIR)/remoting/host/linux/linux_me2me_host.py" \
33	  "$(INSTALL_DIR)/chrome-remote-desktop"
34	install "$(SRC_DIR)/remoting/host/installer/linux/is-remoting-session" \
35	  "$(INSTALL_DIR)"
36
37	install -m 0644 \
38	    "$(BUILD_DIR)/remoting/com.google.chrome.remote_desktop.json" \
39	   "$(NATIVE_MESSAGING_DIR)/com.google.chrome.remote_desktop.json"
40
41	install -m 0644 \
42	  "$(BUILD_DIR)/remoting/com.google.chrome.remote_assistance.json" \
43	  "$(NATIVE_MESSAGING_DIR)/com.google.chrome.remote_assistance.json"
44
45	eu-strip -f "$(ME2ME_DEBUGFILE)" "$(ME2ME_PROGNAME)"
46	install "$(ME2ME_PROGNAME)" \
47	  "$(INSTALL_DIR)/chrome-remote-desktop-host"
48
49	eu-strip -f "$(START_DEBUGFILE)" "$(START_PROGNAME)"
50	install "$(START_PROGNAME)" "$(INSTALL_DIR)/start-host"
51
52	eu-strip -f "$(ME2ME_NM_DEBUGFILE)" "$(ME2ME_NM_PROGNAME)"
53	install "$(ME2ME_NM_PROGNAME)" "$(INSTALL_DIR)/native-messaging-host"
54
55	eu-strip -f "$(REMOTE_ASSISTANCE_DEBUGFILE)" \
56	  "$(REMOTE_ASSISTANCE_PROGNAME)"
57	install "$(REMOTE_ASSISTANCE_PROGNAME)" \
58	  "$(INSTALL_DIR)/remote-assistance-host"
59
60	install -m 0644 \
61          "$(BUILD_DIR)/icudtl.dat" "$(INSTALL_DIR)/icudtl.dat"
62
63	for locale in $$(ls $(BUILD_DIR)/remoting_locales); do \
64	  install "$(BUILD_DIR)/remoting_locales/$$locale" \
65	    "$(INSTALL_DIR)/remoting_locales/$$locale"; \
66	done
67
68	install $(BUILD_DIR)/remoting/installer/cron/chrome-remote-desktop \
69	  "$(CRON_DIR)/chrome-remote-desktop"
70