1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
GMKPATH = ..
include $(GMKPATH)/global.mk
SUBDIRS = logformats reports work
LOBJS = logformats/l_cgp_native.o logformats/l_logformats.o \
logformats/l_squid_native.o logformats/l_clf_native.o \
logformats/l_postfix_syslog.o logformats/l_combined_native.o \
logformats/l_qmail_syslog.o
ROBJS = reports/r_efficiency.o reports/r_list.o reports/r_topuser.o \
reports/r_usergraphs.o reports/r_email.o reports/r_reports.o \
reports/r_typical.o reports/r_users.o reports/r_index.o \
reports/r_topsites.o reports/r_userdatetime.o
WOBJS = work/w_config.o work/w_fs.o work/w_internal.o work/w_log_operations.o \
work/w_system.o
AOBJS = $(LOBJS) $(ROBJS) $(WOBJS)
all: free-sa free-sa.cgi
$(LOBJS):
@cd logformats;make all
$(ROBJS):
@cd reports;make all
$(WOBJS):
@cd work;make all
free-sa: $(AOBJS) free-sa.o
$(CC) $(LDFLAGS) $(AOBJS) $@.o $(LIBS) -o $@
free-sa.cgi: $(AOBJS) free-sa.cgi.o
$(CC) $(LDFLAGS) $(AOBJS) $@.o $(LIBS) -o $@
release: all
strip ./free-sa ./free-sa.cgi
clean:
$(MAKEDIRS)
@rm -f ./free-sa ./free-sa.o ./free-sa.cgi ./free-sa.cgi.o
install: release
@( \
$(INSTALLDIR) $(PREFIX)/bin; \
$(INSTALLDIR) $(WWWDIR)/cgi-bin; \
$(INSTALLBIN) ./free-sa $(PREFIX)/bin; \
$(INSTALLBIN) ./free-sa.cgi $(WWWDIR)/cgi-bin; \
)