datarootdir=@datarootdir@
datadir=@datadir@
exec_prefix=@exec_prefix@
+localedir = $(datadir)/locale
PACKAGE_TARNAME=@PACKAGE_TARNAME@
docdir = @docdir@
CC = @CC@
MANDIR = @mandir@
SYSCONFDIR = @sysconfdir@
SARGPHPDIR = @SARGPHPDIR@
-LANGDIR = @LANGDIR@
FONTDIR = @FONTDIR@
IMAGEDIR = @IMAGEDIR@
-LOCALEDIR = $(datadir)/locale
IBINDIR = -DBINDIR=\"@bindir@\"
ISYSCONFDIR = -DSYSCONFDIR=\"@sysconfdir@\"
ISARGPHPDIR = -DSARGPHPDIR=\"@SARGPHPDIR@\"
-ILANGDIR = -DLANGDIR=\"@LANGDIR@\"
IFONTDIR = -DFONTDIR=\"@FONTDIR@\"
IIMAGEDIR = -DIMAGEDIR=\"@IMAGEDIR@\"
ILOCALEDIR = -DLOCALEDIR=\"$(localedir)\"
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
-DEFS = $(IBINDIR) $(ISYSCONFDIR) $(ILANGDIR) $(IFONTDIR) $(IIMAGEDIR) $(ISARGPHPDIR) $(ILOCALEDIR) @DEFS@
+DEFS = $(IBINDIR) $(ISYSCONFDIR) $(IFONTDIR) $(IIMAGEDIR) $(ISARGPHPDIR) $(ILOCALEDIR) @DEFS@
LIBS = @LIBS@
SRCDIR = .
VPATH = .
totger.c index.c getconf.c usage.c decomp.c ip2name.c \
useragent.c exclude.c convlog.c totday.c repday.c datafile.c\
indexonly.c splitlog.c lastlog.c topsites.c siteuser.c css.c \
- smartfilter.c denied.cauthfail.c language.c charset.c \
+ smartfilter.c denied.c authfail.c charset.c \
squidguard_log.c squidguard_report.c auth.c download.c grepday.c \
- dansguardian_log.c dansguardian_report.c realtime.c btree_cache.c usertab.c
-OBJS = util.o log.o report.o topuser.o email.o sort.o html.o \
- totger.o index.o getconf.o usage.o decomp.o ip2name.o \
- useragent.o exclude.o convlog.o totday.o repday.o datafile.o \
- indexonly.o splitlog.o lastlog.o topsites.o siteuser.o css.o \
- smartfilter.o denied.o authfail.o language.o charset.o \
- squidguard_log.o squidguard_report.o auth.o download.o grepday.o \
- dansguardian_log.o dansguardian_report.o realtime.o btree_cache.o usertab.o
+ dansguardian_log.c dansguardian_report.c realtime.c btree_cache.c \
+ usertab.c userinfo.c longline.c
-DISTFILES = $(SRCS)
+OBJS = $(patsubst %.c,%.o,$(SRCS))
+
+DISTFILES = $(SRCS) ABOUT-NLS
+
+SUBDIRS = po
+.PHONY: all install clean uninstall mostlyclean distclean update-po $(SUBDIRS)
all: sarg
.c.o:
$(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
+*.o: include/conf.h include/info.h include/defs.h
+
sarg: $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) $(LIBCRYPT)
-install: all
+$(SUBDIRS):
+ $(MAKE) -C $@
+
+install: all install-po
-@if test ! -d $(DESTDIR)$(BINDIR); then \
echo "creating $(DESTDIR)$(BINDIR)"; \
mkdir -p $(DESTDIR)$(BINDIR); \
echo "creating $(DESTDIR)$(SYSCONFDIR)"; \
mkdir -p $(DESTDIR)$(SYSCONFDIR); \
fi
- -@if test ! -d $(DESTDIR)$(LANGDIR); then \
- echo "Creating $(DESTDIR)$(LANGDIR)"; \
- mkdir -p $(DESTDIR)$(LANGDIR); \
- fi
- -@if test ! -d $(DESTDIR)$(FONTDIR); then \
- echo "Creating $(DESTDIR)$(FONTDIR)"; \
- mkdir -p $(DESTDIR)$(FONTDIR); \
- fi
-@if test ! -d $(DESTDIR)$(IMAGEDIR); then \
echo "Creating $(DESTDIR)$(IMAGEDIR)"; \
mkdir -p $(DESTDIR)$(IMAGEDIR); \
else \
cp sarg.conf $(DESTDIR)$(SYSCONFDIR)/sarg.conf.default; \
fi
- cp -r ./languages/* $(DESTDIR)$(LANGDIR);
cp ./exclude_codes $(DESTDIR)$(SYSCONFDIR);
cp ./user_limit_block $(DESTDIR)$(SYSCONFDIR);
cp -r ./images/* $(DESTDIR)$(IMAGEDIR);
- cp -r ./fonts/* $(DESTDIR)$(FONTDIR);
+ -@if test -n "$(FONTDIR)" ; then \
+ if test ! -d "$(DESTDIR)$(FONTDIR)" ; then \
+ echo "Creating $(DESTDIR)$(FONTDIR)"; \
+ mkdir -p "$(DESTDIR)$(FONTDIR)"; \
+ fi; \
+ cp -r ./fonts/* "$(DESTDIR)$(FONTDIR)"; \
+ fi
cp -r ./css.tpl $(DESTDIR)$(SYSCONFDIR);
-@if test -n "$(SARGPHPDIR)" -a -d "$(DESTDIR)$(SARGPHPDIR)"; then \
- cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
+ cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
fi
-uninstall:
+uninstall: uninstall-po
rm -f $(DESTDIR)$(BINDIR)/sarg
rm -f $(DESTDIR)$(MANDIR)/sarg.1
TAGS: $(SRCS)
etags $(SRCS)
-clean:
+clean: clean-po
rm -f sarg *.o core
mostlyclean: clean
realclean: distclean
rm -f TAGS
+install-po:
+ $(MAKE) -C po install
+
+uninstall-po:
+ $(MAKE) -C po uninstall
+
+clean-po:
+ $(MAKE) -C po clean
+
+update-po:
+ $(MAKE) -C po update-po