Mercurial > mplayer.hg
annotate drivers/Makefile @ 22571:f02e65d6586f
Add pci_names.c as prerequisite of the all target instead of the .o files.
author | diego |
---|---|
date | Wed, 14 Mar 2007 23:37:48 +0000 |
parents | 618d1857f4c4 |
children | 8c20203d98ca |
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 |
18083 | 41 -mkdir -p $(MDIR) |
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 |
21080 | 49 dep depend: |
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
|
50 |
1 | 51 clean: |
17488
ce1ba8fd57e7
Make clean/distclean behave uniformly in all directories.
diego
parents:
15897
diff
changeset
|
52 rm -f *.o *.a *~ |
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 rm -f *.ko .mga* mga_vid.mod.c |
1 | 54 |
55 distclean: clean | |
15897 | 56 rm -f mga_vid_test tdfx_vid_tst |
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
|
57 |