Mercurial > pt1.oyama
annotate driver/Makefile @ 91:2b55985bbb4c
- adapt date format to driver's one
- version bump to 1.1.0 on non-mercurial environment
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Wed, 27 Jan 2010 16:45:37 +0900 |
parents | c6311b6efd9c |
children | ee357d8f987f |
rev | line source |
---|---|
90
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
1 TARGET := pt1_drv.ko |
72
c9b41c438a93
hide misleading build message
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
58
diff
changeset
|
2 VERBOSITY = 0 |
90
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
3 REL_VERSION = "1.1.0" |
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
4 REL_DATE = "2010-01-27" |
36 | 5 |
6 all: ${TARGET} | |
7 | |
90
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
8 pt1_drv.ko: pt1_pci.c pt1_i2c.c pt1_tuner.c pt1_tuner_data.c version.h |
72
c9b41c438a93
hide misleading build message
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
58
diff
changeset
|
9 make -C /lib/modules/`uname -r`/build M=`pwd` V=$(VERBOSITY) modules |
36 | 10 |
11 clean: | |
72
c9b41c438a93
hide misleading build message
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
58
diff
changeset
|
12 make -C /lib/modules/`uname -r`/build M=`pwd` V=$(VERBOSITY) clean |
36 | 13 |
45
05424917a022
add a rule to install an udev rule file
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
36
diff
changeset
|
14 obj-m := pt1_drv.o |
36 | 15 |
16 pt1_drv-objs := pt1_pci.o pt1_i2c.o pt1_tuner.o pt1_tuner_data.o | |
17 | |
90
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
18 clean-files := *.o *.ko *.mod.[co] *~ version.h |
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
19 |
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
20 version.h: |
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
21 revh=`hg parents --template '#define DRV_VERSION "r{rev}:{node|short}"\n#define DRV_RELDATE "{date|shortdate}"\n' 2>/dev/null`; \ |
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
22 if [ -n "$$revh" ] ; then \ |
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
23 echo "$$revh" > $@; \ |
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
24 else \ |
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
25 printf "#define DRV_VERSION \"$(REL_VERSION)\"\n#define DRV_RELDATE \"$(REL_DATE)\"\n" > $@; \ |
c6311b6efd9c
- version string should be generated upon revision on mercurial repository
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
72
diff
changeset
|
26 fi |
36 | 27 |
28 install: $(TARGET) | |
29 install -m 644 $(TARGET) /lib/modules/`uname -r`/kernel/drivers/video | |
45
05424917a022
add a rule to install an udev rule file
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
36
diff
changeset
|
30 if [ -d /etc/udev/rules.d -a ! -f /etc/udev/rules.d/99-pt1.rules ] ; then \ |
05424917a022
add a rule to install an udev rule file
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
36
diff
changeset
|
31 install -m 644 etc/99-pt1.rules /etc/udev/rules.d ; \ |
05424917a022
add a rule to install an udev rule file
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
36
diff
changeset
|
32 fi |
58 | 33 depmod -a |