blob: d34018266e9c40dcbe5e629c6c0c0a44453b31f5 [file] [log] [blame]
Taylor Hutt89822042011-08-23 14:44:34 -07001# 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.
4ifndef BOARD
Taylor Hutt690fc532011-09-02 10:23:43 -07005$(error 'BOARD' is not defined. Unable to build gavd.)
Taylor Hutt89822042011-08-23 14:44:34 -07006endif
7
8export ADHD_DIR = $(shell pwd)
9include $(ADHD_DIR)/defs/definitions.mk
10
Taylor Huttbbca6ef2012-02-23 09:33:34 -080011all: gavd adhdinfo cras
Taylor Hutt89822042011-08-23 14:44:34 -070012
Taylor Hutt8bbcc302011-09-20 07:24:15 -070013adhdinfo gavd:: lib
Taylor Hutt47ce5dc2011-09-02 10:23:43 -070014
Taylor Hutt4f0be2f2012-03-08 09:14:15 -080015gavd:: cras
16
Taylor Hutt8bbcc302011-09-20 07:24:15 -070017lib gavd adhdinfo::
Taylor Huttbbca6ef2012-02-23 09:33:34 -080018 @$(call remake,Building,$@,Makefile,$@)
19
20cras:
21 @$(call remake,Building,$@,cras.mk,$@)
22
23cras_install:
24 @$(call remake,Building,cras,cras.mk,$@)
Taylor Hutt89822042011-08-23 14:44:34 -070025
Taylor Hutt0774f332011-12-01 13:37:03 -080026$(DESTDIR)/etc/init/adhd.conf: $(ADHD_DIR)/upstart/adhd.conf
Taylor Huttbbca6ef2012-02-23 09:33:34 -080027 $(ECHO) "Installing '$<' to '$@'"
Dylan Reidcb4121a2012-05-07 01:12:16 -070028 $(INSTALL) --mode 644 -D $< $@
Taylor Hutt0774f332011-12-01 13:37:03 -080029
Taylor Hutt74c470f2012-03-16 12:26:37 -070030$(DESTDIR)/lib/udev/rules.d/99-dev-input-group.rules: \
31 $(ADHD_DIR)/udev/99-dev-input-group.rules
32 $(ECHO) "Installing '$<' to '$@'"
Dylan Reidcb4121a2012-05-07 01:12:16 -070033 $(INSTALL) --mode 644 -D $< $@
Taylor Hutt74c470f2012-03-16 12:26:37 -070034
Dylan Reidb3cea3e2012-02-21 23:21:25 -080035$(DESTDIR)/etc/init/cras.conf: $(ADHD_DIR)/upstart/cras.conf
36 $(ECHO) "Installing '$<' to '$@'"
Dylan Reidcb4121a2012-05-07 01:12:16 -070037 $(INSTALL) --mode 644 -D $< $@
Dylan Reidb3cea3e2012-02-21 23:21:25 -080038
Taylor Hutt0774f332011-12-01 13:37:03 -080039$(DESTDIR)/usr/bin/gavd: $(ADHD_BUILD_DIR)/gavd/gavd
Taylor Huttbbca6ef2012-02-23 09:33:34 -080040 $(ECHO) "Installing '$<' to '$@'"
Taylor Hutt0774f332011-12-01 13:37:03 -080041 $(INSTALL) -D $< $@
42
43$(DESTDIR)/etc/asound.state: $(ADHD_DIR)/factory-default/asound.state.$(BOARD)
Taylor Huttbbca6ef2012-02-23 09:33:34 -080044 $(ECHO) "Installing '$<' to '$@'"
Dylan Reidcb4121a2012-05-07 01:12:16 -070045 $(INSTALL) --mode 644 -D $< $@
Taylor Hutt0774f332011-12-01 13:37:03 -080046
Taylor Hutt74c470f2012-03-16 12:26:37 -070047install: $(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 Huttbbca6ef2012-02-23 09:33:34 -080052 cras_install
Taylor Hutt89822042011-08-23 14:44:34 -070053clean:
54 @rm -rf $(ADHD_BUILD_DIR)
55
Taylor Huttbbca6ef2012-02-23 09:33:34 -080056.PHONY: gavd clean adhdinfo lib cras cras_install