Makefile udpates to build device specific test applications
authorTinku Mannan <tmannan@ti.com>
Thu, 23 Jan 2014 17:56:12 +0000 (12:56 -0500)
committerTinku Mannan <tmannan@ti.com>
Thu, 23 Jan 2014 17:56:12 +0000 (12:56 -0500)
ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/build/Makefile
ti/runtime/netapi/test/build/Makefile

index 3b0d08abafcb77c812c7d0bc0f54f33f8d1f3742..bd459c3cee2a32986c0f612da6619d2f636d5e5a 100755 (executable)
@@ -19,7 +19,29 @@ NETAPI_INC_DIR ?=  $(TRANS_SDK_INSTALL_PATH)
 NETAPI_SRC_DIR ?= $(TRANS_SDK_INSTALL_PATH)/ti/runtime/netapi
 
 PDK_ARMV7LIBDIR ?= ARMV7LIBDIR
-CSL_DEVICE ?= -DDEVICE_K2H
+
+
+ifeq ($(DEVICE), k2h)
+CSL_DEVICE = -DDEVICE_K2H
+PA_LIB   = pa
+endif
+ifeq  ($(DEVICE), k2k)
+CSL_DEVICE = -DDEVICE_K2K
+PA_LIB   = pa
+endif
+ifeq ($(DEVICE), k2l)
+CSL_DEVICE = -DDEVICE_K2L
+PA_LIB   = pa2
+endif
+ifeq ($(DEVICE), k2e)
+CSL_DEVICE = -DDEVICE_K2E
+PA_LIB   = pa2
+endif
+
+#default if DEVICE not provided
+CSL_DEVICE ?= -DDEVICE_K2L
+PA_LIB ?=-lpa2
+
 
 ifdef CROSS_TOOL_INSTALL_PATH
 ## Support backwards compatibility with KeyStone1 approach
@@ -52,7 +74,6 @@ IPSECMGR_IFACE_DIR?= ../
 
 QMSS_LIB=qmss
 CPPI_LIB=cppi
-PA_LIB=pa
 HPLIB_LIB=hplib
 SA_LIB=sa
 PKTLIB_LIB=pktlib
index 8679038ff0a97452c06d3d38d29a5db5a0ccedd1..5cfb908ad2494fc89f75e95f06969e4a510c504d 100755 (executable)
@@ -20,8 +20,6 @@ PKTLIB_INSTALL_PATH ?= $(PDK_INSTALL_PATH)/ti/runtime/pktlib
 
 # Set NETAPI INSTALL PATH to Transport SDK for default
 
-CSL_DEVICE ?= -DDEVICE_K2H
-
 ifeq ($(CPU),  cortex-a8)
         CFLAGS += -DCORTEX_A8
 endif
@@ -43,7 +41,6 @@ NT_BENCH_OBJS= $(ARMV7OBJDIR)/netapi/test/net_test_bench.o  $(ARMV7OBJDIR)/netap
 # Support Libraries used by NETAPI 
 QMSS_LIB = -lqmss
 CPPI_LIB = -lcppi
-PA_LIB   = -lpa
 PKTLIB_LIB = -lpktlib
 NETAPI_LIB = -lnetapi
 HP_LIB = -lhplib
@@ -52,7 +49,26 @@ SA_LIB = -lsa
 #with security enabled..
 NWAL_LIB = -lnwalsa
 
+ifeq ($(DEVICE), k2h)
+CSL_DEVICE = -DDEVICE_K2H
+PA_LIB   = -lpa
+endif
+ifeq  ($(DEVICE), k2k)
+CSL_DEVICE = -DDEVICE_K2K
+PA_LIB   = -lpa
+endif
+ifeq ($(DEVICE), k2l)
+CSL_DEVICE = -DDEVICE_K2L
+PA_LIB   = -lpa2
+endif
+ifeq ($(DEVICE), k2e)
+CSL_DEVICE = -DDEVICE_K2E
+PA_LIB   = -lpa2
+endif
 
+#default if DEVICE not provided
+CSL_DEVICE ?= -DDEVICE_K2L
+PA_LIB ?=-lpa2
 
 ifeq ($(USEDYNAMIC_LIB), yes)
 #presuming ARM executable would depend on dynamic library dependency