]>
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@ | |
8 | docdir=@docdir@ | |
25697a35 | 9 | CC = @CC@ |
2357ef77 FM |
10 | BINDIR = @bindir@ |
11 | IBINDIR = -DBINDIR=\"@bindir@\" | |
12 | MANDIR = @mandir@ | |
13 | SYSCONFDIR = @sysconfdir@ | |
25697a35 | 14 | HTMLDIR = @HTMLDIR@ |
2357ef77 | 15 | ISYSCONFDIR = -DSYSCONFDIR=\"@sysconfdir@\" |
25697a35 GS |
16 | IHTMLDIR = -DHTMLDIR=\"@HTMLDIR@\" |
17 | CFLAGS = @CFLAGS@ | |
d6e703cc | 18 | CPPFLAGS = @CPPFLAGS@ |
25697a35 | 19 | LDFLAGS = @LDFLAGS@ |
2357ef77 FM |
20 | DEFS = @DEFS@ |
21 | LIBS = @LIBS@ | |
25697a35 GS |
22 | SRCDIR = . |
23 | VPATH = . | |
24 | INSTALL = cp | |
25 | ||
26 | INSTALL_PROGRAM = $(INSTALL) | |
27 | ||
28 | SRCS = util.c log.c report.c topuser.c email.c sort.c html.c \ | |
29 | totger.c index.c getconf.c usage.c decomp.c ip2name.c \ | |
30 | useragent.c exclude.c convlog.c totday.c repday.c datafile.c\ | |
31 | indexonly.c splitlog.c lastlog.c topsites.c siteuser.c css.c \ | |
32 | smartfilter.c denied.cauthfail.c language.c charset.c \ | |
33 | squidguard_log.c squidguard_report.c auth.c download.c grepday.c \ | |
491b862f | 34 | dansguardian_log.c dansguardian_report.c realtime.c |
25697a35 GS |
35 | OBJS = util.o log.o report.o topuser.o email.o sort.o html.o \ |
36 | totger.o index.o getconf.o usage.o decomp.o ip2name.o \ | |
37 | useragent.o exclude.o convlog.o totday.o repday.o datafile.o \ | |
38 | indexonly.o splitlog.o lastlog.o topsites.o siteuser.o css.o \ | |
39 | smartfilter.o denied.o authfail.o language.o charset.o \ | |
40 | squidguard_log.o squidguard_report.o auth.o download.o grepday.o \ | |
491b862f | 41 | dansguardian_log.o dansguardian_report.o realtime.o |
25697a35 GS |
42 | |
43 | DISTFILES = $(SRCS) | |
44 | ||
45 | all: sarg | |
46 | ||
47 | .c.o: | |
48 | $(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) $(IBINDIR) $(ISYSCONFDIR) $(IHTMLDIR) $< | |
49 | ||
50 | sarg: $(OBJS) | |
51 | $(CC) $(LDFLAGS) $(LIBS) $(OBJS) $(LIBCRYPT) -o $@ | |
52 | ||
53 | install: all | |
54 | -@if test ! -d $(BINDIR); then \ | |
55 | echo "creating $(BINDIR)"; \ | |
56 | mkdir $(BINDIR); \ | |
57 | fi | |
58 | -@if test ! -d $(MANDIR); then \ | |
59 | echo "creating $(MANDIR)"; \ | |
60 | mkdir -p $(MANDIR); \ | |
61 | fi | |
62 | -@if test ! -d $(SYSCONFDIR); then \ | |
63 | echo "creating $(SYSCONFDIR)"; \ | |
64 | mkdir $(SYSCONFDIR); \ | |
65 | fi | |
66 | -@if test ! -d $(SYSCONFDIR)/languages; then \ | |
67 | echo "Creating $(SYSCONFDIR)/languages"; \ | |
68 | mkdir $(SYSCONFDIR)/languages; \ | |
69 | fi | |
70 | -@if test ! -d $(SYSCONFDIR)/fonts; then \ | |
71 | echo "Creating $(SYSCONFDIR)/fonts"; \ | |
72 | mkdir $(SYSCONFDIR)/fonts; \ | |
73 | fi | |
74 | $(INSTALL_PROGRAM) sarg $(BINDIR)/sarg | |
75 | chmod 755 $(BINDIR)/sarg | |
76 | $(INSTALL_PROGRAM) sarg.1 $(MANDIR)/sarg.1 | |
77 | chmod 755 $(MANDIR)/sarg.1 | |
78 | @if test ! -f $(SYSCONFDIR)/sarg.conf; then \ | |
79 | echo "cp $(SYSCONFDIR)/sarg.conf"; \ | |
80 | cp sarg.conf $(SYSCONFDIR)/sarg.conf; \ | |
81 | else \ | |
82 | cp sarg.conf $(SYSCONFDIR)/sarg.conf.default; \ | |
83 | fi | |
84 | cp -r ./languages $(SYSCONFDIR); | |
85 | cp ./exclude_codes $(SYSCONFDIR); | |
d6e703cc | 86 | cp ./user_limit_block $(SYSCONFDIR); |
25697a35 GS |
87 | cp -r ./images $(SYSCONFDIR); |
88 | cp -r ./sarg-php $(SYSCONFDIR); | |
89 | cp -r ./fonts $(SYSCONFDIR); | |
90 | cp -r ./css.tpl $(SYSCONFDIR); | |
91 | -@if test -d $(HTMLDIR); then \ | |
92 | cp -r ./sarg-php $(HTMLDIR); \ | |
93 | fi | |
94 | ||
95 | uninstall: | |
96 | rm -f $(BINDIR)/sarg | |
97 | rm -f $(MANDIR)/sarg.1 | |
98 | ||
99 | TAGS: $(SRCS) | |
100 | etags $(SRCS) | |
101 | ||
102 | clean: | |
103 | rm -f sarg *.o core | |
104 | ||
105 | mostlyclean: clean | |
106 | ||
107 | distclean: clean | |
108 | rm -f Makefile config.status config.cache config.log | |
109 | ||
110 | realclean: distclean | |
111 | rm -f TAGS | |
112 |