blob: 6eea561f6b7cc734f2c7b6f6e7d601ac7e48bca1 [file] [log] [blame]
#
# Makefile for the PF_RING API example programs
#
# Try to make both programs written on top of the
# PF_RING library and programs originally written
# on top of PCAP library and linked now to use
# the version with PF_RING aware functionalities.
#
#
# PF_RING
#
PFRINGDIR = ../lib
LIBPFRING = ${PFRINGDIR}/libpfring.a
#
# DNA Support
DNA_DEFINE = #-DENABLE_DNA_SUPPORT
#
# PF_RING aware libpcap
#
#O_FLAG = -O2 -DHAVE_PF_RING
#EXTRA_LIBS =
#PCAPDIR = ../libpcap-1.1.1-ring
#LIBPCAP = ${PCAPDIR}/libpcap.a ${EXTRA_LIBS}
#INCLUDE += -I${PCAPDIR}
#
# Search directories
#
PFRING_KERNEL=../../kernel
INCLUDE = -I${PFRING_KERNEL} -I${PFRING_KERNEL}/plugins -I${PFRINGDIR}
#
# C compiler and flags
#
#
# CROSS_COMPILE=arm-mv5sft-linux-gnueabi-
#
CC = ${CROSS_COMPILE}gcc #--platform=native
CFLAGS = @CFLAGS@ ${O_FLAG} -Wall ${INCLUDE} ${DNA_DEFINE} -O2 # -g
#CFLAGS = @CFLAGS@ ${O_FLAG} -Wall ${INCLUDE} ${DNA_DEFINE} @HAVE_ZERO@ @HAVE_BPF@ -O2 # -g
# LDFLAGS =
#
# User and System libraries
#
LIBS = ${LIBPFRING} @DAG_LIB@ -lpthread @SYSLIBS@ @BPF_LIB@ @SILICOM_LIBS@ @REDIS_LIB@ -lrt
# How to make an object file
%.o: %.c pfutils.c
# @echo "=*= making object $@ =*="
${CC} ${CFLAGS} -c $< -o $@
#
# Main targets
#
PFPROGS = my_test
TARGETS = ${PFPROGS}
all: ${TARGETS}
my_test: my_test.o ${LIBPFRING}
${CC} ${CFLAGS} my_test.o ${LIBS} -o $@
clean:
@rm -f ${TARGETS} *.o *~