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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
#
# Makefile for webdruid - a web server log analysis program
#
# Copyright (C) 2003-2004 Fabien Chevalier (fabien@juliana-multimedia.com)
# Copyright (C) 1997-2000 Bradford L. Barrett (brad@mrunix.net)
#
# 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 = @prefix@
exec_prefix = @exec_prefix@
BINDIR = @bindir@
WEBDRUIDDATADIR= @datadir@/webdruid/
MANDIR = @mandir@/man1
EXEEXT = @EXEEXT@
SYSCONFDIR = @sysconfdir@
LOCALEDIR = @localedir@
DOTLOCATION = @dotlocation@
CC = @CC@
CFLAGS = @CFLAGS@
LIBS = @LIBS@
DEFS = -DLOCALEDIR=\"@localedir@\" -DWEBDRUIDDATADIR=\"@datadir@/webdruid/\" -DSYSCONFDIR=\"@sysconfdir@\" @DEFS@ @OPTS@
LDFLAGS= @LDFLAGS@
INSTALL= @INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
LANGS=$(shell for a in po/*.po; do basename $${a%.po}; done)
# where are the GD header files?
GDLIB=@GDLIB@
# Shouldn't have to touch below here!
all: webdruid${EXEEXT} po
webdruid${EXEEXT}: webdruid.o webdruid.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 \
dot_output.o xml_output.o dot_output.h utils.o utils.h \
sengine.o sengine.h \
logs_mgmt.o logs_mgmt.h \
$(LANGS:%=po/%.mo)
$(CC) ${LDFLAGS} -o webdruid${EXEEXT} webdruid.o hashtab.o linklist.o preserve.o parser.o output.o xml_output.o dot_output.o utils.o dns_resolv.o graphs.o sengine.o logs_mgmt.o ${LIBS}
rm -f webdruid-resolve${EXEEXT}
@LN_S@ webdruid${EXEEXT} webdruid-resolve${EXEEXT}
webdruid.o: webdruid.c webdruid.h output.h preserve.h\
graphs.h dns_resolv.h utils.h sengine.h logs_mgmt.h
$(CC) ${CFLAGS} ${DEFS} -c webdruid.c
parser.o: parser.c parser.h webdruid.h lang.h
$(CC) ${CFLAGS} ${DEFS} -c parser.c
logs_mgmt.o: logs_mgmt.c webdruid.h lang.h parser.h logs_mgmt.h
$(CC) ${CFLAGS} ${DEFS} -c logs_mgmt.c
hashtab.o: hashtab.c hashtab.h dns_resolv.h webdruid.h lang.h sengine.h utils.h
$(CC) ${CFLAGS} ${DEFS} -c hashtab.c
linklist.o: linklist.c linklist.h webdruid.h lang.h
$(CC) ${CFLAGS} ${DEFS} -c linklist.c
output.o: output.c output.h webdruid.h preserve.h \
hashtab.h graphs.h lang.h dot_output.h utils.h sengine.h
$(CC) ${CFLAGS} ${DEFS} -c output.c
xml_output.o: xml_output.c xml_output.h webdruid.h preserve.h \
hashtab.h graphs.h lang.h dot_output.h utils.h sengine.h
$(CC) ${CFLAGS} ${DEFS} -c xml_output.c
preserve.o: preserve.c preserve.h webdruid.h parser.h \
hashtab.h graphs.h lang.h utils.h sengine.h
$(CC) ${CFLAGS} ${DEFS} -c preserve.c
dns_resolv.o: dns_resolv.c dns_resolv.h lang.h webdruid.h
$(CC) ${CFLAGS} ${DEFS} -c dns_resolv.c
graphs.o: graphs.c graphs.h webdruid.h lang.h utils.h
$(CC) ${CFLAGS} ${DEFS} -I${GDLIB} -c graphs.c
dot_output.o: dot_output.c dot_output.h linklist.h hashtab.h \
utils.h
$(CC) ${CFLAGS} ${DEFS} -c dot_output.c
utils.o: utils.c utils.h webdruid.h lang.h
$(CC) ${CFLAGS} ${DEFS} -c utils.c
sengine.o: sengine.c sengine.h lang.h webdruid.h utils.h linklist.h hashtab.h
$(CC) ${CFLAGS} ${DEFS} -c sengine.c
$(LANGS:%=po/%.mo): %.mo: %.po
msgfmt $< -o $@
clean:
rm -f webdruid webdruid-resolve webdruid.exe* webdruid-resolve.exe* webdruid.pot *.o usage*.png daily*.png hourly*.png
rm -f ctry*.png *.html *.hist *.current core *.gif *.dot *.cmap
distclean: clean
rm -f webdruid.conf *.tar *.tgz *.Z *.tar.gz *~ ~*
rm -f Makefile webdruid_lang.h config.h config.cache *.log config.status
rm -f config.cache config.log config.status $(LANGS:%=po/%.mo)
rm -fR autom4te.cache
rm -f po/*~
install: webdruid
$(INSTALL_PROGRAM) webdruid${EXEEXT} ${DESTDIR}/${BINDIR}/webdruid${EXEEXT}
$(INSTALL_DATA) webdruid.1 ${DESTDIR}/${MANDIR}/webdruid.1
test -d ${WEBDRUIDDATADIR} || mkdir -p ${WEBDRUIDDATADIR}
$(INSTALL_DATA) engines.list ${WEBDRUIDDATADIR}/engines.list
test -d ${SYSCONFDIR}/webdruid || mkdir -p ${SYSCONFDIR}/webdruid
$(INSTALL_DATA) sample.conf ${SYSCONFDIR}/webdruid/webdruid.conf
$(INSTALL_DATA) engines.list.local ${SYSCONFDIR}/webdruid/engines.list.local
$(INSTALL_DATA) skins/classic/skin-classic.xml.conf ${SYSCONFDIR}/webdruid
test -d ${WEBDRUIDDATADIR}/classic || mkdir ${WEBDRUIDDATADIR}/classic
$(INSTALL_PROGRAM) skins/classic/apply_skin.sh ${WEBDRUIDDATADIR}/classic
$(INSTALL_DATA) skins/classic/bullet.png ${WEBDRUIDDATADIR}/classic
$(INSTALL_DATA) skins/classic/bullet2.png ${WEBDRUIDDATADIR}/classic
$(INSTALL_DATA) skins/classic/left_arrow.png ${WEBDRUIDDATADIR}/classic
$(INSTALL_DATA) skins/classic/right_arrow.png ${WEBDRUIDDATADIR}/classic
$(INSTALL_DATA) skins/classic/separator.png ${WEBDRUIDDATADIR}/classic
$(INSTALL_DATA) skins/classic/classic.css ${WEBDRUIDDATADIR}/classic
$(INSTALL_DATA) skins/classic/classic.xsl ${WEBDRUIDDATADIR}/classic
$(INSTALL_DATA) skins/classic/shared.xsl ${WEBDRUIDDATADIR}/classic
for a in $(LANGS); do mkdir -p ${DESTDIR}/$(LOCALEDIR)/$$a/LC_MESSAGES; $(INSTALL_DATA) po/$$a.mo ${DESTDIR}/$(LOCALEDIR)/$$a/LC_MESSAGES/webdruid.mo; done
rm -f ${DESTDIR}/${BINDIR}/webdruid-resolve
(cd ${DESTDIR}/${BINDIR}; @LN_S@ webdruid${EXEEXT} webdruid-resolve)
uninstall:
rm -f ${BINDIR}/webdruid${EXEEXT}
rm -f ${BINDIR}/webdruid-resolve${EXEEXT}
rm -f ${MANDIR}/webdruid.1
rm -fR ${SYSCONFDIR}/webdruid
rm -fR ${WEBDRUIDDATADIR}
for a in $(LANGS); do rm -f $(LOCALEDIR)/$$a/LC_MESSAGES/webdruid.mo; done
#this is to update po files
po: *.c lang_strings.h
xgettext --keyword='_:1' -c *.c lang_strings.h -o webdruid.pot
|