Mercurial > vloopback
annotate Makefile @ 6:d3fdefea8bce
Update info and add a little fix to clean
author | AngelCarpintero |
---|---|
date | Sat, 12 Jul 2008 17:12:25 +0000 |
parents | fa5d2b9d8831 |
children | 80590d10a596 |
rev | line source |
---|---|
5
fa5d2b9d8831
Add make dist to create tarball without .svn contest
AngelCarpintero
parents:
2
diff
changeset
|
1 VERSION=trunk |
fa5d2b9d8831
Add make dist to create tarball without .svn contest
AngelCarpintero
parents:
2
diff
changeset
|
2 |
0 | 3 ifneq ($(KERNELRELEASE),) |
4 | |
5 obj-m := vloopback.o | |
6 | |
7 else | |
8 | |
9 KVER := $(shell uname -r) | |
10 KLINK := $(shell test -e /lib/modules/${KVER}/source/ && echo source || echo "build") | |
11 KSRC := /lib/modules/$(KVER)/$(KLINK) | |
12 PWD := $(shell pwd) | |
13 DEST := /lib/modules/$(KVER)/kernel/drivers/misc | |
14 | |
15 # Fix some problem with suse < 9.2 and suse >= 9.2 | |
16 is_suse := $(shell test -e /etc/SuSE-release && echo 1 || echo 0) | |
17 ifeq ($(is_suse),1) | |
18 suse_version := $(shell grep VERSION /etc/SuSE-release | cut -f 3 -d " "| tr -d .) | |
19 is_suse_92_or_greater := $(shell test $(suse_version) -ge 92 && echo 1) | |
20 ifeq ($(is_suse_92_or_greater),1) | |
21 KSRC := /lib/modules/$(KVER)/build | |
22 endif | |
23 endif | |
24 | |
25 | |
26 | |
27 all default: | |
28 $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules | |
29 | |
30 install: | |
31 install -d $(DEST) | |
32 install -m 644 -c vloopback.ko $(DEST) | |
33 -/sbin/depmod -a | |
34 | |
35 | |
36 uninstall: | |
37 rm -f $(DEST)/vloopback.ko | |
38 -/sbin/depmod -a | |
39 clean: | |
6 | 40 rm -f .*.cmd *.o *.mod.c *.ko .v* *~ core Modules.symvers Module.symvers |
0 | 41 rm -rf .tmp_versions/ |
2 | 42 rm -f example/dummy example/feed example/resize example/invert |
5
fa5d2b9d8831
Add make dist to create tarball without .svn contest
AngelCarpintero
parents:
2
diff
changeset
|
43 |
fa5d2b9d8831
Add make dist to create tarball without .svn contest
AngelCarpintero
parents:
2
diff
changeset
|
44 dist: clean |
fa5d2b9d8831
Add make dist to create tarball without .svn contest
AngelCarpintero
parents:
2
diff
changeset
|
45 cd .. ; tar cfvz vloopback-$(VERSION).tar.gz --exclude='.svn' $(VERSION)/ |
0 | 46 endif |