2001-09-19 16:52:13 +00:00
|
|
|
KERNEL_INCLUDES = /usr/src/linux/include
|
|
|
|
INCLUDES = -I$(KERNEL_INCLUDES)
|
2001-12-01 15:22:10 +00:00
|
|
|
# auto install
|
|
|
|
CONFIG_SHELL=/bin/sh -c
|
|
|
|
KERNEL_VERSION=$(shell $(CONFIG_SHELL) 'uname -r')
|
|
|
|
MOD_PATH_PREFIX=
|
|
|
|
MOD_PATH=$(MOD_PATH_PREFIX)/lib/modules/$(KERNEL_VERSION)/kernel/drivers/video/
|
2001-09-19 16:52:13 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# standard CFLAGS
|
|
|
|
#
|
|
|
|
|
|
|
|
CPPFLAGS := -D__KERNEL__ -I$(KERNEL_INCLUDES)
|
|
|
|
|
2002-08-22 23:29:46 +00:00
|
|
|
CFLAGS := $(CPPFLAGS) -O2 \
|
2002-01-02 09:37:37 +00:00
|
|
|
-fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math\
|
2001-09-19 16:52:13 +00:00
|
|
|
-D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h
|
|
|
|
AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
|
|
|
|
|
|
|
|
|
2001-11-27 18:36:02 +00:00
|
|
|
all: radeonfb.o radeon_vid.o rage128_vid.o
|
2001-09-19 16:52:13 +00:00
|
|
|
|
|
|
|
radeonfb.o: radeonfb.c radeon.h
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c
|
2001-11-13 17:20:47 +00:00
|
|
|
radeon_vid.o: radeon_vid.c radeon.h radeon_vid.h
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c
|
2001-11-27 18:36:02 +00:00
|
|
|
rage128_vid.o: radeon_vid.c radeon.h radeon_vid.h
|
|
|
|
$(CC) $(CFLAGS) -DRAGE128 $(INCLUDES) -c radeon_vid.c -o $@
|
2001-09-19 16:52:13 +00:00
|
|
|
|
|
|
|
dep:
|
|
|
|
|
|
|
|
clean:
|
2006-01-27 00:06:42 +00:00
|
|
|
rm -f *.o *.a *~
|
|
|
|
|
|
|
|
distclean: clean
|
2001-09-19 16:52:13 +00:00
|
|
|
|
|
|
|
install:
|
2001-12-01 15:22:10 +00:00
|
|
|
mkdir -p $(MOD_PATH)
|
|
|
|
cp radeonfb.o $(MOD_PATH)
|
|
|
|
cp radeon_vid.o $(MOD_PATH)
|
|
|
|
cp rage128_vid.o $(MOD_PATH)
|
|
|
|
depmod -a
|
2001-12-01 17:08:12 +00:00
|
|
|
nodes:
|
2001-12-01 15:22:10 +00:00
|
|
|
mknod /dev/radeon_vid c 178 0
|
2001-12-01 20:23:47 +00:00
|
|
|
ln -s /dev/radeon_vid /dev/rage128_vid
|
2001-12-01 17:08:12 +00:00
|
|
|
# Stuff below is for me only ;)
|
|
|
|
vid:
|
|
|
|
make install
|
|
|
|
rmmod radeon_vid
|
2001-12-02 12:21:13 +00:00
|
|
|
modprobe radeon_vid mtrr=1
|