summaryrefslogtreecommitdiff
path: root/snd-pcxhr/src/Makefile
blob: d68eb62044df430fedb51636d9ed3e708755347d (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
# SPDX-License-Identifier: GPL-2.0-only
snd-pcxhr-y := pcxhr.o pcxhr_hwdep.o pcxhr_mixer.o pcxhr_core.o pcxhr_mix22.o pcxhr_hrtimer.o
# pcxhr_clock_monitoring.o
obj-$(CONFIG_SND_PCXHR) += snd-pcxhr.o

# KVERSION is the kernel version
# If not defined, it is set to the current kernel version
KVERSION ?= $(shell uname -r)

# KDIR is the location of the kernel source.  The current standard is
# to link to the associated source tree from the directory containing
# the compiled modules.
KDIR  := /lib/modules/$(KVERSION)/build

# PWD is the current working directory and the location of our module
# source files.
PWD   := $(shell pwd)

# Set CFLAGS according to the needs
#Activate sound logs
#CFLAGS_MODULE += -DCONFIG_SND_DEBUG_VERBOSE

MODULES_DIR := /lib/modules/$(shell uname -r)/digigram
# default is the default make target.  The rule here says to run make
# with a working directory of the directory containing the kernel
# source and compile only the modules in the PWD (local) directory.
default:
	$(MAKE) -C $(KDIR) M=$(PWD) modules

all: clean default

clean:
	$(MAKE) -C $(KDIR) M=$(PWD) clean

install:
	test -d $(MODULES_DIR) || mkdir $(MODULES_DIR)
	cp *.ko /lib/modules/$(shell uname -r)/digigram
	depmod -ae


.PHONY: default all clean install