1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
VERSION=0.34
# Install directories
#SBINDIR=/usr/sbin
#MANDIR=/usr/share/man
OPT_FLAGS=$(RPM_OPT_FLAGS)
WARNFLAGS=-Wall -Wno-conversion -Waggregate-return -Wmissing-prototypes -Wstrict-prototypes
DEBUGFLAGS=-g #-DDEBUG
INCLUDES=-I/usr/include/pcap $(shell glib-config --cflags) #-I/usr/lib/glib/include/
DEFINES= -DHAVE_GETOPT_LONG
CFLAGS+= -DVERSION="\"$(VERSION)"\" $(DEFINES) $(WARNFLAGS) $(DEBUGFLAGS) $(INCLUDES) $(OPT_FLAGS)
LFLAGS=
GLIB=$(shell glib-config --libs) #-lglib
#GLIB=/usr/lib/libglib.a
#DEBUGLIBS=-lefence
OBJS=util.o report.o read-report.o sort-report.o write-report.o limit-report.o
SUBDIRS=collector sort frontends utils
TARGETS=libreport.a
AR=ar
RANLIB=ranlib
all: $(TARGETS)
for x in $(SUBDIRS) ; \
do \
make -C $$x \
VERSION="$(VERSION)" OPT_FLAGS="$(OPT_FLAGS)" \
WARNFLAGS="$(WARNFLAGS)" INCLUDES="$(INCLUDES)" \
DEFINES="$(DEFINES)" GLIB="$(GLIB)" \
DEBUGLIBS="$(DEBUGLIBS)" || exit 1; \
done
libreport.a: $(OBJS)
$(AR) rv $@ $(OBJS)
install:
for x in $(SUBDIRS) ; \
do \
make -C $$x SBINDIR="$(SBINDIR)" MANDIR="$(MANDIR)" install || exit 1; \
done
install -m 644 -o root -g root traffic-vis.8 $(MANDIR)/man8/
clean:
rm -f *.o core ~* *.a *.ps *.txt *.html test test.o *.tv
for x in $(SUBDIRS) ; \
do \
(cd $$x && make clean && cd ..) ; \
done
|