Woojoong Kim | 04d1216 | 2017-11-27 10:59:08 -0800 | [diff] [blame] | 1 | ifeq ($(RTE_SDK),) |
| 2 | $(error "Please define RTE_SDK environment variable") |
| 3 | endif |
| 4 | |
| 5 | MAKEFLAGS += -j |
| 6 | |
| 7 | # Default target, can be overriden by command line or environment |
| 8 | RTE_TARGET ?= x86_64-native-linuxapp-gcc |
| 9 | |
| 10 | include $(RTE_SDK)/mk/rte.vars.mk |
| 11 | include $(NG_CORE)/config/ng-core_cfg.mk |
| 12 | |
| 13 | #DIRS-y += pipeline |
| 14 | # binary name |
| 15 | APP = ngic_dataplane |
| 16 | # all source are stored in SRCS-y |
| 17 | SRCS-y := main.c\ |
| 18 | pkt_handler.c\ |
| 19 | cdr.c\ |
| 20 | master_cdr.c\ |
| 21 | session_cdr.c\ |
| 22 | config.c\ |
| 23 | init.c\ |
| 24 | dataplane.c\ |
| 25 | gtpu.c\ |
| 26 | ether.c\ |
| 27 | ipv4.c\ |
| 28 | util.c\ |
| 29 | acl.c\ |
| 30 | meter.c\ |
| 31 | adc_table.c\ |
| 32 | pcc_table.c\ |
| 33 | sess_table.c\ |
| 34 | commands.c\ |
| 35 | stats.c\ |
| 36 | ddn_utils.c\ |
| 37 | pipeline/epc_load_balance.o\ |
| 38 | pipeline/epc_packet_framework.o\ |
| 39 | pipeline/epc_tx.o\ |
| 40 | pipeline/epc_rx.o\ |
| 41 | pipeline/epc_worker.o\ |
| 42 | pipeline/epc_arp_icmp.o\ |
| 43 | pipeline/epc_spns_dns.o\ |
| 44 | $(SRCDIR)/../interface/interface.o\ |
| 45 | $(SRCDIR)/../cp_dp_api/vepc_cp_dp_api.o\ |
| 46 | $(SRCDIR)/../test/simu_cp/nsb/nsb_test_util.o\ |
| 47 | $(SRCDIR)/../test/simu_cp/simu_cp.o\ |
| 48 | $(SRCDIR)/../interface/ipc/dp_ipc_api.o\ |
| 49 | $(SRCDIR)/../interface/udp/vepc_udp.o\ |
| 50 | |
| 51 | CFLAGS += -I$(SRCDIR)/ |
| 52 | CFLAGS += -I$(SRCDIR)/../interface |
| 53 | CFLAGS += -I$(SRCDIR)/../interface/ipc |
| 54 | CFLAGS += -I$(SRCDIR)/../interface/udp |
| 55 | CFLAGS += -I$(SRCDIR)/../interface/sdn |
| 56 | CFLAGS += -I$(SRCDIR)/../interface/zmq |
| 57 | CFLAGS += -I$(SRCDIR)/../cp_dp_api |
| 58 | CFLAGS += -I$(SRCDIR)/../test/simu_cp |
| 59 | CFLAGS += -I$(SRCDIR)/../test/simu_cp/nsb |
| 60 | CFLAGS += -I$(SRCDIR)/pipeline |
| 61 | CFLAGS += -I$(SRCDIR)/../cp |
| 62 | CFLAGS += -I$(SRCDIR)/../lib/libsponsdn |
| 63 | |
| 64 | CFLAGS += -Wno-psabi # suppress "The ABI for passing parameters with 64-byte alignment has changed in GCC 4.6" |
| 65 | |
| 66 | |
| 67 | CFLAGS += -DLDB_DP # should be included for dataplane. |
| 68 | |
| 69 | ifneq (,$(findstring SDN_ODL_BUILD, $(CFLAGS))) |
| 70 | SRCS-y += $(SRCDIR)/../interface/zmq/zmqsub.o |
| 71 | SRCS-y += $(SRCDIR)/../interface/zmq/zmqpub.o |
| 72 | LDFLAGS += -L/usr/local/lib -lzmq |
| 73 | endif |
| 74 | #CFLAGS += -g -O3 |
| 75 | CFLAGS += -g -O0 |
| 76 | |
| 77 | # Un-comment below line to read fake cp config. |
| 78 | #CFLAGS += -DSIMU_CP |
| 79 | |
| 80 | # ASR- Un-comment below line to enable GTPU HEADER Sequence Number option. |
| 81 | #CFLAGS += -DGTPU_HDR_SEQNB |
| 82 | |
| 83 | # ASR- Un-comment below line to enable PCC, ADC, CDR, FILTERING, METERING pipeline stages. |
| 84 | #CFLAGS += -DINCLUDE_PIPELINE_STAGE |
| 85 | |
| 86 | # Un-comment below line to enable PCC, ADC, CDR, FILTERING, METERING pipeline stages. |
| 87 | #CFLAGS += -DINCLUDE_ADC_STAGE |
| 88 | |
| 89 | # Un-comment below line to enable PCC, ADC, CDR, FILTERING, METERING pipeline stages. |
| 90 | #CFLAGS += -DINCLUDE_MTR_STAGE |
| 91 | |
| 92 | # Un-comment below line to enable NIC and pipeline stats. |
| 93 | #CFLAGS += -DSTATS |
| 94 | |
| 95 | # Un-comment below line to get stats from command line (for test harness) |
| 96 | #CFLAGS += -DCMDLINE_STATS |
| 97 | |
| 98 | # Un-comment below line to clear STATS after reading. |
| 99 | #CFLAGS += -DSTATS_CLR |
| 100 | |
| 101 | # Un-comment below line to enable pipeline out stats, STATS flag should be enabled. |
| 102 | #CFLAGS += -DOSTATS |
| 103 | |
| 104 | # Un-comment below line to enable DNS stats. |
| 105 | CFLAGS += -DDNS_STATS |
| 106 | |
| 107 | # Un-comment below line to enable core RX and core TX. All |
| 108 | # processing stages will be skipped. |
| 109 | #CFLAGS += -DRX_TX |
| 110 | |
| 111 | # Un-comment below line to skip RX Meta access |
| 112 | #CFLAGS += -DSKIP_RX_META |
| 113 | |
| 114 | # Un-comment below line to enable core RX, core LB and core TX. All |
| 115 | # processing stages will be skipped. |
| 116 | #CFLAGS += -DRX_LB_TX |
| 117 | |
| 118 | # Un-comment below line to enable SDF Metering |
| 119 | #CFLAGS += -DSDF_MTR |
| 120 | |
| 121 | # Un-comment below line to enable APN Metering |
| 122 | #CFLAGS += -DAPN_MTR |
| 123 | |
| 124 | # Un-comment below line to enable ADC upfront. |
| 125 | CFLAGS += -DADC_UPFRONT |
| 126 | |
| 127 | # Un-comment below line to enable hyperscan DPI. |
| 128 | #CFLAGS += -DHYPERSCAN_DPI |
| 129 | |
| 130 | # Un-comment below line to enable Rating group CDRs. |
| 131 | #CFLAGS += -DRATING_GRP_CDR |
| 132 | |
| 133 | # Un-comment below line to skip LB rte_hash_crc_4byte |
| 134 | # and enable LB based on UE ip last byte. |
| 135 | #CFLAGS += -DSKIP_LB_HASH_CRC |
| 136 | |
| 137 | # set SGI port action handler equal to S1U action handler. |
| 138 | #CFLAGS += -DSKIP_LB_GTPU_AH |
| 139 | |
| 140 | # Un-comment below line to read acl rules from file. |
| 141 | #CFLAGS += -DACL_READ_CFG |
| 142 | |
| 143 | # Un-comment below line if you have 16 x 1GB hugepages. |
| 144 | #CFLAGS += -DHUGE_PAGE_16GB |
| 145 | |
| 146 | # Un-comment below line to configure DP Tables from DP app. |
| 147 | CFLAGS += -DDP_TABLE_CONFIG |
| 148 | |
| 149 | CFLAGS += -Werror |
| 150 | CFLAGS += -Wunused-variable |
| 151 | CFLAGS_config.o := -D_GNU_SOURCE |
| 152 | |
| 153 | # workaround for a gcc bug with noreturn attribute |
| 154 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 |
| 155 | ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) |
| 156 | CFLAGS_dataplane.o += -Wno-return-type |
| 157 | endif |
| 158 | |
| 159 | LDFLAGS += -L$(RTE_SRCDIR)/../lib/libsponsdn/libsponsdn/x86_64-native-linuxapp-gcc/ -lsponsdn |
| 160 | |
| 161 | LDFLAGS += -L$(HYPERSCANDIR)/build/lib |
| 162 | |
| 163 | LDFLAGS += -lexpressionutil -lhs -lhs_runtime -lstdc++ -lm -lcrypto |
| 164 | |
| 165 | LDFLAGS += -lrte_pmd_af_packet |
| 166 | |
| 167 | include $(RTE_SDK)/mk/rte.extapp.mk |