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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
#
# Makefile for http-analyze
#
# the shell to use for executing commands by make
SHELL = /bin/sh
PREFIX = /usr
# LOCALBIN is the directory where the executable is installed.
# LOCALMAN defines the directory for the (pre-formatted) manpage.
LOCALBIN = $(PREFIX)/bin
LOCALMAN = $(PREFIX)/man/man1
# Which program to use for compressing the manpage
# (pack is the System V standard)
COMPRESS = gzip
#COMPRESS = compress
# where your gd library and include files reside
GDLIB = /usr/lib/libgd.so.1
GDINC = /usr/local/include/gd
# Customization
#
# NS_FASTTRACK
# If defined, http-analyze skips the first line in
# the logfile, which is used by Netscape's new server
# generation (i.e. Fasttrack and Enterprise servers)
# to determine the format which should be used for
# those logfile entries. Note that http-analyze does
# not recognize other log formats than the common
# logfile format (CLF), so don't change the this!
#
# COUNT_EXTRA_BYTES
# If defined, accounts for the protocol overhead,
# which already may or may not be accounted for
# by the HTTP daemon.
#
# USER_AGENT
# If defined, includes code for generating statistics
# about the user agents (not excessively tested).
#
# USE_GETHOSTNAME
# If defined, use gethostname(2) to determine the
# server's full qualified domain name, otherwise
# use uname(2) to determine the hostname (which
# may not be fully qualified).
#
# USE_FGETS
# If defined, use fgets(3) to read log entries
# rather than the built-in function which has
# been highly optimized for speed.
#
# BEST_IO_SIZE=#
# Set this to the recommended buffer size for I/O when
# using the built-in function to process the logfile
# (i.e. if USE_FGETS hasn't been defined). On SGI Indys
# running IRIX 5.3, the best I/O size seems to be 64KB.
# This is the default if BEST_IO_SIZE is left undefined.
#
# TIME_STATS
# Activates code for performance measurement.
#
#DEFINES = -DCOUNT_EXTRA_BYTES -DUSER_AGENT -DUSE_GETHOSTNAME -DUSE_FGETS
DEFINES = -DUSE_GETHOSTNAME
VERSION = -DVERSION=\"1.9e\"
OBJ = http-analyze.o images.o cntrycode.o utils.o
SRC = http-analyze.c images.c cntrycode.c utils.c
TARGETS = http-analyze http-analyze.1
# Compiler flags
CC = gcc
#CFLAGS = -O -xansi -fullwarn -wlint,-pui -woff 827,828 $(DEFINES) $(VERSION)
#CFLAGS = -O $(DEFINES) $(VERSION) -DTIME_STATS
CFLAGS = -O $(DEFINES) $(VERSION)
LDFLAGS =
LINT = lint -u
LIBS = -lm
NROFF = nroff
NRFLAGS = -u1 -man
all: $(TARGETS)
http-analyze: $(OBJ)
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(GDLIB) $(LIBS)
http-analyze.o: http-analyze.c
$(CC) $(CFLAGS) -c -I$(GDINC) http-analyze.c
images.o: images.c
$(CC) $(CFLAGS) -c -I$(GDINC) images.c
lint.out: $(SRC) defs.h cntrycode.h
$(LINT) $(CFLAGS) -I$(GDINC) $(SRC) >$@
http-analyze.1: http-analyze.man
$(NROFF) $(NRFLAGS) http-analyze.man | col >$@
http-analyze.o: defs.h cntrycode.h
images.o: defs.h
utils.o: defs.h
cntrycode.o: defs.h cntrycode.h
install: $(TARGETS)
cp http-analyze $(LOCALBIN)/
cp http-analyze.man $(LOCALMAN)/http-analyze.1
chmod 755 $(LOCALBIN)/http-analyze
chmod 444 $(LOCALMAN)/http-analyze.1
chown bin.bin $(LOCALBIN)/http-analyze \
$(LOCALMAN)/http-analyze.1
-rm $(LOCALMAN)/http-analyze.1.gz
clean:
-rm -f $(OBJ) lint.out
realclean: clean
-rm -f core http-analyze http-analyze.1
clobber:: realclean
-rm -f index.html stats*.html stats*.hist sites*.html files*.html *.gif
|