diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-05-28 12:40:15 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-05-28 12:40:15 +0000 |
commit | 61b101497d19e94a33db26dc8c693d206945cf5c (patch) | |
tree | cece5ec782ebed771572a54c5b1f04bf59df69ab | |
parent | 1dd5f09e9df62505533bf221f5882ed03d2437f3 (diff) | |
download | mpv-61b101497d19e94a33db26dc8c693d206945cf5c.tar.bz2 mpv-61b101497d19e94a33db26dc8c693d206945cf5c.tar.xz |
Merge drivers/Makefile into top-level Makefile.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26914 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | DOCS/xml/en/video.xml | 14 | ||||
-rw-r--r-- | Makefile | 38 | ||||
-rw-r--r-- | drivers/Makefile | 33 |
3 files changed, 42 insertions, 43 deletions
diff --git a/DOCS/xml/en/video.xml b/DOCS/xml/en/video.xml index 2c1d3b8c28..a60a894a72 100644 --- a/DOCS/xml/en/video.xml +++ b/DOCS/xml/en/video.xml @@ -854,15 +854,14 @@ For a Linux 2.6.x version of this driver check out <procedure> <title>Installation:</title> <step><para> - To use it, you first have to compile <filename>mga_vid.o</filename>: + To use it, you first have to compile <filename>drivers/mga_vid.o</filename>: <screen> -cd drivers -make<!-- +make drivers<!-- --></screen> </para></step> <step><para> Then run (as <systemitem class="username">root</systemitem>) - <screen>make install</screen> + <screen>make install-drivers</screen> which should install the module and create the device node for you. Load the driver with <screen>insmod mga_vid.o</screen> @@ -941,14 +940,13 @@ the following instructions. <procedure> <title>Installing the tdfx_vid.o kernel module:</title> <step><para> - Compile <filename>tdfx_vid.o</filename>: + Compile <filename>drivers/tdfx_vid.o</filename>: <screen> -cd drivers -make</screen> +make drivers</screen> </para></step> <step><para> Then run (as <systemitem class="username">root</systemitem>) - <screen>make install</screen> + <screen>make install-drivers</screen> which should install the module and create the device node for you. Load the driver with <screen>insmod tdfx_vid.o</screen> @@ -840,7 +840,7 @@ clean: rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.o /*.a /*.ho /*~, $(addsuffix $(suffix),$(dir)))) rm -f mplayer$(EXESUF) mencoder$(EXESUF) -distclean: clean testsclean toolsclean +distclean: clean testsclean toolsclean driversclean rm -rf DOCS/tech/doxygen rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.d, $(addsuffix $(suffix),$(dir)))) rm -f configure.log config.mak config.h codecs.conf.h help_mp.h \ @@ -957,7 +957,41 @@ NETSTREAM_DEPS = libavutil/libavutil.a \ TOOLS/netstream$(EXESUF): TOOLS/netstream.o $(NETSTREAM_DEPS) $(CC) $(CFLAGS) -o $@ $^ + + +###### drivers ####### + +KERNEL_INC = /lib/modules/`uname -r`/build/include +KERNEL_VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2) +KERNEL_CFLAGS = -O2 -D__KERNEL__ -DMODULE -Wall -I$(KERNEL_INC) -include $(KERNEL_INC)/linux/modversions.h +KERNEL_OBJS = $(addprefix drivers/, mga_vid.o tdfx_vid.o radeon_vid.o rage128_vid.o) +MODULES_DIR = /lib/modules/$(KERNEL_VERSION)/misc + +drivers: $(KERNEL_OBJS) drivers/mga_vid_test drivers/tdfx_vid_test + +$(KERNEL_OBJS) drivers/mga_vid_test drivers/tdfx_vid_test: CFLAGS = $(KERNEL_CFLAGS) +drivers/mga_vid.o: drivers/mga_vid.c drivers/mga_vid.h +drivers/tdfx_vid.o: drivers/tdfx_vid.c drivers/3dfx.h +drivers/radeon_vid.o drivers/rage128_vid.o: CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math +drivers/radeon_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h +drivers/rage128_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h + $(CC) $(CFLAGS) -DRAGE128 -c $< -o $@ + +install-drivers: + -mkdir -p $(MODULES_DIR) + install -m 644 $(KERNEL_OBJS) $(MODULES_DIR) + 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 + +driversclean: + rm -f drivers/*.o drivers/*~ drivers/mga_vid_test drivers/tdfx_vid_test + + + -include $(DEPS) -.PHONY: all doxygen *install* recurse *tools +.PHONY: all doxygen *install* recurse *tools drivers .PHONY: checkheaders *clean dep depend tests diff --git a/drivers/Makefile b/drivers/Makefile deleted file mode 100644 index b2f96e9a42..0000000000 --- a/drivers/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -KERNEL_INC = /lib/modules/`uname -r`/build/include -VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2) -MDIR = /lib/modules/$(VERSION)/misc - -CFLAGS = -O2 -D__KERNEL__ -DMODULE -Wall -I$(KERNEL_INC) \ - -include $(KERNEL_INC)/linux/modversions.h - -OBJS = mga_vid.o tdfx_vid.o radeon_vid.o 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_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 $@ -radeon_vid.o rage128_vid.o: CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math - -install: - -mkdir -p $(MDIR) - install -m 644 $(OBJS) $(MDIR) - 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 distclean: - rm -f *.o *~ mga_vid_test tdfx_vid_test - -.PHONY: all install dep depend *clean |