summaryrefslogtreecommitdiffstats
path: root/com-on-air_cs-linux/Makefile
blob: 5c217d4749310092d1c47bd89e1859583e450c29 (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
42
43
44
45
46
NODE:=/dev/coa

PCMCIA_SLOT?=0

-include pcmcia_slot.make

ifneq ($(KERNELRELEASE),)
	obj-m := com_on_air_cs.o
	com_on_air_cs-objs := com_on_air.o sc14421.o sc14421_sniffer.o sc14421_firmware.o dect.o
else
	KDIR ?= /lib/modules/`uname -r`/build/
	PWD  := $(shell pwd)

default:
	$(MAKE) -C $(KDIR) M=$(PWD) modules

endif

load:	node
	insmod ./com_on_air_cs.ko && \
	pccardctl insert $(PCMCIA_SLOT)

unload:
	pccardctl eject $(PCMCIA_SLOT) && \
	rmmod com_on_air_cs

reload:
	pccardctl eject $(PCMCIA_SLOT) && \
	rmmod com_on_air_cs && \
	insmod ./com_on_air_cs.ko && \
	pccardctl insert $(PCMCIA_SLOT)

node: $(NODE)
$(NODE):
	mknod $@ --mode 660 c 3564 0  ###  3564 == 0xDEC
#	chgrp dect $(NODE)

read: node coa_read
	tools/coa_read

watch: node coa_read
	watch -n 0.2 ./tools/coa_read

clean:
	rm -rf com_on_air_cs.ko com_on_air_cs.mod.c .com_on_air* .sc14421* .tmp* Module.symvers modules.order *.o