Subversion Repositories f9daq

Rev

Rev 6 | Details | Compare with Previous | 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:
361 f9daq 15
#	make -C $(KDIR) SUBDIRS=$(PWD) modules
16
	make -C $(KDIR) M=$(shell pwd) modules
6 f9daq 17
 
18
$(TARGET).o: $(OBJS)
19
	$(LD) $(LD_RFLAG) -r -o $@ $(OBJS)
20
 
21
ifneq (,$(findstring 2.4.,$(CURRENT)))
22
install:
23
	su -c "cp -v $(TARGET).o $(DEST) && /sbin/depmod -a"
24
else
25
install:
26
	su -c "cp -v $(TARGET).ko $(DEST) && /sbin/depmod -a"
27
endif
28
 
29
clean:
30
	-rm -f *.o *.ko .*.cmd .*.flags *.mod.c
31
 
361 f9daq 32
-include $(KDIR)/Rules.make