2007-03-24 15:14:20 +00:00
|
|
|
KERNEL_INC = /usr/src/linux/include
|
|
|
|
INCLUDES = -I$(KERNEL_INC)
|
|
|
|
CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INC)/linux/modversions.h
|
|
|
|
VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2)
|
2002-02-02 06:34:44 +00:00
|
|
|
MDIR = /lib/modules/$(VERSION)/misc
|
|
|
|
|
|
|
|
all: dhahelper.o test
|
|
|
|
|
|
|
|
dhahelper.o: dhahelper.c dhahelper.h
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c
|
|
|
|
|
|
|
|
test: test.c
|
2002-08-22 23:29:46 +00:00
|
|
|
$(CC) -O $(INCLUDES) -o $@ $@.c
|
2002-02-02 06:34:44 +00:00
|
|
|
|
|
|
|
install: dhahelper.o
|
2006-04-13 16:49:56 +00:00
|
|
|
-mkdir -p $(MDIR)
|
2002-02-02 06:34:44 +00:00
|
|
|
install -m 644 dhahelper.o $(MDIR)/dhahelper.o
|
|
|
|
depmod -a
|
|
|
|
|
2006-11-20 11:18:01 +00:00
|
|
|
dep depend:
|
2002-02-02 06:34:44 +00:00
|
|
|
|
2007-03-24 15:14:20 +00:00
|
|
|
clean:
|
2002-02-02 06:34:44 +00:00
|
|
|
rm -f *.o *~
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f test
|