4 datarootdir
=@datarootdir@
6 exec_prefix=@
exec_prefix@
7 localedir
= $(datadir)/locale
8 PACKAGE_TARNAME
=@PACKAGE_TARNAME@
13 SYSCONFDIR
= @sysconfdir@
14 SARGPHPDIR
= @SARGPHPDIR@
17 IBINDIR
= -DBINDIR
=\"@
bindir@
\"
18 ISYSCONFDIR
= -DSYSCONFDIR
=\"@sysconfdir@
\"
19 ISARGPHPDIR
= -DSARGPHPDIR
=\"@SARGPHPDIR@
\"
20 IFONTDIR
= -DFONTDIR
=\"@FONTDIR@
\"
21 IIMAGEDIR
= -DIMAGEDIR
=\"@IMAGEDIR@
\"
22 ILOCALEDIR
= -DLOCALEDIR
=\"$(localedir
)\"
26 DEFS
= $(IBINDIR
) $(ISYSCONFDIR
) $(IFONTDIR
) $(IIMAGEDIR
) $(ISARGPHPDIR
) $(ILOCALEDIR
) @DEFS@
32 INSTALL_PROGRAM
= $(INSTALL
)
34 SRCS
= util.c log.c report.c topuser.c email.c
sort.c html.c \
35 totger.c index.c getconf.c usage.c decomp.c ip2name.c \
36 useragent.c exclude.c convlog.c totday.c repday.c datafile.c\
37 indexonly.c splitlog.c lastlog.c topsites.c siteuser.c css.c \
38 smartfilter.c denied.c authfail.c charset.c \
39 squidguard_log.c squidguard_report.c auth.c download.c grepday.c \
40 dansguardian_log.c dansguardian_report.c realtime.c btree_cache.c \
41 usertab.c userinfo.c longline.c
43 OBJS
= $(patsubst %.c
,%.o
,$(SRCS
))
45 DISTFILES
= $(SRCS
) ABOUT-NLS
48 .PHONY
: all install clean uninstall mostlyclean distclean update-po
$(SUBDIRS
)
53 $(CC
) -c
-I.
$(CPPFLAGS
) $(DEFS
) $(CFLAGS
) $<
55 *.o
: include/conf.h
include/info.h
include/defs.h
58 $(CC
) $(LDFLAGS
) $(OBJS
) -o
$@
$(LIBS
) $(LIBCRYPT
)
63 install: all install-po
64 -@if
test ! -d
$(DESTDIR
)$(BINDIR
); then \
65 echo
"creating $(DESTDIR)$(BINDIR)"; \
66 mkdir
-p
$(DESTDIR
)$(BINDIR
); \
68 -@if
test ! -d
$(DESTDIR
)$(MANDIR
); then \
69 echo
"creating $(DESTDIR)$(MANDIR)"; \
70 mkdir
-p
$(DESTDIR
)$(MANDIR
); \
72 -@if
test ! -d
$(DESTDIR
)$(SYSCONFDIR
); then \
73 echo
"creating $(DESTDIR)$(SYSCONFDIR)"; \
74 mkdir
-p
$(DESTDIR
)$(SYSCONFDIR
); \
76 -@if
test ! -d
$(DESTDIR
)$(IMAGEDIR
); then \
77 echo
"Creating $(DESTDIR)$(IMAGEDIR)"; \
78 mkdir
-p
$(DESTDIR
)$(IMAGEDIR
); \
80 $(INSTALL_PROGRAM
) sarg
$(DESTDIR
)$(BINDIR
)/sarg
81 chmod
755 $(DESTDIR
)$(BINDIR
)/sarg
82 $(INSTALL_PROGRAM
) sarg
.1 $(DESTDIR
)$(MANDIR
)/sarg
.1
83 chmod
755 $(DESTDIR
)$(MANDIR
)/sarg
.1
84 @if
test ! -f
$(DESTDIR
)$(SYSCONFDIR
)/sarg.conf
; then \
85 echo
"cp $(DESTDIR)$(SYSCONFDIR)/sarg.conf"; \
86 cp sarg.conf
$(DESTDIR
)$(SYSCONFDIR
)/sarg.conf
; \
88 cp sarg.conf
$(DESTDIR
)$(SYSCONFDIR
)/sarg.conf.default
; \
90 cp .
/exclude_codes
$(DESTDIR
)$(SYSCONFDIR
);
91 cp .
/user_limit_block
$(DESTDIR
)$(SYSCONFDIR
);
92 cp
-r .
/images
/* $(DESTDIR
)$(IMAGEDIR
);
93 -@if
test -n
"$(FONTDIR)" ; then \
94 if
test ! -d
"$(DESTDIR)$(FONTDIR)" ; then \
95 echo
"Creating $(DESTDIR)$(FONTDIR)"; \
96 mkdir
-p
"$(DESTDIR)$(FONTDIR)"; \
98 cp
-r .
/fonts
/* "$(DESTDIR)$(FONTDIR)"; \
100 cp
-r .
/css.tpl
$(DESTDIR
)$(SYSCONFDIR
);
101 -@if
test -n
"$(SARGPHPDIR)" -a
-d
"$(DESTDIR)$(SARGPHPDIR)"; then \
102 cp
-r .
/sarg-php
$(DESTDIR
)$(SARGPHPDIR
); \
105 uninstall: uninstall-po
106 rm -f
$(DESTDIR
)$(BINDIR
)/sarg
107 rm -f
$(DESTDIR
)$(MANDIR
)/sarg
.1
118 rm -f Makefile config.status config.cache config.log
124 $(MAKE
) -C po
install
127 $(MAKE
) -C po
uninstall
133 $(MAKE
) -C po update-po
136 @echo
"Fetching latest po files from translationprojetc.org"
137 rsync
-Lrtvz
-u translationproject.org
::tp
/latest
/sarg
/ po