1 # Copyright 2015 Futurewei Inc.
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
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)
22 KERNELDIR := /lib/modules/$(KERNEL_VERSION)/build
26 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
31 @echo "Make sanity in $(WORK_DIR) (stub) "
34 $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
43 sudo mkdir /lib/modules/`uname -r`/kernel/net/core
44 sudo cp *.ko /lib/modules/`uname -r`/kernel/net/core
47 sudo rm /lib/modules/`uname -r`/kernel/net/core/l2fwd.ko
50 ./gen_debian_package.sh