-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
42 lines (30 loc) · 853 Bytes
/
Makefile
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
KERNEL_VERSION := `uname -r`
ifneq ($(KERNELRELEASE),)
obj-m := madifx.o
else
ifeq ($(BROKEN_WIP),1)
BROKEN = -DCONFIG_SND_MADIFX_BROKEN=1
else
BROKEN =
endif
DEBUG_CFLAGS=-g -Wall -Werror
snd-madifx-objs := madifx.o
KDIR := /lib/modules/$(KERNEL_VERSION)/build
PWD := $(shell pwd)
MODDIR := $(DESTDIR)/lib/modules/$(KERNEL_VERSION)/kernel/sound/pci/rme9652
BINDIR := $(DESTDIR)/usr/local/bin
INCDIR := $(DESTDIR)/usr/include/alsa/sound
default::
$(MAKE) -C $(KDIR) M=$(PWD) EXTRA_CFLAGS="${DEBUG_CFLAGS} ${BROKEN}" modules
install-only:: default
mkdir -p $(MODDIR) $(BINDIR)
cp madifx.ko $(MODDIR)
install:: install-only
/sbin/depmod -a
/sbin/rmmod madifx || true
/sbin/rmmod snd-madifx || true
/sbin/modprobe madifx
clean::
rm -f core .*.cmd *.o *.ko *.mod.c Module.* modules.order *.bak .\#* *~
rm -rf .tmp_versions
endif