info: Updated key project facts
[vswitchperf.git] / src / l2fwd / Makefile
1 # Copyright 2015 Futurewei Inc.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # A copy of the license is included with this distribution. If you did not
6 # recieve a copy you may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 obj-m += l2fwd.o
17
18 KBUILD_CFLAGS += -Wno-unused-function -Wno-unused-label -Wno-unused-variable
19 # Allow kernel version to be overridden by environment
20 KERNEL_VERSION ?= $(shell uname -r)
21
22 KERNELDIR := /lib/modules/$(KERNEL_VERSION)/build
23 PWD := $(shell pwd)
24
25 all:
26         $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
27
28 force_make: all
29
30 sanity:
31         @echo "Make sanity in $(WORK_DIR) (stub) "
32
33 clean:
34         $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
35         rm -f l2fwd*deb
36
37 distclean: clean
38
39 clobber: clean
40
41
42 install:
43         sudo mkdir /lib/modules/`uname -r`/kernel/net/core
44         sudo cp *.ko /lib/modules/`uname -r`/kernel/net/core
45
46 uninstall:
47         sudo rm /lib/modules/`uname -r`/kernel/net/core/l2fwd.ko
48
49 debian-package: all
50         ./gen_debian_package.sh