Commit e6770ea7 authored by 's avatar
Browse files

fixed conditional compilation/installation for anonlib and tracklib


git-svn-id: file:///home/svn/mapi/trunk@353 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 1bcc0158
......@@ -42,6 +42,11 @@ ifeq ($(WITH_ANONYMIZATION),1)
ANONYMIZATION_TARGETS=anonlib.so
endif
TRACKING_TARGETS=
ifeq ($(WITH_TRACKING),1)
TRACKING_TARGETS=tracklib.so
endif
ifeq ($(WITH_PRIORITIES),1)
CFLAGS := $(CFLAGS) -DDEBUG=$(DEBUG) $(INCLUDE) -DWITH_FUNCT_STATS -DWITH_MODIFY_PKTS -DWITH_PRIORITIES -DPRIORITIES=$(PRIORITIES)
else
......@@ -52,7 +57,7 @@ ifeq ($(VALGRIND),1)
CFLAGS := $(CFLAGS) -DVALGRIND
endif
all: $(TARGETS) $(DAG) $(COMBOSIX) $(IPFIX_TARGETS) $(ETHEREAL_TARGETS) $(ANONYMIZATION_TARGETS)
all: $(TARGETS) $(DAG) $(COMBOSIX) $(IPFIX_TARGETS) $(ETHEREAL_TARGETS) $(ANONYMIZATION_TARGETS) $(TRACKING_TARGETS)
mapi.o: mapi.c mapi.h mapiipc.h mapidlib.h mapid.h mapidrv.h mapi_errors.h mapierror.h mapidflib.h parseconf.c $(ADMCTRL_BYTESTREAM_H)
$(CC) $(CFLAGS) $(KEYNOTE_CFLAGS) $(ADMCTRLCL_CFLAGS) -fPIC -c $<
......@@ -193,7 +198,8 @@ install: all
$(INSTALL) mapid $(INSTALL_BINDIR)
$(INSTALL) agent/agent $(INSTALL_BINDIR)
sh ./gen-mapi-conf -c $(WITH_COMBO6) -d $(WITH_DAG) -i $(WITH_IPFIX) \
-e $(WITH_ETHEREAL) -l $(INSTALL_LIBDIR) mapi.conf.in mapi.conf
-e $(WITH_ETHEREAL) -a $(WITH_ANONYMIZATION) -t $(WITH_TRACKING) \
-l $(INSTALL_LIBDIR) mapi.conf.in mapi.conf
$(INSTALL) mapi.conf /etc
./$(MKINSTALLDIRS) $(INSTALL_INCDIR)
$(INSTALL) mapi.h $(INSTALL_INCDIR)
......@@ -205,7 +211,6 @@ install: all
$(INSTALL) mapi.so $(INSTALL_LIBDIR)
$(INSTALL) mapinicdrv.so $(INSTALL_LIBDIR)
$(INSTALL) mapidstdflib.so $(INSTALL_LIBDIR)
$(INSTALL) tracklib.so $(INSTALL_LIBDIR)
ifeq ($(WITH_DAG),1)
$(INSTALL) dagflib.so $(INSTALL_LIBDIR)
$(INSTALL) mapidagdrv.so $(INSTALL_LIBDIR)
......@@ -222,5 +227,8 @@ ifeq ($(WITH_ETHEREAL),1)
endif
ifeq ($(WITH_ANONYMIZATION),1)
$(INSTALL) anonlib.so $(INSTALL_LIBDIR)
endif
ifeq ($(WITH_TRACKING),1)
$(INSTALL) tracklib.so $(INSTALL_LIBDIR)
endif
cd stdlib && make install
......@@ -32,6 +32,9 @@ WITH_MODIFY_PKTS=0
#Support for anonymization
WITH_ANONYMIZATION=0
#Support for application-level filtering (mostly P2P traffic identification)
WITH_TRACKING=0
#Ipfix flow record generation
WITH_IPFIX=0
......
......@@ -5,6 +5,8 @@ with_combo6=0
with_dag=0
with_ethereal=0
with_ipfix=0
with_anonymization=0
with_tracking=0
install_libdir=/usr/local/lib/mapi
infile=
outfile=
......@@ -16,25 +18,28 @@ etherflib=etherflib.so
ipfixlib=ipfixlib.so
anonlib=anonlib.so
tracklib=tracklib.so
libs=${mapidstdflib}:${anonlib}:${tracklib}:
libs=${mapidstdflib}:
ifcombo6="#"
ifdag="#"
usage()
{
cat <<EoF
Usage: gen-mapi-conf -d <WITH_DAG> -c <WITH_COMBO6> -i <WITH_IPFIX> \
-e <WITH_ETHEREAL> -l <INSTALL_LIBDIR> <MAPI.CONF.IN> <MAPI.CONF>
Usage: gen-mapi-conf -d <WITH_DAG> -c <WITH_COMBO6> -i <WITH_IPFIX>
-e <WITH_ETHEREAL> -a <WITH_ANONYMIZATION> -t <WITH_TRACKING>
-l <INSTALL_LIBDIR> <MAPI.CONF.IN> <MAPI.CONF>
EoF
exit 1
}
while getopts "c:d:e:i:l:" opt; do
while getopts "c:d:e:i:l:a:t:" opt; do
case $opt in
c ) with_combo6=$OPTARG ;;
d ) with_dag=$OPTARG ;;
e ) with_ethereal=$OPTARG ;;
i ) with_ipfix=$OPTARG ;;
a ) with_anonymization=$OPTARG ;;
t ) with_tracking=$OPTARG ;;
l ) install_libdir=$OPTARG ;;
\? ) usage ;;
esac
......@@ -77,6 +82,14 @@ if [ "$with_ipfix" = "1" ]
then
libs=${libs}${ipfixlib}:
fi
if [ "$with_anonymization" = "1" ]
then
libs=${libs}${anonlib}:
fi
if [ "$with_tracking" = "1" ]
then
libs=${libs}${tracklib}:
fi
libs=`echo $libs | sed s/:$//`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment