Mercurial > mplayer.hg
annotate drivers/Makefile @ 14870:c7c4c4d0f7b8
synced with 1.64
author | gabrov |
---|---|
date | Tue, 01 Mar 2005 15:52:18 +0000 |
parents | e2fa87f416a2 |
children | 18e74f0452c7 |
rev | line source |
---|---|
12694
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
1 KERNEL_DIR=/lib/modules/`uname -r`/build |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
2 KERNEL_INCLUDES= $(KERNEL_DIR)/include |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
3 INCLUDES = -I$(KERNEL_INCLUDES) -I$(KERNEL_INCLUDES)/asm |
3768
fda4c0ea039f
install: target added, based on patch by Jukka Tastula <jukka.tastula@kotinet.com>
arpi
parents:
1395
diff
changeset
|
4 VERSION = $(shell grep UTS_RELEASE $(KERNEL_INCLUDES)/linux/version.h | cut -d '"' -f2) |
fda4c0ea039f
install: target added, based on patch by Jukka Tastula <jukka.tastula@kotinet.com>
arpi
parents:
1395
diff
changeset
|
5 MDIR = /lib/modules/$(VERSION)/misc |
1 | 6 |
12694
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
7 ifneq (,$(findstring 2.6, $(VERSION))) |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
8 obj-m += mga_vid.o |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
9 CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/config/modversions.h -Wall |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
10 else |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
11 CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h -Wall |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
12 endif |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
13 |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
14 all: |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
15 ifneq (,$(findstring 2.6, $(VERSION))) |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
16 $(MAKE) mga_vid.ko mga_vid_test |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
17 else |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
18 $(MAKE) mga_vid.o mga_vid_test |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
19 endif |
57 | 20 # sis_vid.o |
1 | 21 |
22 mga_vid.o: mga_vid.c mga_vid.h | |
23 $(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c | |
24 | |
12694
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
25 mga_vid.ko: mga_vid.c mga_vid.h |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
26 $(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
27 |
1 | 28 sis_vid.o: sis_vid.c sis_vid.h |
29 $(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c | |
30 | |
31 mga_vid_test: mga_vid_test.c | |
7073
b69ddd4d3bb9
removed -W -Wall -g and other gcc-specific warning/debug options
arpi
parents:
3768
diff
changeset
|
32 $(CC) -O $(INCLUDES) -o $@ $@.c |
1 | 33 |
9545
d1bbeae9f46a
tdfx_vid a new kernel driver for tdfx wich let use agp move :)
albeu
parents:
7073
diff
changeset
|
34 tdfx_vid.o: tdfx_vid.c 3dfx.h |
d1bbeae9f46a
tdfx_vid a new kernel driver for tdfx wich let use agp move :)
albeu
parents:
7073
diff
changeset
|
35 $(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c |
d1bbeae9f46a
tdfx_vid a new kernel driver for tdfx wich let use agp move :)
albeu
parents:
7073
diff
changeset
|
36 |
d1bbeae9f46a
tdfx_vid a new kernel driver for tdfx wich let use agp move :)
albeu
parents:
7073
diff
changeset
|
37 tdfx_vid_tst: tdfx_vid_tst.c |
d1bbeae9f46a
tdfx_vid a new kernel driver for tdfx wich let use agp move :)
albeu
parents:
7073
diff
changeset
|
38 $(CC) -O $(INCLUDES) -o $@ $@.c |
d1bbeae9f46a
tdfx_vid a new kernel driver for tdfx wich let use agp move :)
albeu
parents:
7073
diff
changeset
|
39 |
3768
fda4c0ea039f
install: target added, based on patch by Jukka Tastula <jukka.tastula@kotinet.com>
arpi
parents:
1395
diff
changeset
|
40 install: mga_vid.o |
fda4c0ea039f
install: target added, based on patch by Jukka Tastula <jukka.tastula@kotinet.com>
arpi
parents:
1395
diff
changeset
|
41 if test ! -d $(MDIR) ; then mkdir -p $(MDIR) ; fi |
12694
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
42 ifneq (,$(findstring 2.6, $(VERSION))) |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
43 install -m 644 mga_vid.ko $(MDIR)/mga_vid.ko |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
44 else |
3768
fda4c0ea039f
install: target added, based on patch by Jukka Tastula <jukka.tastula@kotinet.com>
arpi
parents:
1395
diff
changeset
|
45 install -m 644 mga_vid.o $(MDIR)/mga_vid.o |
12694
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
46 endif |
3768
fda4c0ea039f
install: target added, based on patch by Jukka Tastula <jukka.tastula@kotinet.com>
arpi
parents:
1395
diff
changeset
|
47 depmod -a |
fda4c0ea039f
install: target added, based on patch by Jukka Tastula <jukka.tastula@kotinet.com>
arpi
parents:
1395
diff
changeset
|
48 |
1395
a721a2b91d3d
Added StrongARM crosscompiling support by Maksim Krasnyanskiy <maxk at qualcomm.com> and fixed a --datadir bug in configure.
atmos4
parents:
57
diff
changeset
|
49 dep: |
a721a2b91d3d
Added StrongARM crosscompiling support by Maksim Krasnyanskiy <maxk at qualcomm.com> and fixed a --datadir bug in configure.
atmos4
parents:
57
diff
changeset
|
50 |
1 | 51 clean: |
52 rm -f *.o *~ | |
12694
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
53 ifneq (,$(findstring 2.6, $(VERSION))) |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
54 rm -f *.ko .mga* mga_vid.mod.c |
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
55 endif |
1 | 56 |
57 distclean: clean | |
58 rm -f mga_vid_test | |
12694
e2fa87f416a2
mga_vid under linux 2.6.x support written by F. O. Tempel, Ed Sweetman, Gergely Nagy among others
alex
parents:
9545
diff
changeset
|
59 |