Taylor Hutt | 8982204 | 2011-08-23 14:44:34 -0700 | [diff] [blame] | 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 |
| 3 | # found in the LICENSE file. |
| 4 | ifndef BOARD |
Taylor Hutt | 690fc53 | 2011-09-02 10:23:43 -0700 | [diff] [blame] | 5 | $(error 'BOARD' is not defined. Unable to build gavd.) |
Taylor Hutt | 8982204 | 2011-08-23 14:44:34 -0700 | [diff] [blame] | 6 | endif |
| 7 | |
| 8 | export ADHD_DIR = $(shell pwd) |
| 9 | include $(ADHD_DIR)/defs/definitions.mk |
| 10 | |
Taylor Hutt | bbca6ef | 2012-02-23 09:33:34 -0800 | [diff] [blame] | 11 | all: gavd adhdinfo cras |
Taylor Hutt | 8982204 | 2011-08-23 14:44:34 -0700 | [diff] [blame] | 12 | |
Taylor Hutt | 8bbcc30 | 2011-09-20 07:24:15 -0700 | [diff] [blame] | 13 | adhdinfo gavd:: lib |
Taylor Hutt | 47ce5dc | 2011-09-02 10:23:43 -0700 | [diff] [blame] | 14 | |
Taylor Hutt | 4f0be2f | 2012-03-08 09:14:15 -0800 | [diff] [blame] | 15 | gavd:: cras |
| 16 | |
Taylor Hutt | 8bbcc30 | 2011-09-20 07:24:15 -0700 | [diff] [blame] | 17 | lib gavd adhdinfo:: |
Taylor Hutt | bbca6ef | 2012-02-23 09:33:34 -0800 | [diff] [blame] | 18 | @$(call remake,Building,$@,Makefile,$@) |
| 19 | |
| 20 | cras: |
| 21 | @$(call remake,Building,$@,cras.mk,$@) |
| 22 | |
| 23 | cras_install: |
| 24 | @$(call remake,Building,cras,cras.mk,$@) |
Taylor Hutt | 8982204 | 2011-08-23 14:44:34 -0700 | [diff] [blame] | 25 | |
Taylor Hutt | 0774f33 | 2011-12-01 13:37:03 -0800 | [diff] [blame] | 26 | $(DESTDIR)/etc/init/adhd.conf: $(ADHD_DIR)/upstart/adhd.conf |
Taylor Hutt | bbca6ef | 2012-02-23 09:33:34 -0800 | [diff] [blame] | 27 | $(ECHO) "Installing '$<' to '$@'" |
Dylan Reid | cb4121a | 2012-05-07 01:12:16 -0700 | [diff] [blame^] | 28 | $(INSTALL) --mode 644 -D $< $@ |
Taylor Hutt | 0774f33 | 2011-12-01 13:37:03 -0800 | [diff] [blame] | 29 | |
Taylor Hutt | 74c470f | 2012-03-16 12:26:37 -0700 | [diff] [blame] | 30 | $(DESTDIR)/lib/udev/rules.d/99-dev-input-group.rules: \ |
| 31 | $(ADHD_DIR)/udev/99-dev-input-group.rules |
| 32 | $(ECHO) "Installing '$<' to '$@'" |
Dylan Reid | cb4121a | 2012-05-07 01:12:16 -0700 | [diff] [blame^] | 33 | $(INSTALL) --mode 644 -D $< $@ |
Taylor Hutt | 74c470f | 2012-03-16 12:26:37 -0700 | [diff] [blame] | 34 | |
Dylan Reid | b3cea3e | 2012-02-21 23:21:25 -0800 | [diff] [blame] | 35 | $(DESTDIR)/etc/init/cras.conf: $(ADHD_DIR)/upstart/cras.conf |
| 36 | $(ECHO) "Installing '$<' to '$@'" |
Dylan Reid | cb4121a | 2012-05-07 01:12:16 -0700 | [diff] [blame^] | 37 | $(INSTALL) --mode 644 -D $< $@ |
Dylan Reid | b3cea3e | 2012-02-21 23:21:25 -0800 | [diff] [blame] | 38 | |
Taylor Hutt | 0774f33 | 2011-12-01 13:37:03 -0800 | [diff] [blame] | 39 | $(DESTDIR)/usr/bin/gavd: $(ADHD_BUILD_DIR)/gavd/gavd |
Taylor Hutt | bbca6ef | 2012-02-23 09:33:34 -0800 | [diff] [blame] | 40 | $(ECHO) "Installing '$<' to '$@'" |
Taylor Hutt | 0774f33 | 2011-12-01 13:37:03 -0800 | [diff] [blame] | 41 | $(INSTALL) -D $< $@ |
| 42 | |
| 43 | $(DESTDIR)/etc/asound.state: $(ADHD_DIR)/factory-default/asound.state.$(BOARD) |
Taylor Hutt | bbca6ef | 2012-02-23 09:33:34 -0800 | [diff] [blame] | 44 | $(ECHO) "Installing '$<' to '$@'" |
Dylan Reid | cb4121a | 2012-05-07 01:12:16 -0700 | [diff] [blame^] | 45 | $(INSTALL) --mode 644 -D $< $@ |
Taylor Hutt | 0774f33 | 2011-12-01 13:37:03 -0800 | [diff] [blame] | 46 | |
Taylor Hutt | 74c470f | 2012-03-16 12:26:37 -0700 | [diff] [blame] | 47 | install: $(DESTDIR)/etc/init/adhd.conf \ |
| 48 | $(DESTDIR)/etc/init/cras.conf \ |
| 49 | $(DESTDIR)/etc/asound.state \ |
| 50 | $(DESTDIR)/usr/bin/gavd \ |
| 51 | $(DESTDIR)/lib/udev/rules.d/99-dev-input-group.rules \ |
Taylor Hutt | bbca6ef | 2012-02-23 09:33:34 -0800 | [diff] [blame] | 52 | cras_install |
Taylor Hutt | 8982204 | 2011-08-23 14:44:34 -0700 | [diff] [blame] | 53 | clean: |
| 54 | @rm -rf $(ADHD_BUILD_DIR) |
| 55 | |
Taylor Hutt | bbca6ef | 2012-02-23 09:33:34 -0800 | [diff] [blame] | 56 | .PHONY: gavd clean adhdinfo lib cras cras_install |