]> git.ipfire.org Git - thirdparty/sarg.git/blame - Makefile.in
Merge commit '04a01ed3a074b66'
[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@
10BINDIR = @bindir@
11MANDIR = @mandir@
12SYSCONFDIR = @sysconfdir@
13SARGPHPDIR = @SARGPHPDIR@
c0ec9cc7
FM
14FONTDIR = @FONTDIR@
15IMAGEDIR = @IMAGEDIR@
c0ec9cc7
FM
16IBINDIR = -DBINDIR=\"@bindir@\"
17ISYSCONFDIR = -DSYSCONFDIR=\"@sysconfdir@\"
18ISARGPHPDIR = -DSARGPHPDIR=\"@SARGPHPDIR@\"
c0ec9cc7
FM
19IFONTDIR = -DFONTDIR=\"@FONTDIR@\"
20IIMAGEDIR = -DIMAGEDIR=\"@IMAGEDIR@\"
e6bb2f4d 21ILOCALEDIR = -DLOCALEDIR=\"@localedir@\"
c0ec9cc7
FM
22CFLAGS = @CFLAGS@
23CPPFLAGS = @CPPFLAGS@
24LDFLAGS = @LDFLAGS@
308a21d4 25DEFS = $(IBINDIR) $(ISYSCONFDIR) $(IFONTDIR) $(IIMAGEDIR) $(ISARGPHPDIR) $(ILOCALEDIR) @DEFS@
c0ec9cc7
FM
26LIBS = @LIBS@
27SRCDIR = .
28VPATH = .
29INSTALL = cp
25697a35
GS
30
31INSTALL_PROGRAM = $(INSTALL)
32
33SRCS = util.c log.c report.c topuser.c email.c sort.c html.c \
34 totger.c index.c getconf.c usage.c decomp.c ip2name.c \
35 useragent.c exclude.c convlog.c totday.c repday.c datafile.c\
36 indexonly.c splitlog.c lastlog.c topsites.c siteuser.c css.c \
556e73cc 37 smartfilter.c denied.c authfail.c charset.c \
25697a35 38 squidguard_log.c squidguard_report.c auth.c download.c grepday.c \
f2ec8c75 39 dansguardian_log.c dansguardian_report.c realtime.c btree_cache.c \
4ca814cc 40 usertab.c userinfo.c longline.c
f2ec8c75 41
556e73cc 42OBJS = $(patsubst %.c,%.o,$(SRCS))
25697a35 43
3becf85c
FM
44DISTFILES = $(SRCS) ABOUT-NLS
45
46SUBDIRS = po
308a21d4 47.PHONY: all install clean uninstall mostlyclean distclean update-po $(SUBDIRS)
25697a35
GS
48
49all: sarg
50
51.c.o:
c0ec9cc7 52 $(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
25697a35 53
d6dabf47
FM
54*.o: include/conf.h include/info.h include/defs.h
55
25697a35 56sarg: $(OBJS)
1b42c442 57 $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) $(LIBCRYPT)
25697a35 58
3becf85c
FM
59$(SUBDIRS):
60 $(MAKE) -C $@
61
308a21d4 62install: all install-po
f251e023
FM
63 -@if test ! -d $(DESTDIR)$(BINDIR); then \
64 echo "creating $(DESTDIR)$(BINDIR)"; \
65 mkdir -p $(DESTDIR)$(BINDIR); \
25697a35 66 fi
f251e023
FM
67 -@if test ! -d $(DESTDIR)$(MANDIR); then \
68 echo "creating $(DESTDIR)$(MANDIR)"; \
69 mkdir -p $(DESTDIR)$(MANDIR); \
25697a35 70 fi
f251e023
FM
71 -@if test ! -d $(DESTDIR)$(SYSCONFDIR); then \
72 echo "creating $(DESTDIR)$(SYSCONFDIR)"; \
73 mkdir -p $(DESTDIR)$(SYSCONFDIR); \
25697a35 74 fi
f251e023
FM
75 -@if test ! -d $(DESTDIR)$(IMAGEDIR); then \
76 echo "Creating $(DESTDIR)$(IMAGEDIR)"; \
77 mkdir -p $(DESTDIR)$(IMAGEDIR); \
25697a35 78 fi
f251e023
FM
79 $(INSTALL_PROGRAM) sarg $(DESTDIR)$(BINDIR)/sarg
80 chmod 755 $(DESTDIR)$(BINDIR)/sarg
81 $(INSTALL_PROGRAM) sarg.1 $(DESTDIR)$(MANDIR)/sarg.1
82 chmod 755 $(DESTDIR)$(MANDIR)/sarg.1
83 @if test ! -f $(DESTDIR)$(SYSCONFDIR)/sarg.conf; then \
84 echo "cp $(DESTDIR)$(SYSCONFDIR)/sarg.conf"; \
85 cp sarg.conf $(DESTDIR)$(SYSCONFDIR)/sarg.conf; \
25697a35 86 else \
f251e023 87 cp sarg.conf $(DESTDIR)$(SYSCONFDIR)/sarg.conf.default; \
25697a35 88 fi
f251e023
FM
89 cp ./exclude_codes $(DESTDIR)$(SYSCONFDIR);
90 cp ./user_limit_block $(DESTDIR)$(SYSCONFDIR);
91 cp -r ./images/* $(DESTDIR)$(IMAGEDIR);
3becf85c
FM
92 -@if test -n "$(FONTDIR)" ; then \
93 if test ! -d "$(DESTDIR)$(FONTDIR)" ; then \
94 echo "Creating $(DESTDIR)$(FONTDIR)"; \
95 mkdir -p "$(DESTDIR)$(FONTDIR)"; \
96 fi; \
97 cp -r ./fonts/* "$(DESTDIR)$(FONTDIR)"; \
98 fi
f251e023 99 cp -r ./css.tpl $(DESTDIR)$(SYSCONFDIR);
7bbc1de4 100 -@if test -n "$(SARGPHPDIR)" -a -d "$(DESTDIR)$(SARGPHPDIR)"; then \
3becf85c 101 cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
25697a35
GS
102 fi
103
308a21d4 104uninstall: uninstall-po
f251e023
FM
105 rm -f $(DESTDIR)$(BINDIR)/sarg
106 rm -f $(DESTDIR)$(MANDIR)/sarg.1
25697a35
GS
107
108TAGS: $(SRCS)
109 etags $(SRCS)
110
308a21d4 111clean: clean-po
25697a35
GS
112 rm -f sarg *.o core
113
114mostlyclean: clean
115
116distclean: clean
117 rm -f Makefile config.status config.cache config.log
118
119realclean: distclean
120 rm -f TAGS
121
308a21d4
FM
122install-po:
123 $(MAKE) -C po install
124
125uninstall-po:
126 $(MAKE) -C po uninstall
127
128clean-po:
129 $(MAKE) -C po clean
130
f2ec8c75
FM
131update-po:
132 $(MAKE) -C po update-po
cea51ad6
FM
133
134po-from-tp:
135 @echo "Fetching latest po files from translationprojetc.org"
136 rsync -Lrtvz -u translationproject.org::tp/latest/sarg/ po