"inline" is used elsewhere and more portable than "__inline"
[mplayer/glamo.git] / drivers / Makefile
blob636f097dc263f3e155cd870a77f5a13580b763ff
1 KERNEL_INC = /lib/modules/`uname -r`/build/include
2 VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2)
3 MDIR = /lib/modules/$(VERSION)/misc
5 CFLAGS = -O2 -D__KERNEL__ -DMODULE -Wall -I$(KERNEL_INC) \
6 -include $(KERNEL_INC)/linux/modversions.h
8 OBJS = mga_vid.o tdfx_vid.o radeon_vid.o rage128_vid.o
10 all: $(OBJS) mga_vid_test tdfx_vid_test
12 mga_vid.o: mga_vid.c mga_vid.h
13 tdfx_vid.o: tdfx_vid.c 3dfx.h
14 radeon_vid.o: radeon_vid.c radeon.h radeon_vid.h
15 rage128_vid.o: radeon_vid.c radeon.h radeon_vid.h
16 $(CC) $(CFLAGS) -DRAGE128 -c $< -o $@
17 radeon_vid.o rage128_vid.o:
18 CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math
20 %_test: %_test.c
21 $(CC) -O -o $@ $<
23 install:
24 -mkdir -p $(MDIR)
25 install -m 644 $(OBJS) $(MDIR)
26 depmod -a
27 -mknod /dev/mga_vid c 178 0
28 -mknod /dev/tdfx_vid c 178 0
29 -mknod /dev/radeon_vid c 178 0
30 -ln -s /dev/radeon_vid /dev/rage128_vid
32 dep depend:
34 clean:
35 rm -f *.o *~ mga_vid_test tdfx_vid_test
37 distclean: clean
39 .PHONY: all install dep depend clean distclean