-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (29 loc) · 821 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
#
# kjscal - A module that provides automatic joystick calibration
#
# Copyright (c) 2005 Theodoros V. Kalamatianos <[email protected]>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
MODULE := kjscal
ifneq ($(KERNELRELEASE),)
obj-m := $(MODULE).o
else
KVER := $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
IDIR := /lib/modules/$(KVER)/misc
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif
kjscal.c: version.h
$(MODULE).ko: default
clean:
rm -rf *.o .*.o.cmd .*.ko.cmd .tmp* *.mod.c *.ko
install: $(MODULE).ko
install -m644 -D $(MODULE).ko $(IDIR)/$(MODULE).ko
depmod -a -r $(KVER)
uninstall:
rm -f $(IDIR)/$(MODULE).ko