############################################################################# # IPFREESCALE.MK # # Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipfreescale.mk,v $ $Revision: 1.29.10.1 $ # $Source: /home/interpeak/CVSRoot/ipfreescale/gmake/ipfreescale.mk,v $ # $Author: svc-cmnet $ $Date: 2013-03-13 07:45:24 $ # $State: Exp $ $Locker: $ # # INTERPEAK_COPYRIGHT_STRING # ############################################################################# ############################################################################# # PRODUCT ########################################################################### IPPROD ?= ipfreescale ############################################################################# # DEFINE ########################################################################### IPDEFINE += -DIPFREESCALE ############################################################################# # IPLIBDEFINE ########################################################################### # Default IPFREESCALE_DEVICE = IPFREESCALE_SEC2 # PowerPC ifeq ($(IPTARGET),ppc) IPFREESCALE_DEVICE = IPFREESCALE_SEC2 endif # PowerPC ifeq ($(IPTARGET),powerpc) IPFREESCALE_DEVICE = IPFREESCALE_SEC2 endif # ColdFire ifeq ($(IPTARGET),cf) IPFREESCALE_DEVICE = IPFREESCALE_COLDFIRE endif # Is SEC4 supported by BSP ifeq ($(_WRS_CONFIG_BSP_SUPPORTS_IPFREESCALE_SEC4),y) IPFREESCALE_DEVICE = IPFREESCALE_SEC4 #define SEC4_USE_QI if enable Queue Interface (QMAN) #IPLIBDEFINE += -DSEC4_USE_QI # All cores will share the same job queue (to allow for more than 4 cores to submit jobs) #IPLIBDEFINE += -DSEC4_USE_SHARED_JOB_QUEUE # Pre-allocate memory for descriptor buffers. # It improves performance for systems using many jobs via the job queues but uses additional memory IPLIBDEFINE += -DSEC4_PREALLOC_DESC_BUF endif IPLIBDEFINE += -D$(IPFREESCALE_DEVICE) ############################################################################# # SEC2_VERSION ########################################################################### SEC2_VERSION = 1_2 ############################################################################# # INCLUDE ########################################################################### IPINCLUDE += -I$(IPFREESCALE_ROOT)/config IPINCLUDE += -I$(IPFREESCALE_ROOT)/include IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/src ifeq ($(IPFREESCALE_DEVICE),IPFREESCALE_SEC2) ifeq ($(IPPORT),lkm) IPLIBINCLUDE += -I$(IPLINUX_ROOT)/include ifeq ($(IPTARGET),ppc) IPLIBINCLUDE += -I$(IPLINUX_ROOT)/arch/ppc endif ifeq ($(IPTARGET),powerpc) IPLIBINCLUDE += -I$(IPLINUX_ROOT)/arch/powerpc endif # WR Linux has the SEC2 driver include in the kernel source tree IPLIBINCLUDE += -I$(IPLINUX_ROOT)/drivers/crypto/sec2 endif ifeq ($(IPPORT),las) IPINCLUDE += -I$(IPLINUX_ROOT)/drivers/crypto/sec2 endif ifeq ($(IPPORT),unix) IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec2/$(SEC2_VERSION) endif ifeq ($(IPPORT),integrity) IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec2/$(SEC2_VERSION) endif ifeq ($(IPPORT),vxworks) IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec2/$(SEC2_VERSION) endif endif ifeq ($(IPFREESCALE_DEVICE),IPFREESCALE_SEC4) ifeq ($(IPPORT),vxworks) IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec4/NetCommSw/inc IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec4/NetCommSw/inc/Peripherals IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec4/NetCommSw/inc/integrations IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec4/NetCommSw/inc/integrations/P4080 IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec4/NetCommSw/inc/etc IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec4/NetCommSw/inc/cores IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec4/NetCommSw/Peripherals/SEC IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec4/NetCommSw/Peripherals/SEC/DCL IPLIBINCLUDE += -I$(IPFREESCALE_ROOT)/sec4 #QMan, Bman TODO: Update this. Used when defined SEC4_USE_QI IPLIBINCLUDE += -I$(WIND_BASE)/target/src/hwif/h/resource endif endif ############################################################################# # OBJECTS ########################################################################### # Configuration IPLIBOBJECTS_C += ipfreescale_config.o # Compiles the xxx_config.o if the $SKIP_CONFIG macro is either not defined # or set to anything other than true. ifneq ($(SKIP_CONFIG),true) IPLIBOBJECTS += $(IPLIBOBJECTS_C) endif # Interpeak Freescale hardware crypto IPLIBOBJECTS += ipfreescale.o IPLIBOBJECTS += ipfreescale_ipsec.o IPLIBOBJECTS += ipfreescale_os.o # PowerPC ifeq ($(IPTARGET),ppc) ifneq ($(IPFREESCALE_DEVICE),IPFREESCALE_COLDFIRE) #SEC2 or SEC4 IPLIBOBJECTS += ipfreescale_sec.o IPLIBOBJECTS += ipfreescale_ipsec_sec.o endif endif ifeq ($(IPTARGET),powerpc) ifneq ($(IPFREESCALE_DEVICE),IPFREESCALE_COLDFIRE) #SEC2 or SEC4 IPLIBOBJECTS += ipfreescale_sec.o IPLIBOBJECTS += ipfreescale_ipsec_sec.o endif endif # ColdFire ifeq ($(IPTARGET),cf) IPLIBOBJECTS += ipfreescale_coldfire.o IPLIBOBJECTS += ipfreescale_ipsec_coldfire.o endif # i686 (Fix for build tests) ifeq ($(IPTARGET),i686) IPLIBOBJECTS += ipfreescale_sec.o IPLIBOBJECTS += ipfreescale_ipsec_sec.o endif ifneq ($(IPPORT),las) IPLIBOBJECTS += ipfreescale_cmd_freescale.o endif # Freescale SEC2 driver ifeq ($(IPFREESCALE_DEVICE),IPFREESCALE_SEC2) ifeq ($(IPPORT),vxworks) ifeq ($(IPTARGET),ppc) IPLIBDEFINE += -DVXWORKS ifeq ($(IPBUILD),debug) IPLIBDEFINE += -DDBG endif IPLIBOBJECTS += sec2_cha.o IPLIBOBJECTS += sec2isr.o IPLIBOBJECTS += sec2_dpd.o IPLIBOBJECTS += sec2_init.o IPLIBOBJECTS += sec2_io.o IPLIBOBJECTS += sec2_ioctl.o IPLIBOBJECTS += sec2_request.o IPLIBOBJECTS += sec2_sctrMap.o endif endif endif # SEC4 driver ifeq ($(IPFREESCALE_DEVICE),IPFREESCALE_SEC4) ifeq ($(IPPORT),vxworks) #TODO: Put somewhere else in config file #IPLIBDEFINE += -DSEC4_POLLED_MODE ### Freescale Netcomm library controls IPLIBDEFINE += -DNCSW_VXWORKS IPLIBDEFINE += -DVXWORKS # from dflags_debug.h. IPLIBDEFINE += -DP4080 -DNCSW_PPC_CORE ifeq ($(IPBUILD),debug) IPLIBDEFINE += -DDEBUG IPLIBDEFINE += -DDEBUG_ERRORS=1 #IPLIBDEFINE += -DDEBUG_XX_MALLOC else IPLIBDEFINE += -DDISABLE_SANITY_CHECKS IPLIBDEFINE += -DDISABLE_ASSERTIONS endif IPLIBDEFINE += -DREPORT_EVENTS=1 -DEVENT_GLOBAL_LEVEL=REPORT_LEVEL_MINOR IPLIBDEFINE += -DDEBUG_GLOBAL_LEVEL=REPORT_LEVEL_INFO -DERROR_GLOBAL_LEVEL=REPORT_LEVEL_MINOR ifeq ($(IPTARGET),ppc) ##FSL SEC library IPLIBOBJECTS += sec.o sec_jq.o sec_qi.o ##FSL SEC/DCL library IPLIBOBJECTS += sec_dcl_api.o sec_dcl.o sec_dcl_cmd.o ##FSL ETC IPLIBOBJECTS += error.o memcpy.o mem.o ##FSL INTEGRATIONS/P4080 IPLIBOBJECTS += module_strings.o #Customizations to DCL IPLIBOBJECTS += sec_dcl_api_ipfreescale.o sec_dcl_ipfreescale.o #IPNET customization IPLIBOBJECTS += xx.o # "driver" IPLIBOBJECTS += sec4_init.o sec4_io.o sec4_ioctl.o sec4isr.o sec4_request.o # SEC4 Queue Interface to QMAN IPLIBOBJECTS += sec4_qi_request.o endif endif endif ############################################################################# # VPATH ########################################################################### IPSRCDIRS += $(IPFREESCALE_ROOT)/src $(IPFREESCALE_ROOT)/config ifeq ($(IPFREESCALE_DEVICE),IPFREESCALE_SEC2) IPSRCDIRS += $(IPFREESCALE_ROOT)/sec2/$(SEC2_VERSION) endif ifeq ($(IPFREESCALE_DEVICE),IPFREESCALE_SEC4) IPSRCDIRS += $(IPFREESCALE_ROOT)/sec4/NetCommSw/Peripherals/SEC $(IPFREESCALE_ROOT)/sec4/NetCommSw/Peripherals/SEC/DCL $(IPFREESCALE_ROOT)/sec4/NetCommSw/etc IPSRCDIRS += $(IPFREESCALE_ROOT)/sec4/NetCommSw/integrations/P4080 #SEC4 customizations IPSRCDIRS += $(IPFREESCALE_ROOT)/sec4 endif ############################################################################# # LIB ########################################################################### IPLIBS += $(IPLIBROOT)/libipfreescale.a ############################################################################# # BINARIES ############################################################################# ifeq ($(IPPORT),las) # Path to binaries IPCMDDIR := $(IPOBJDIR)/bin # List of shell commands to build IPFREESSCALESHELLCMDS = freescale _IPFREESSCALESHELLCMDS = $(addprefix $(IPCMDDIR)/,$(IPFREESSCALESHELLCMDS)) bin: $(_IPFREESSCALESHELLCMDS) $(IPOBJDIR)/ipfreescale_cmd_%.o: $(IPFREESCALE_ROOT)/src/ipfreescale_cmd_%.c @$(IPECHO) "+++ Compiling IPFREESCALE shell command $<" $(IPVERB)$(IPCC) -Dipfreescale_cmd_$*=ipcom_cmd_entry_point $(IPCFLAGS) -I$(SEC2DIR) -I$(IPIPSEC_ROOT)/src -o $@ $< $(IPCMDDIR)/freescale: $(IPOBJDIR)/ipfreescale_cmd_freescale.o $(IPOBJDIR)/ipcom_shell_cmd_stub.o @$(IPECHO) "+++ Linking IPFREESCALE shell command $@" $(IPVERB)$(IPLD) -o $@ $(IPLDFLAGS) $^ $(IPLIBS) $(IPLIBS) $(IPLIBS) $(IPLASTLIBS) endif ########################################################################### # END OF IPFREESCALE.MK ###########################################################################