]> git.ipfire.org Git - thirdparty/sarg.git/blob - Makefile.in
Install sarg.exe on Windows
[thirdparty/sarg.git] / Makefile.in
1 # Makefile.in for sarg
2
3 prefix=@prefix@
4 datarootdir=@datarootdir@
5 datadir=@datadir@
6 exec_prefix=@exec_prefix@
7 PACKAGE_TARNAME=@PACKAGE_TARNAME@
8 docdir = @docdir@
9 CC = @CC@
10 bindir = @bindir@
11 mandir = @mandir@
12 man1dir = $(mandir)/man1
13 sysconfdir = @sysconfdir@
14 SARGPHPDIR = @SARGPHPDIR@
15 FONTDIR = @FONTDIR@
16 IMAGEDIR = @IMAGEDIR@
17 IBINDIR = -DBINDIR=\"@bindir@\"
18 ISYSCONFDIR = -DSYSCONFDIR=\"@sysconfdir@\"
19 ISARGPHPDIR = -DSARGPHPDIR=\"@SARGPHPDIR@\"
20 IFONTDIR = -DFONTDIR=\"@FONTDIR@\"
21 IIMAGEDIR = -DIMAGEDIR=\"@IMAGEDIR@\"
22 ILOCALEDIR = -DLOCALEDIR=\"@localedir@\"
23 CFLAGS = @CFLAGS@
24 CPPFLAGS = @CPPFLAGS@
25 LDFLAGS = @LDFLAGS@
26 DEFS = $(IBINDIR) $(ISYSCONFDIR) $(IFONTDIR) $(IIMAGEDIR) $(ISARGPHPDIR) $(ILOCALEDIR) @DEFS@
27 LIBS = @LIBS@ @LIBINTL@ -lm
28 SRCDIR = .
29 VPATH = .
30 INSTALL = cp
31 XSL_MAN_STYLESHEET=@XSL_MAN_STYLESHEET@
32 XSL_HTML_STYLESHEET=@XSL_HTML_STYLESHEET@
33 EXEEXT = @EXEEXT@
34
35 INSTALL_PROGRAM = $(INSTALL)
36
37 SRCS = util.c log.c report.c topuser.c email.c sort.c html.c \
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 \
41 smartfilter.c denied.c authfail.c charset.c dichotomic.c \
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 \
45 filelist.c readlog.c \
46 readlog_squid.c readlog_sarg.c readlog_extlog.c readlog_common.c
47
48 OBJS = $(SRCS:.c=.o)
49
50 DISTFILES = $(SRCS) ABOUT-NLS
51
52 SUBDIRS = po
53 .PHONY: all install clean uninstall mostlyclean distclean update-po doc $(SUBDIRS)
54
55 all: sarg
56
57 .c.o:
58 $(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
59
60 *.o: include/conf.h include/info.h include/defs.h
61
62 sarg: $(OBJS)
63 $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) $(LIBCRYPT)
64
65 $(SUBDIRS):
66 $(MAKE) -C $@
67
68 doc: sarg.1 sarg_manpage.html
69
70 sarg.1: sarg_manpage.xml
71 echo "Making manual page"
72 xmllint --nonet --valid --noout $<
73 xsltproc --stringparam man.output.encoding latin1 --nonet "$(XSL_MAN_STYLESHEET)" $<
74 # docbook2man.pl $<
75
76 sarg_manpage.html: sarg_manpage.xml
77 echo "Making html manual page"
78 xmllint --nonet --valid --noout $<
79 xsltproc --stringparam use.id.as.filename 1 --stringparam root.filename sarg_manpage --nonet "$(XSL_HTML_STYLESHEET)" $<
80
81 install: all install-po
82 -@if test ! -d $(DESTDIR)$(bindir); then \
83 echo "creating $(DESTDIR)$(bindir)"; \
84 mkdir -p $(DESTDIR)$(bindir); \
85 fi
86 -@if test ! -d $(DESTDIR)$(man1dir); then \
87 echo "creating $(DESTDIR)$(man1dir)"; \
88 mkdir -p $(DESTDIR)$(man1dir); \
89 fi
90 -@if test ! -d $(DESTDIR)$(sysconfdir); then \
91 echo "creating $(DESTDIR)$(sysconfdir)"; \
92 mkdir -p $(DESTDIR)$(sysconfdir); \
93 fi
94 -@if test ! -d $(DESTDIR)$(IMAGEDIR); then \
95 echo "Creating $(DESTDIR)$(IMAGEDIR)"; \
96 mkdir -p $(DESTDIR)$(IMAGEDIR); \
97 fi
98 $(INSTALL_PROGRAM) sarg$(EXEEXT) $(DESTDIR)$(bindir)/sarg$(EXEEXT);
99 chmod 755 $(DESTDIR)$(bindir)/sarg$(EXEEXT);
100 $(INSTALL_PROGRAM) sarg.1 $(DESTDIR)$(man1dir)/sarg.1
101 chmod 755 $(DESTDIR)$(man1dir)/sarg.1
102 @if test ! -f $(DESTDIR)$(sysconfdir)/sarg.conf; then \
103 echo "cp $(DESTDIR)$(sysconfdir)/sarg.conf"; \
104 cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf; \
105 else \
106 cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf.default; \
107 fi
108 cp ./exclude_codes $(DESTDIR)$(sysconfdir);
109 cp ./user_limit_block $(DESTDIR)$(sysconfdir);
110 cp -r ./images/* $(DESTDIR)$(IMAGEDIR);
111 -@if test -n "$(FONTDIR)" ; then \
112 if test ! -d "$(DESTDIR)$(FONTDIR)" ; then \
113 echo "Creating $(DESTDIR)$(FONTDIR)"; \
114 mkdir -p "$(DESTDIR)$(FONTDIR)"; \
115 fi; \
116 cp -r ./fonts/* "$(DESTDIR)$(FONTDIR)"; \
117 fi
118 cp -r ./css.tpl $(DESTDIR)$(sysconfdir);
119 -@if test -n "$(SARGPHPDIR)" -a -d "$(DESTDIR)$(SARGPHPDIR)"; then \
120 cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
121 fi
122
123 uninstall: uninstall-po
124 rm -f $(DESTDIR)$(bindir)/sarg
125 rm -f $(DESTDIR)$(man1dir)/sarg.1
126
127 TAGS: $(SRCS)
128 etags $(SRCS)
129
130 clean: clean-po
131 rm -f sarg *.o core
132
133 mostlyclean: clean
134
135 distclean: clean
136 rm -f Makefile config.status config.cache config.log
137
138 realclean: distclean
139 rm -f TAGS
140
141 install-po:
142 $(MAKE) -C po install
143
144 uninstall-po:
145 $(MAKE) -C po uninstall
146
147 clean-po:
148 $(MAKE) -C po clean
149
150 update-po:
151 $(MAKE) -C po update-po
152
153 po-from-tp:
154 @echo "Fetching latest po files from translationprojetc.org"
155 rsync -Lrtvz -u translationproject.org::tp/latest/sarg/ po