]>
Commit | Line | Data |
---|---|---|
25697a35 GS |
1 | # Makefile.in for sarg |
2 | ||
2357ef77 FM |
3 | prefix=@prefix@ |
4 | datarootdir=@datarootdir@ | |
5 | datadir=@datadir@ | |
6 | exec_prefix=@exec_prefix@ | |
7 | PACKAGE_TARNAME=@PACKAGE_TARNAME@ | |
c0ec9cc7 FM |
8 | docdir = @docdir@ |
9 | CC = @CC@ | |
10 | BINDIR = @bindir@ | |
11 | MANDIR = @mandir@ | |
12 | SYSCONFDIR = @sysconfdir@ | |
13 | SARGPHPDIR = @SARGPHPDIR@ | |
c0ec9cc7 FM |
14 | FONTDIR = @FONTDIR@ |
15 | IMAGEDIR = @IMAGEDIR@ | |
c0ec9cc7 FM |
16 | IBINDIR = -DBINDIR=\"@bindir@\" |
17 | ISYSCONFDIR = -DSYSCONFDIR=\"@sysconfdir@\" | |
18 | ISARGPHPDIR = -DSARGPHPDIR=\"@SARGPHPDIR@\" | |
c0ec9cc7 FM |
19 | IFONTDIR = -DFONTDIR=\"@FONTDIR@\" |
20 | IIMAGEDIR = -DIMAGEDIR=\"@IMAGEDIR@\" | |
e6bb2f4d | 21 | ILOCALEDIR = -DLOCALEDIR=\"@localedir@\" |
c0ec9cc7 FM |
22 | CFLAGS = @CFLAGS@ |
23 | CPPFLAGS = @CPPFLAGS@ | |
24 | LDFLAGS = @LDFLAGS@ | |
308a21d4 | 25 | DEFS = $(IBINDIR) $(ISYSCONFDIR) $(IFONTDIR) $(IIMAGEDIR) $(ISARGPHPDIR) $(ILOCALEDIR) @DEFS@ |
c0ec9cc7 FM |
26 | LIBS = @LIBS@ |
27 | SRCDIR = . | |
28 | VPATH = . | |
29 | INSTALL = cp | |
25697a35 GS |
30 | |
31 | INSTALL_PROGRAM = $(INSTALL) | |
32 | ||
33 | SRCS = 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 | 42 | OBJS = $(patsubst %.c,%.o,$(SRCS)) |
25697a35 | 43 | |
3becf85c FM |
44 | DISTFILES = $(SRCS) ABOUT-NLS |
45 | ||
46 | SUBDIRS = po | |
308a21d4 | 47 | .PHONY: all install clean uninstall mostlyclean distclean update-po $(SUBDIRS) |
25697a35 GS |
48 | |
49 | all: 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 | 56 | sarg: $(OBJS) |
1b42c442 | 57 | $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) $(LIBCRYPT) |
25697a35 | 58 | |
3becf85c FM |
59 | $(SUBDIRS): |
60 | $(MAKE) -C $@ | |
61 | ||
308a21d4 | 62 | install: 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 | 104 | uninstall: uninstall-po |
f251e023 FM |
105 | rm -f $(DESTDIR)$(BINDIR)/sarg |
106 | rm -f $(DESTDIR)$(MANDIR)/sarg.1 | |
25697a35 GS |
107 | |
108 | TAGS: $(SRCS) | |
109 | etags $(SRCS) | |
110 | ||
308a21d4 | 111 | clean: clean-po |
25697a35 GS |
112 | rm -f sarg *.o core |
113 | ||
114 | mostlyclean: clean | |
115 | ||
116 | distclean: clean | |
117 | rm -f Makefile config.status config.cache config.log | |
118 | ||
119 | realclean: distclean | |
120 | rm -f TAGS | |
121 | ||
308a21d4 FM |
122 | install-po: |
123 | $(MAKE) -C po install | |
124 | ||
125 | uninstall-po: | |
126 | $(MAKE) -C po uninstall | |
127 | ||
128 | clean-po: | |
129 | $(MAKE) -C po clean | |
130 | ||
f2ec8c75 FM |
131 | update-po: |
132 | $(MAKE) -C po update-po | |
cea51ad6 FM |
133 | |
134 | po-from-tp: | |
135 | @echo "Fetching latest po files from translationprojetc.org" | |
136 | rsync -Lrtvz -u translationproject.org::tp/latest/sarg/ po |