blob: 94dc00f0c9dde722e94e1286f45c4ece0398e120 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
ifndef BOARD
$(error 'BOARD' is not defined. Unable to build ADHD.)
endif
export ADHD_DIR = $(shell pwd)
include $(ADHD_DIR)/defs/definitions.mk
all: cras
cras:
@$(call remake,Building,$@,cras.mk,$@)
cras_install:
@$(call remake,Building,cras,cras.mk,$@)
$(DESTDIR)/etc/init/cras.conf: $(ADHD_DIR)/upstart/cras.conf
$(ECHO) "Installing '$<' to '$@'"
$(INSTALL) --mode 644 -D $< $@
optional_asound_state := $(wildcard $(ADHD_DIR)/factory-default/asound.state.$(BOARD))
ifneq ($(strip $(optional_asound_state)),)
asound_state := $(ADHD_DIR)/factory-default/asound.state.$(BOARD)
else
asound_state := $(ADHD_DIR)/factory-default/asound.state.empty
endif
$(DESTDIR)/etc/asound.state: $(asound_state)
$(ECHO) "Installing '$<' to '$@'"
$(INSTALL) --mode 644 -D $< $@
$(DESTDIR)/etc/cras/device_blacklist: $(ADHD_DIR)/cras-config/device_blacklist
$(ECHO) "Installing '$<' to '$@'"
$(INSTALL) --mode 644 -D $< $@
optional_alsa_conf := $(wildcard $(ADHD_DIR)/alsa-module-config/alsa-$(BOARD).conf)
ifneq ($(strip $(optional_alsa_conf)),)
$(DESTDIR)/etc/modprobe.d/alsa-$(BOARD).conf: $(optional_alsa_conf)
$(ECHO) "Installing '$<' to '$@'"
$(INSTALL) --mode 644 -D $< $@
install: $(DESTDIR)/etc/modprobe.d/alsa-$(BOARD).conf
endif
optional_cras_conf := $(wildcard $(ADHD_DIR)/cras-config/$(BOARD)/*)
ifneq ($(strip $(optional_cras_conf)),)
.PHONY: cras-config-files
cras-config-files:
$(ECHO) "Installing cras config files"
$(INSTALL) --mode 755 -d $(DESTDIR)etc/cras/
$(INSTALL) --mode 644 -D $(ADHD_DIR)/cras-config/$(BOARD)/* $(DESTDIR)etc/cras/
install: cras-config-files
endif
install: $(DESTDIR)/etc/init/cras.conf \
$(DESTDIR)/etc/asound.state \
$(DESTDIR)/etc/cras/device_blacklist \
cras_install
clean:
@rm -rf $(ADHD_BUILD_DIR)
.PHONY: clean cras cras_install
|