117 lines
4.4 KiB
Makefile
117 lines
4.4 KiB
Makefile
#
|
|
# Makefile for webalizer - a web server log analysis program
|
|
#
|
|
# Copyright (C) 1997-2013 Bradford L. Barrett
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version, and provided that the above
|
|
# copyright and permission notice is included with all distributed
|
|
# copies of this or derived software.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details (file "COPYING").
|
|
#
|
|
|
|
prefix = /usr/local/webalizer-2.23-08
|
|
exec_prefix = ${prefix}
|
|
datadir = ${prefix}/share
|
|
|
|
BINDIR = ${exec_prefix}/bin
|
|
MANDIR = ${datarootdir}/man/man1
|
|
ETCDIR = ${prefix}/etc
|
|
GEODB = /usr/share/GeoDB
|
|
CC = gcc
|
|
CFLAGS = -Wall -O2 -I/usr/include
|
|
LIBS = -lGeoIP -ldb -lgd -lpng -lz -lm
|
|
WCMGR_LIBS = -ldb
|
|
DEFS = -DETCDIR=\"${ETCDIR}\" -DGEODB_LOC=\"${GEODB}\" -DPACKAGE_NAME=\"webalizer\" -DPACKAGE_TARNAME=\"webalizer\" -DPACKAGE_VERSION=\"V2.23\" -DPACKAGE_STRING=\"webalizer\ V2.23\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GETOPT_H=1 -DHAVE_MATH_H=1 -DHAVE_SYS_SOCKET_H=1 -DUSE_GEOIP -DUSE_DNS
|
|
LDFLAGS = -L/usr/lib -s
|
|
INSTALL = /usr/bin/install -c
|
|
INSTALL_PROGRAM = ${INSTALL}
|
|
INSTALL_DATA = ${INSTALL} -m 644
|
|
DEFLANG = english
|
|
|
|
# Shouldn't have to touch below here!
|
|
|
|
all: webalizer wcmgr
|
|
|
|
webalizer: webalizer.o webalizer.h hashtab.o hashtab.h \
|
|
linklist.o linklist.h preserve.o preserve.h \
|
|
dns_resolv.o dns_resolv.h parser.o parser.h \
|
|
output.o output.h graphs.o graphs.h lang.h \
|
|
webalizer_lang.h
|
|
$(CC) ${LDFLAGS} -o webalizer webalizer.o hashtab.o linklist.o preserve.o parser.o output.o dns_resolv.o graphs.o ${LIBS}
|
|
rm -f webazolver
|
|
ln -s webalizer webazolver
|
|
|
|
webalizer.o: webalizer.c webalizer.h parser.h output.h preserve.h \
|
|
graphs.h dns_resolv.h webalizer_lang.h
|
|
$(CC) ${CFLAGS} ${DEFS} -c webalizer.c
|
|
|
|
parser.o: parser.c parser.h webalizer.h lang.h
|
|
$(CC) ${CFLAGS} ${DEFS} -c parser.c
|
|
|
|
hashtab.o: hashtab.c hashtab.h dns_resolv.h webalizer.h lang.h
|
|
$(CC) ${CFLAGS} ${DEFS} -c hashtab.c
|
|
|
|
linklist.o: linklist.c linklist.h webalizer.h lang.h
|
|
$(CC) ${CFLAGS} ${DEFS} -c linklist.c
|
|
|
|
output.o: output.c output.h webalizer.h preserve.h \
|
|
hashtab.h graphs.h lang.h
|
|
$(CC) ${CFLAGS} ${DEFS} -c output.c
|
|
|
|
preserve.o: preserve.c preserve.h webalizer.h parser.h \
|
|
hashtab.h graphs.h lang.h
|
|
$(CC) ${CFLAGS} ${DEFS} -c preserve.c
|
|
|
|
dns_resolv.o: dns_resolv.c dns_resolv.h lang.h webalizer.h
|
|
$(CC) ${CFLAGS} ${DEFS} -c dns_resolv.c
|
|
|
|
graphs.o: graphs.c graphs.h webalizer.h lang.h
|
|
$(CC) ${CFLAGS} ${DEFS} -c graphs.c
|
|
|
|
wcmgr: wcmgr.o
|
|
$(CC) ${LDFLAGS} -o wcmgr wcmgr.o ${WCMGR_LIBS}
|
|
|
|
wcmgr.o: wcmgr.c webalizer.h
|
|
$(CC) ${CFLAGS} ${DEFS} -c wcmgr.c
|
|
|
|
clean:
|
|
rm -f webalizer webazolver wcmgr *.o usage*.png daily*.png hourly*.png
|
|
rm -f ctry*.png *.html *.hist *.current core *.gif
|
|
|
|
distclean: clean
|
|
rm -f webalizer.conf *.tar *.tgz *.Z *.tar.gz
|
|
rm -f Makefile webalizer_lang.h config.cache config.log config.status
|
|
ln -s lang/webalizer_lang.english webalizer_lang.h
|
|
|
|
install: all
|
|
mkdir -p ${DESTDIR}${BINDIR}
|
|
mkdir -p ${DESTDIR}${MANDIR}
|
|
mkdir -p ${DESTDIR}${ETCDIR}
|
|
$(INSTALL_PROGRAM) webalizer ${DESTDIR}${BINDIR}/webalizer
|
|
$(INSTALL_PROGRAM) wcmgr ${DESTDIR}${BINDIR}/wcmgr
|
|
rm -f ${DESTDIR}${BINDIR}/webazolver
|
|
ln -s webalizer ${DESTDIR}${BINDIR}/webazolver
|
|
$(INSTALL_DATA) webalizer.1 ${DESTDIR}${MANDIR}/webalizer.1
|
|
$(INSTALL_DATA) wcmgr.1 ${DESTDIR}${MANDIR}/wcmgr.1
|
|
rm -f ${DESTDIR}${MANDIR}/webazolver.1
|
|
ln -s webalizer.1 ${DESTDIR}${MANDIR}/webazolver.1
|
|
$(INSTALL_DATA) sample.conf ${DESTDIR}${ETCDIR}/webalizer.conf.sample
|
|
|
|
uninstall:
|
|
rm -f ${DESTDIR}${BINDIR}/webalizer
|
|
rm -f ${DESTDIR}${BINDIR}/webazolver
|
|
rm -f ${DESTDIR}${BINDIR}/wcmgr
|
|
rm -f ${DESTDIR}${MANDIR}/webalizer.1
|
|
rm -f ${DESTDIR}${MANDIR}/webazolver.1
|
|
rm -f ${DESTDIR}${MANDIR}/wcmgr.1
|
|
rm -f ${DESTDIR}${ETCDIR}/webalizer.conf.sample
|
|
rm -f webalizer_lang.h
|
|
ln -s lang/webalizer_lang.${DEFLANG} webalizer_lang.h
|