-
Notifications
You must be signed in to change notification settings - Fork 42
/
Makefile
executable file
·22 lines (18 loc) · 905 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
KERNELDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
obj-m+=./drivers/usb/serial/usb_wwan.o
obj-m+=./drivers/usb/serial/option.o
obj-m+=./drivers/usb/serial/qcserial.o
obj-m+=./drivers/net/usb/qmi_wwan.o
modules: clean
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
install: modules
cp $(PWD)/drivers/usb/serial/option.ko /lib/modules/$(shell uname -r)/kernel/drivers/usb/serial/
cp $(PWD)/drivers/usb/serial/usb_wwan.ko /lib/modules/$(shell uname -r)/kernel/drivers/usb/serial/
cp $(PWD)/drivers/usb/serial/qcserial.ko /lib/modules/$(shell uname -r)/kernel/drivers/usb/serial/
cp $(PWD)/drivers/net/usb/qmi_wwan.ko /lib/modules/$(shell uname -r)/kernel/drivers/net/usb/
modprobe -r option qcserial qmi_wwan
depmod
clean:
rm -rf *~ .tmp_versions modules.order Module.symvers
find . -type f -name *~ -o -name *.o -o -name *.ko -o -name *.cmd -o -name *.mod.c | xargs rm -rf