Merge Makefile from radeon/ subdirectory into this one.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22701 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2007-03-17 15:53:30 +00:00
parent db454784b1
commit 4c715947af
2 changed files with 10 additions and 44 deletions

View File

@ -4,12 +4,18 @@ MDIR = /lib/modules/$(VERSION)/misc
CFLAGS = -O2 -D__KERNEL__ -DMODULE -I$(KERNEL_INCLUDES) -Wall -include $(KERNEL_INCLUDES)/linux/modversions.h
OBJS = mga_vid.o tdfx_vid.o
OBJS = mga_vid.o tdfx_vid.o radeon/radeonfb.o radeon/radeon_vid.o radeon/rage128_vid.o
all: $(OBJS) mga_vid_test tdfx_vid_test
mga_vid.o: mga_vid.c mga_vid.h
tdfx_vid.o: tdfx_vid.c 3dfx.h
radeon/radeonfb.o: radeon/radeonfb.c radeon/radeon.h
radeon/radeon_vid.o: radeon/radeon_vid.c radeon/radeon.h radeon/radeon_vid.h
radeon/rage128_vid.o: radeon/radeon_vid.c radeon/radeon.h radeon/radeon_vid.h
$(CC) $(CFLAGS) -DRAGE128 -c $< -o $@
radeon/radeonfb.o radeon/radeon_vid.o radeon/rage128_vid.o:
CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math
%_test: %_test.c
$(CC) -O -o $@ $<
@ -20,11 +26,14 @@ install:
depmod -a
-mknod /dev/mga_vid c 178 0
-mknod /dev/tdfx_vid c 178 0
-mknod /dev/radeon_vid c 178 0
-ln -s /dev/radeon_vid /dev/rage128_vid
dep depend:
clean:
rm -f *.o *~ mga_vid_test tdfx_vid_test
rm -f radeon/*.o radeon/*~
distclean: clean

View File

@ -1,43 +0,0 @@
KERNEL_INCLUDES = /usr/src/linux/include
# auto install
CONFIG_SHELL=/bin/sh -c
KERNEL_VERSION=$(shell $(CONFIG_SHELL) 'uname -r')
MOD_PATH=/lib/modules/$(KERNEL_VERSION)/kernel/drivers/video/
CPPFLAGS := -D__KERNEL__ -DMODULE -I$(KERNEL_INCLUDES)
CFLAGS := $(CPPFLAGS) -O2 \
-fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math\
-include $(KERNEL_INCLUDES)/linux/modversions.h
all: radeonfb.o radeon_vid.o rage128_vid.o
radeonfb.o: radeonfb.c radeon.h
radeon_vid.o: radeon_vid.c radeon.h radeon_vid.h
rage128_vid.o: radeon_vid.c radeon.h radeon_vid.h
$(CC) $(CFLAGS) -DRAGE128 -c $< -o $@
dep depend:
clean:
rm -f *.o *.a *~
distclean: clean
install:
mkdir -p $(MOD_PATH)
cp radeonfb.o $(MOD_PATH)
cp radeon_vid.o $(MOD_PATH)
cp rage128_vid.o $(MOD_PATH)
depmod -a
nodes:
mknod /dev/radeon_vid c 178 0
ln -s /dev/radeon_vid /dev/rage128_vid
# Stuff below is for me only ;)
vid:
make install
rmmod radeon_vid
modprobe radeon_vid mtrr=1
.PHONY: all dep depend clean distclean install nodes vid