1 ###############################################################################
3 # Copyright (c) 2019 Intel.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 ###############################################################################
21 $(error "Please define RTE_SDK environment variable")
23 # Default target, can be overridden by command line or environment
24 RTE_TARGET ?= x86_64-native-linuxapp-icc
27 include $(RTE_SDK)/mk/rte.vars.mk
28 SRCS-y := wls_lib_dpdk.c syslib.c
30 #CFLAGS +=-Wall -wd9 -DDPDK_WLS
31 CFLAGS +=-Wall -DDPDK_WLS -fstack-protector
33 include $(RTE_SDK)/mk/rte.extshared.mk
41 INSTALL_MOD_DIR ?=/lib/modules/`uname -r`/updates/drivers/intel/wls
42 cmd_depmod = /sbin/depmod -a
43 EXTRA_CFLAGS +=-g -Wall
47 $(MAKE) -C $(KERNEL_SRC) $(EXTRA_CFLAGS) M=$(SRC)
50 $(MAKE) -C $(KERNEL_SRC) $(EXTRA_CFLAGS) M=$(SRC) modules_install
53 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -D_GNU_SOURCE -g -fPIC -o $@ -c $<
55 syslib_user.o: syslib.c
56 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -g -fPIC -o $@ -c $<
58 libwls.so: wls_lib.o syslib_user.o
59 $(CC) $(LDFLAGS) -g -shared -fPIC -Wl,-soname,libwls.so -o $@ wls_lib.o syslib_user.o
62 [ -d "${INSTALL_MOD_DIR}" ] || mkdir -p ${INSTALL_MOD_DIR}
63 cp ./wls.ko ${INSTALL_MOD_DIR}
66 rm -f *.o *~ core .depend .*.cmd *.ko *.so *.mod.c
67 rm -f Module.markers Module.symvers modules.order
68 rm -rf .tmp_versions Modules.symvers