-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (44 loc) · 1.08 KB
/
Makefile
File metadata and controls
58 lines (44 loc) · 1.08 KB
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
include Config.mk
_build =
_install =
y_build=
y_install=
y_build = build_basic
y_install = install_daemon
y_uninstall =
$(DKMS)_install += install_dkms
$(DKMS)_uninstall += uninstall_dkms
$(SYSTEMD)_install += install_systemd
$(SYSTEMD)_uninstall += uninstall_systemd
ifneq ($(DKMS), y)
y_install += install_driver
endif
all: $(y_build)
build_basic:
make -C ./driver
install_daemon:
install -d $(INSTALL_PATH)
cp ./script/usb4604b $(INSTALL_PATH)
chmod 111 $(INSTALL_PATH)usb4604b
ln -sf $(INSTALL_PATH)usb4604b /sbin/usb4604b
install_driver:
cp ./driver/adv_usb_serial.ko $(INSTALL_PATH)
install: $(y_install)
uninstall: $(y_uninstall)
rm -Rf $(INSTALL_PATH)
rm -f /sbin/usb4604b
# use dkms
install_dkms:
make -C ./driver clean
dkms add ./driver
dkms build -m $(MODNAME) -v $(VERSION)
dkms install -m $(MODNAME) -v $(VERSION)
uninstall_dkms:
dkms uninstall -m $(MODNAME) -v $(VERSION)
dkms remove -m $(MODNAME) -v $(VERSION) --all
clean:
make clean -C ./driver
install_systemd:
make install -C ./misc/systemd/
uninstall_systemd:
make uninstall -C ./misc/systemd/