Imported Upstream version 17.05
[deb_dpdk.git] / examples / server_node_efd / server / Makefile
similarity index 57%
rename from examples/dpdk_qat/Makefile
rename to examples/server_node_efd/server/Makefile
index 01d61bc..a2f2f36 100644 (file)
@@ -1,6 +1,6 @@
 #   BSD LICENSE
 #
-#   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+#   Copyright(c) 2016-2017 Intel Corporation. All rights reserved.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
@@ -33,61 +33,25 @@ ifeq ($(RTE_SDK),)
 $(error "Please define RTE_SDK environment variable")
 endif
 
-ifeq ($(ICP_ROOT),)
-$(error "Please define ICP_ROOT environment variable")
-endif
-
-# Default target, can be overriden by command line or environment
+# Default target, can be overridden by command line or environment
 RTE_TARGET ?= x86_64-native-linuxapp-gcc
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
-ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
+ifneq ($(CONFIG_RTE_EXEC_ENV), "linuxapp")
 $(error This application can only operate in a linuxapp environment, \
 please change the definition of the RTE_TARGET environment variable)
 endif
 
-LBITS := $(shell uname -p)
-ifeq ($(CROSS_COMPILE),)
-    ifneq ($(CONFIG_RTE_ARCH),"x86_64")
-        ifneq ($(LBITS),i686)
-        $(error The RTE_TARGET chosen is not compatible with this environment \
-        (x86_64), for this application. Please change the definition of the \
-        RTE_TARGET environment variable, or run the application on a i686 OS)
-        endif
-    endif
-endif
-
 # binary name
-APP = dpdk_qat
+APP = server
 
 # all source are stored in SRCS-y
-SRCS-y := main.c crypto.c
+SRCS-y := main.c init.c args.c
 
-CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS)
-CFLAGS += -I$(ICP_ROOT)/quickassist/include \
-               -I$(ICP_ROOT)/quickassist/include/lac \
-               -I$(ICP_ROOT)/quickassist/lookaside/access_layer/include
+INC := $(wildcard *.h)
 
-# From CRF 1.2 driver, library was renamed to libicp_qa_al.a
-ifneq ($(wildcard $(ICP_ROOT)/build/icp_qa_al.a),)
-ICP_LIBRARY_PATH = $(ICP_ROOT)/build/icp_qa_al.a
-else
-ICP_LIBRARY_PATH = $(ICP_ROOT)/build/libicp_qa_al.a
-endif
-
-LDLIBS += -L$(ICP_ROOT)/build
-LDLIBS += $(ICP_LIBRARY_PATH) \
-                -lz \
-                -losal \
-                -ladf_proxy \
-                -lcrypto
-
-# workaround for a gcc bug with noreturn attribute
-# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
-ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
-CFLAGS_main.o += -Wno-return-type
-endif
+CFLAGS += $(WERROR_FLAGS) -O3
+CFLAGS += -I$(SRCDIR)/../shared
 
 include $(RTE_SDK)/mk/rte.extapp.mk