[CVS] km Makefile-2.6,1.1,1.2 README,1.13,1.14
Status: Beta
Brought to you by:
volodya
From: <gat...@li...> - 2004-12-17 12:39:32
|
Update of /cvsroot/gatos/km In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25471 Modified Files: Makefile-2.6 README Log Message: Add some Makefile magic from LWN Index: README =================================================================== RCS file: /cvsroot/gatos/km/README,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- README 11 Jan 2004 16:51:12 -0000 1.13 +++ README 17 Dec 2004 12:39:08 -0000 1.14 @@ -5,7 +5,8 @@ hints: - * edit Makefile + * rename either Makefile-2.4 or Makefile-2.6 to Makefile depending + on your kernel version * compile * become root and issue "make test" * start X Index: Makefile-2.6 =================================================================== RCS file: /cvsroot/gatos/km/Makefile-2.6,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile-2.6 11 Jan 2004 21:14:11 -0000 1.1 +++ Makefile-2.6 17 Dec 2004 12:39:08 -0000 1.2 @@ -1,6 +1,5 @@ -# to compile for linux kernel>2.6.0 rename this file to Makefile and then -# compile with: make -C /usr/src/linux-2.6.X SUBDIRS=$PWD modules -CFLAGS += -DLINUX_2_6 +ifneq ($(KERNELRELEASE),) + KM_OBJS=km.o km_v4l.o km_memory.o radeon.o mach64.o rage128.o KM_API_OBJS=km_api.o km_api_data.o km_memory.o @@ -9,3 +8,40 @@ obj-m += km_drv.o obj-m += km_api_drv.o + +EXTRA_CFLAGS += -DLINUX_2_6 + +else + +KDIR := /lib/modules/$(shell uname -r)/build +PWD := $(shell pwd) + +all: + $(MAKE) -C $(KDIR) M=$(PWD) modules + +clean: + $(MAKE) -C $(KDIR) M=$(PWD) clean + +install: + $(MAKE) -C $(KDIR) M=$(PWD) modules_install + +test: all + @echo "** Syncing disks" + sync + @echo "** Trying to make sure v4l module is loaded" + modprobe videodev || true + @echo "** Now loading km modules" + insmod ./km_api_drv.ko + insmod ./km_drv.ko km_debug=0 km_buffers=5 + +test2: test2.c + $(CC) $(CFLAGS) test2.c -o test2 + +tarball: + (cd .. ; tar cvf - km/*.[c,h] km/Makefile-* km/README km/km.*.txt km/test*.tcl | gzip - ) > km.tgz + +remove: + rmmod km_drv || true + rmmod km_api_drv || true + +endif |