Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6 | f9daq | 1 | TARGET = usmcdrv |
2 | OBJS = usmcdrv-driver.o |
||
3 | MDIR = drivers/misc |
||
4 | |||
5 | EXTRA_CFLAGS = -DEXPORT_SYMTAB |
||
6 | CURRENT = $(shell uname -r) |
||
7 | KDIR = /lib/modules/$(CURRENT)/build |
||
8 | PWD = $(shell pwd) |
||
9 | DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR) |
||
10 | |||
11 | obj-m += $(TARGET).o |
||
12 | $(TARGET)-objs := usmcpkt.o usmcdrv-driver.o |
||
13 | |||
14 | default: |
||
15 | make -C $(KDIR) SUBDIRS=$(PWD) modules |
||
16 | |||
17 | $(TARGET).o: $(OBJS) |
||
18 | $(LD) $(LD_RFLAG) -r -o $@ $(OBJS) |
||
19 | |||
20 | ifneq (,$(findstring 2.4.,$(CURRENT))) |
||
21 | install: |
||
22 | su -c "cp -v $(TARGET).o $(DEST) && /sbin/depmod -a" |
||
23 | else |
||
24 | install: |
||
25 | su -c "cp -v $(TARGET).ko $(DEST) && /sbin/depmod -a" |
||
26 | endif |
||
27 | |||
28 | clean: |
||
29 | -rm -f *.o *.ko .*.cmd .*.flags *.mod.c |
||
30 | |||
31 | -include $(KDIR)/Rules.make |