1921
|
1 KERNEL_INCLUDES = /usr/src/linux/include
|
|
2 INCLUDES = -I$(KERNEL_INCLUDES)
|
3244
|
3 # auto install
|
|
4 CONFIG_SHELL=/bin/sh -c
|
|
5 KERNEL_VERSION=$(shell $(CONFIG_SHELL) 'uname -r')
|
|
6 MOD_PATH_PREFIX=
|
|
7 MOD_PATH=$(MOD_PATH_PREFIX)/lib/modules/$(KERNEL_VERSION)/kernel/drivers/video/
|
1921
|
8
|
|
9 #
|
|
10 # standard CFLAGS
|
|
11 #
|
|
12
|
|
13 CPPFLAGS := -D__KERNEL__ -I$(KERNEL_INCLUDES)
|
|
14
|
|
15 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
|
|
16 -fomit-frame-pointer -fno-strict-aliasing -fno-common\
|
|
17 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h
|
|
18 AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
|
|
19
|
|
20
|
3164
|
21 all: radeonfb.o radeon_vid.o rage128_vid.o
|
1921
|
22
|
|
23 radeonfb.o: radeonfb.c radeon.h
|
|
24 $(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c
|
2870
|
25 radeon_vid.o: radeon_vid.c radeon.h radeon_vid.h
|
|
26 $(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c
|
3164
|
27 rage128_vid.o: radeon_vid.c radeon.h radeon_vid.h
|
|
28 $(CC) $(CFLAGS) -DRAGE128 $(INCLUDES) -c radeon_vid.c -o $@
|
1921
|
29
|
|
30 dep:
|
|
31
|
|
32 clean:
|
|
33 rm -f *.o *~
|
|
34
|
|
35 install:
|
3244
|
36 mkdir -p $(MOD_PATH)
|
|
37 cp radeonfb.o $(MOD_PATH)
|
|
38 cp radeon_vid.o $(MOD_PATH)
|
|
39 cp rage128_vid.o $(MOD_PATH)
|
|
40 depmod -a
|
|
41 mknod /dev/radeon_vid c 178 0
|
|
42 mknod /dev/rage128_vid c 178 0
|
1921
|
43
|