-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
87 lines (56 loc) · 1.8 KB
/
Makefile
File metadata and controls
87 lines (56 loc) · 1.8 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# $Id: Makefile,v 1.2 2005/08/19 07:31:06 chris Exp $
# The path to install squirm under
BINDIR=/usr/bin
LOGDIR=/var/log/squid
ETCDIR=/etc/squid
DESTDIR=
# The username that squid runs as (see cache_effective_user in squid.conf)
USER=proxy
# The group that squid runs as (see cache_effective_group in squid.conf)
GROUP=daemon
# The group that the root user belongs to
ROOT_GROUP = root
# The regex library (-lgnuregex is common on FreeBSD, none for some Linux'es)
EXTRALIBS=
# EXTRALIBS=-lgnuregex
# ---
# you should need to edit anything below here
TOP = .
OFILES = squirm.o main.o config.o log.o lists.o ip.o util.o
HFILES = squirm.h paths.h lists.h log.h ip.h util.h
CC=gcc
OPTIMISATION=-O3
BINARIES = squirm
CFLAGS = -O3 -Wall -funroll-loops -DBINDIR=\"$(BINDIR)\" -DLOGDIR=\"$(LOGDIR)\" -DETCDIR=\"$(ETCDIR)\"
#CFLAGS = -Wall -g -DPREFIX=\"$(PREFIX)\"
#CFLAGS = -Wall -g -DDEBUG
all: $(BINARIES)
install: all
mkdir -p $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(ETCDIR)
mkdir -p $(DESTDIR)$(LOGDIR)
install -m 644 -c squirm.conf.dist squirm.patterns.dist $(DESTDIR)$(ETCDIR)
install -m 755 -o root -g $(ROOT_GROUP) --strip squirm $(DESTDIR)$(BINDIR)
squirm.o: squirm.c $(HFILES)
$(CC) -c squirm.c $(CFLAGS)
main.o: main.c $(HFILES)
$(CC) -c main.c $(CFLAGS)
config.o: config.c $(HFILES)
$(CC) -c config.c $(CFLAGS)
log.o: log.c $(HFILES)
$(CC) -c log.c $(CFLAGS)
lists.o: lists.c $(HFILES)
$(CC) -c lists.c $(CFLAGS)
ip.o: ip.c $(HFILES)
$(CC) -c ip.c $(CFLAGS)
util.o: util.c $(HFILES)
$(CC) -c util.c $(CFLAGS)
squirm: $(OFILES) $(HFILES)
$(CC) $(OPTIMISATION) -o squirm $(OFILES) $(EXTRALIBS) $(LDOPTS)
pure: clean
rm -f *~
clean:
rm -f squirm.o main.o config.o log.o lists.o \
ip.o util.o core squirm
distclean: pure clean
dummy: