Mercurial > mplayer.hg
annotate drivers/Makefile @ 22670:e2f00cf0e6c6
Remove pointless variable indirection for -I options.
author | diego |
---|---|
date | Sat, 17 Mar 2007 13:29:26 +0000 |
parents | 6ad2c4027b3e |
children | 99db91e74443 |
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 |
3768
fda4c0ea039f
install: target added, based on patch by Jukka Tastula <jukka.tastula@kotinet.com>
arpi
parents:
1395
diff
changeset
|
3 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
|
4 MDIR = /lib/modules/$(VERSION)/misc |
1 | 5 |
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
|
6 ifneq (,$(findstring 2.6, $(VERSION))) |
22652 | 7 MGA_VID_OBJ = mga_vid.ko |
22670
e2f00cf0e6c6
Remove pointless variable indirection for -I options.
diego
parents:
22669
diff
changeset
|
8 CFLAGS = -O2 -D__KERNEL__ -DMODULE -I$(KERNEL_INCLUDES) -Wall -include $(KERNEL_INCLUDES)/config/modversions.h |
22655
d03828cf3ae4
Build tdfx_vid.o and tdfx_vid_tst by default under Linux 2.4.
diego
parents:
22654
diff
changeset
|
9 all: $(MGA_VID_OBJ) 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
|
10 else |
22652 | 11 MGA_VID_OBJ = mga_vid.o |
22670
e2f00cf0e6c6
Remove pointless variable indirection for -I options.
diego
parents:
22669
diff
changeset
|
12 CFLAGS = -O2 -D__KERNEL__ -DMODULE -I$(KERNEL_INCLUDES) -Wall -include $(KERNEL_INCLUDES)/linux/modversions.h |
22659 | 13 all: $(MGA_VID_OBJ) mga_vid_test tdfx_vid.o tdfx_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
|
14 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
|
15 |
1 | 16 mga_vid.o: mga_vid.c mga_vid.h |
22654 | 17 $(CC) $(CFLAGS) -c $< |
1 | 18 |
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
|
19 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
|
20 $(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
|
21 |
1 | 22 mga_vid_test: mga_vid_test.c |
22650
f1fbb2f0e659
Remove unnecessary include options from compilation command.
diego
parents:
22649
diff
changeset
|
23 $(CC) -O -o $@ $< |
1 | 24 |
9545
d1bbeae9f46a
tdfx_vid a new kernel driver for tdfx wich let use agp move :)
albeu
parents:
7073
diff
changeset
|
25 tdfx_vid.o: tdfx_vid.c 3dfx.h |
22654 | 26 $(CC) $(CFLAGS) -c $< |
9545
d1bbeae9f46a
tdfx_vid a new kernel driver for tdfx wich let use agp move :)
albeu
parents:
7073
diff
changeset
|
27 |
22659 | 28 tdfx_vid_test: tdfx_vid_test.c |
22650
f1fbb2f0e659
Remove unnecessary include options from compilation command.
diego
parents:
22649
diff
changeset
|
29 $(CC) -O -o $@ $< |
9545
d1bbeae9f46a
tdfx_vid a new kernel driver for tdfx wich let use agp move :)
albeu
parents:
7073
diff
changeset
|
30 |
22652 | 31 install: $(MGA_VID_OBJ) |
18083 | 32 -mkdir -p $(MDIR) |
22652 | 33 install -m 644 $(MGA_VID_OBJ) $(MDIR) |
3768
fda4c0ea039f
install: target added, based on patch by Jukka Tastula <jukka.tastula@kotinet.com>
arpi
parents:
1395
diff
changeset
|
34 depmod -a |
fda4c0ea039f
install: target added, based on patch by Jukka Tastula <jukka.tastula@kotinet.com>
arpi
parents:
1395
diff
changeset
|
35 |
21080 | 36 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
|
37 |
22653
e86fb87c952c
Make strange clean/distclean rules behave in a more standard fashion.
diego
parents:
22652
diff
changeset
|
38 clean: |
22659 | 39 rm -f *.o *~ *.ko mga_vid_test tdfx_vid_test |
1 | 40 |
41 distclean: clean | |
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 |
22646 | 43 .PHONY: all install dep depend clean distclean |