1b451c18dSAsim JamshedTARGET = midstat 276404edcSAsim Jamshed 376404edcSAsim Jamshed###################################################################### 476404edcSAsim Jamshed# GCC and compilation options 576404edcSAsim Jamshed###################################################################### 6df5d5f77SAsim JamshedGCC = $(CC) 7*35de7e5dSAsim JamshedGCC_OPT = -m64 -Wall -Werror -fgnu89-inline 876404edcSAsim JamshedGCC_OPT += -DNDEBUG -O3 -g -DNETSTAT -DINFO -DDBGERR -DDBGCERR 976404edcSAsim JamshedGCC_OPT += $(DBG_OPT) 1076404edcSAsim Jamshedifeq ($V,) # no echo 1176404edcSAsim Jamshed export MSG=@echo 1276404edcSAsim Jamshed export HIDE=@ 1376404edcSAsim Jamshedelse 1476404edcSAsim Jamshed export MSG=@\# 1576404edcSAsim Jamshed export HIDE= 1676404edcSAsim Jamshedendif 1776404edcSAsim Jamshed 1876404edcSAsim Jamshed###################################################################### 1976404edcSAsim Jamshed# LIBRARIES AND INCLUDES 2076404edcSAsim Jamshed###################################################################### 2176404edcSAsim JamshedMTCP_FLD = ../../core 2276404edcSAsim JamshedMTCP_INC =-I$(MTCP_FLD)/include 2376404edcSAsim JamshedMTCP_TARGET = $(MTCP_FLD)/lib/libmtcp.a 2476404edcSAsim JamshedLIBS += -lmtcp -lssl -lcrypto -lnuma -lpthread -lrt 2576404edcSAsim JamshedLIB_DIR += -L$(MTCP_FLD)/lib 2676404edcSAsim JamshedCMN_DIR = ../common 2776404edcSAsim JamshedCMN_INC = -I$(CMN_DIR) 2876404edcSAsim JamshedUTIL_INC = -I../../util/include 2976404edcSAsim Jamshed 3076404edcSAsim Jamshed# I/O library parameter (PSIO or DPDK) 3176404edcSAsim Jamshed__IO_LIB_ARGS 3276404edcSAsim Jamshed 3376404edcSAsim Jamshed###################################################################### 3476404edcSAsim Jamshed 3576404edcSAsim Jamsheddefault: $(TARGET) 3676404edcSAsim Jamshed 3776404edcSAsim Jamshed$(MTCP_TARGET): 3876404edcSAsim Jamshed cd $(MTCP_FLD)/src && make 3976404edcSAsim Jamshed 4076404edcSAsim Jamshed$(TARGET): $(MTCP_TARGET) $(TARGET).c $(CMN_DIR)/*.c 4176404edcSAsim Jamshed $(MSG) " CC $<" 4276404edcSAsim Jamshed $(HIDE) $(GCC) $(GCC_OPT) -o $@ $^ $(MTCP_INC) $(CMN_INC) $(UTIL_INC) $(LIB_DIR) $(LIBS) 4376404edcSAsim Jamshed 4476404edcSAsim Jamshedclean: 4576404edcSAsim Jamshed rm -rf *~ *.o $(TARGET) logs/* 4676404edcSAsim Jamshed 4776404edcSAsim Jamshedcleanall: clean 4876404edcSAsim Jamshed rm -rf Makefile 4976404edcSAsim Jamshed 5076404edcSAsim Jamshed 51