view drivers/Makefile @ 22676:b24dce17634d

Remove useless compilation commands that are provided by builtin rules.
author diego
date Sat, 17 Mar 2007 14:01:50 +0000
parents 2a685e4e5e3e
children 29f59ec39e6e
line wrap: on
line source

KERNEL_INCLUDES = /lib/modules/`uname -r`/build/include
VERSION = $(shell grep UTS_RELEASE $(KERNEL_INCLUDES)/linux/version.h | cut -d '"' -f2)
MDIR = /lib/modules/$(VERSION)/misc

CFLAGS = -O2 -D__KERNEL__ -DMODULE -I$(KERNEL_INCLUDES) -Wall -include $(KERNEL_INCLUDES)/linux/modversions.h

all: mga_vid.o mga_vid_test tdfx_vid.o tdfx_vid_test

mga_vid.o: mga_vid.c mga_vid.h
tdfx_vid.o: tdfx_vid.c 3dfx.h

%_test: %_test.c
	$(CC) -O -o $@ $<

install:
	-mkdir -p $(MDIR)
	install -m 644 mga_vid.o tdfx_vid.o $(MDIR)
	depmod -a

dep depend:

clean:
	rm -f *.o *~ mga_vid_test tdfx_vid_test

distclean: clean

.PHONY: all install dep depend clean distclean