2007-03-17 13:55:45 +00:00
|
|
|
KERNEL_INCLUDES = /lib/modules/`uname -r`/build/include
|
2001-12-26 15:49:45 +00:00
|
|
|
VERSION = $(shell grep UTS_RELEASE $(KERNEL_INCLUDES)/linux/version.h | cut -d '"' -f2)
|
|
|
|
MDIR = /lib/modules/$(VERSION)/misc
|
2001-02-24 20:28:24 +00:00
|
|
|
|
2007-03-17 13:29:26 +00:00
|
|
|
CFLAGS = -O2 -D__KERNEL__ -DMODULE -I$(KERNEL_INCLUDES) -Wall -include $(KERNEL_INCLUDES)/linux/modversions.h
|
2007-03-17 13:53:15 +00:00
|
|
|
|
2007-03-17 13:56:54 +00:00
|
|
|
all: mga_vid.o mga_vid_test tdfx_vid.o tdfx_vid_test
|
2004-06-26 14:03:06 +00:00
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
mga_vid.o: mga_vid.c mga_vid.h
|
2003-03-07 18:42:08 +00:00
|
|
|
tdfx_vid.o: tdfx_vid.c 3dfx.h
|
|
|
|
|
2007-03-17 14:00:34 +00:00
|
|
|
%_test: %_test.c
|
2007-03-17 00:59:42 +00:00
|
|
|
$(CC) -O -o $@ $<
|
2003-03-07 18:42:08 +00:00
|
|
|
|
2007-03-17 13:56:54 +00:00
|
|
|
install:
|
2006-04-13 16:49:56 +00:00
|
|
|
-mkdir -p $(MDIR)
|
2007-03-17 13:58:36 +00:00
|
|
|
install -m 644 mga_vid.o tdfx_vid.o $(MDIR)
|
2001-12-26 15:49:45 +00:00
|
|
|
depmod -a
|
|
|
|
|
2006-11-20 11:18:01 +00:00
|
|
|
dep depend:
|
2001-07-28 05:36:45 +00:00
|
|
|
|
2007-03-17 01:12:18 +00:00
|
|
|
clean:
|
2007-03-17 13:53:15 +00:00
|
|
|
rm -f *.o *~ mga_vid_test tdfx_vid_test
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
distclean: clean
|
2004-06-26 14:03:06 +00:00
|
|
|
|
2007-03-17 00:45:56 +00:00
|
|
|
.PHONY: all install dep depend clean distclean
|