]> git.ipfire.org Git - thirdparty/sarg.git/blame - Makefile.in
Read compressed useragent logs
[thirdparty/sarg.git] / Makefile.in
CommitLineData
25697a35
GS
1# Makefile.in for sarg
2
2357ef77
FM
3prefix=@prefix@
4datarootdir=@datarootdir@
5datadir=@datadir@
6exec_prefix=@exec_prefix@
7PACKAGE_TARNAME=@PACKAGE_TARNAME@
c0ec9cc7
FM
8docdir = @docdir@
9CC = @CC@
4b7d4cb0
FM
10bindir = @bindir@
11mandir = @mandir@
12man1dir = $(mandir)/man1
13sysconfdir = @sysconfdir@
c0ec9cc7 14SARGPHPDIR = @SARGPHPDIR@
c0ec9cc7
FM
15FONTDIR = @FONTDIR@
16IMAGEDIR = @IMAGEDIR@
c0ec9cc7
FM
17IBINDIR = -DBINDIR=\"@bindir@\"
18ISYSCONFDIR = -DSYSCONFDIR=\"@sysconfdir@\"
19ISARGPHPDIR = -DSARGPHPDIR=\"@SARGPHPDIR@\"
c0ec9cc7
FM
20IFONTDIR = -DFONTDIR=\"@FONTDIR@\"
21IIMAGEDIR = -DIMAGEDIR=\"@IMAGEDIR@\"
d49c75f3 22ILOCALEDIR = -DLOCALEDIR=\"@localedir@\"
c0ec9cc7
FM
23CFLAGS = @CFLAGS@
24CPPFLAGS = @CPPFLAGS@
25LDFLAGS = @LDFLAGS@
308a21d4 26DEFS = $(IBINDIR) $(ISYSCONFDIR) $(IFONTDIR) $(IIMAGEDIR) $(ISARGPHPDIR) $(ILOCALEDIR) @DEFS@
38b11656 27LIBS = @LIBS@ @LIBINTL@ -lm
c0ec9cc7
FM
28SRCDIR = .
29VPATH = .
30INSTALL = cp
a640023b
FM
31XSL_MAN_STYLESHEET=@XSL_MAN_STYLESHEET@
32XSL_HTML_STYLESHEET=@XSL_HTML_STYLESHEET@
142d788e 33EXEEXT = @EXEEXT@
25697a35
GS
34
35INSTALL_PROGRAM = $(INSTALL)
36
37SRCS = util.c log.c report.c topuser.c email.c sort.c html.c \
c4f0ea8f
FM
38 index.c getconf.c usage.c decomp.c ip2name.c ip2name_dns.c \
39 useragent.c exclude.c convlog.c totday.c repday.c datafile.c\
40 indexonly.c splitlog.c lastlog.c topsites.c siteuser.c css.c \
26810f86 41 smartfilter.c denied.c authfail.c dichotomic.c \
c4f0ea8f
FM
42 redirector.c auth.c download.c grepday.c ip2name_exec.c \
43 dansguardian_log.c dansguardian_report.c realtime.c btree_cache.c \
44 usertab.c userinfo.c longline.c url.c fnmatch.c stringbuffer.c \
800eafb8 45 filelist.c readlog.c alias.c fileobject.c \
c4f0ea8f 46 readlog_squid.c readlog_sarg.c readlog_extlog.c readlog_common.c
f2ec8c75 47
e62783ed
FM
48all: sarg
49
4395f9c9
FM
50*.o: include/conf.h include/info.h include/defs.h
51
c4f0ea8f 52alias.o: include/alias.h include/stringbuffer.h
4395f9c9
FM
53authfail.o: include/readlog.h
54denied.o: include/readlog.h
55download.o: include/readlog.h
56filelist.o: include/stringbuffer.h
57log.o: include/readlog.h
58readlog.o: include/readlog.h
59readlog_common.o: include/readlog.h
60readlog_extlog.o: include/readlog.h
61readlog_sarg.o: include/readlog.h
62readlog_squid.o: include/readlog.h
63stringbuffer.o: include/stringbuffer.h
c4f0ea8f 64userinfo.o: include/stringbuffer.h include/alias.h
800eafb8 65fileobject.o: include/fileobject.h
4395f9c9 66
8028a059 67OBJS = $(SRCS:.c=.o)
25697a35 68
3becf85c
FM
69DISTFILES = $(SRCS) ABOUT-NLS
70
71SUBDIRS = po
84a17075 72.PHONY: all install clean uninstall mostlyclean distclean update-po doc $(SUBDIRS)
25697a35 73
25697a35 74.c.o:
c0ec9cc7 75 $(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
25697a35
GS
76
77sarg: $(OBJS)
1b42c442 78 $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) $(LIBCRYPT)
25697a35 79
3becf85c
FM
80$(SUBDIRS):
81 $(MAKE) -C $@
82
84a17075
FM
83doc: sarg.1 sarg_manpage.html
84
85sarg.1: sarg_manpage.xml
86 echo "Making manual page"
87 xmllint --nonet --valid --noout $<
a640023b 88 xsltproc --stringparam man.output.encoding latin1 --nonet "$(XSL_MAN_STYLESHEET)" $<
84a17075
FM
89# docbook2man.pl $<
90
91sarg_manpage.html: sarg_manpage.xml
92 echo "Making html manual page"
93 xmllint --nonet --valid --noout $<
a640023b 94 xsltproc --stringparam use.id.as.filename 1 --stringparam root.filename sarg_manpage --nonet "$(XSL_HTML_STYLESHEET)" $<
84a17075 95
308a21d4 96install: all install-po
4b7d4cb0
FM
97 -@if test ! -d $(DESTDIR)$(bindir); then \
98 echo "creating $(DESTDIR)$(bindir)"; \
99 mkdir -p $(DESTDIR)$(bindir); \
25697a35 100 fi
4b7d4cb0
FM
101 -@if test ! -d $(DESTDIR)$(man1dir); then \
102 echo "creating $(DESTDIR)$(man1dir)"; \
103 mkdir -p $(DESTDIR)$(man1dir); \
25697a35 104 fi
4b7d4cb0
FM
105 -@if test ! -d $(DESTDIR)$(sysconfdir); then \
106 echo "creating $(DESTDIR)$(sysconfdir)"; \
107 mkdir -p $(DESTDIR)$(sysconfdir); \
25697a35 108 fi
f251e023
FM
109 -@if test ! -d $(DESTDIR)$(IMAGEDIR); then \
110 echo "Creating $(DESTDIR)$(IMAGEDIR)"; \
111 mkdir -p $(DESTDIR)$(IMAGEDIR); \
25697a35 112 fi
142d788e
FM
113 $(INSTALL_PROGRAM) sarg$(EXEEXT) $(DESTDIR)$(bindir)/sarg$(EXEEXT);
114 chmod 755 $(DESTDIR)$(bindir)/sarg$(EXEEXT);
4b7d4cb0
FM
115 $(INSTALL_PROGRAM) sarg.1 $(DESTDIR)$(man1dir)/sarg.1
116 chmod 755 $(DESTDIR)$(man1dir)/sarg.1
117 @if test ! -f $(DESTDIR)$(sysconfdir)/sarg.conf; then \
118 echo "cp $(DESTDIR)$(sysconfdir)/sarg.conf"; \
119 cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf; \
25697a35 120 else \
4b7d4cb0 121 cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf.default; \
25697a35 122 fi
4b7d4cb0
FM
123 cp ./exclude_codes $(DESTDIR)$(sysconfdir);
124 cp ./user_limit_block $(DESTDIR)$(sysconfdir);
f251e023 125 cp -r ./images/* $(DESTDIR)$(IMAGEDIR);
3becf85c
FM
126 -@if test -n "$(FONTDIR)" ; then \
127 if test ! -d "$(DESTDIR)$(FONTDIR)" ; then \
128 echo "Creating $(DESTDIR)$(FONTDIR)"; \
129 mkdir -p "$(DESTDIR)$(FONTDIR)"; \
130 fi; \
131 cp -r ./fonts/* "$(DESTDIR)$(FONTDIR)"; \
132 fi
4b7d4cb0 133 cp -r ./css.tpl $(DESTDIR)$(sysconfdir);
7bbc1de4 134 -@if test -n "$(SARGPHPDIR)" -a -d "$(DESTDIR)$(SARGPHPDIR)"; then \
3becf85c 135 cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
25697a35
GS
136 fi
137
308a21d4 138uninstall: uninstall-po
4b7d4cb0
FM
139 rm -f $(DESTDIR)$(bindir)/sarg
140 rm -f $(DESTDIR)$(man1dir)/sarg.1
25697a35
GS
141
142TAGS: $(SRCS)
143 etags $(SRCS)
144
308a21d4 145clean: clean-po
25697a35
GS
146 rm -f sarg *.o core
147
148mostlyclean: clean
149
150distclean: clean
151 rm -f Makefile config.status config.cache config.log
152
153realclean: distclean
154 rm -f TAGS
155
308a21d4
FM
156install-po:
157 $(MAKE) -C po install
158
159uninstall-po:
160 $(MAKE) -C po uninstall
161
162clean-po:
163 $(MAKE) -C po clean
164
f2ec8c75
FM
165update-po:
166 $(MAKE) -C po update-po
cea51ad6
FM
167
168po-from-tp:
169 @echo "Fetching latest po files from translationprojetc.org"
170 rsync -Lrtvz -u translationproject.org::tp/latest/sarg/ po