4 INFODIR
= $(PREFIX
)/info
5 LOCAL_ROOT
= /usr
/share
/polipo
/www
6 DISK_CACHE_ROOT
= /var
/cache
/polipo
8 # To compile with Unix CC:
12 # To compile with GCC:
15 # CDEBUGFLAGS = -Os -g -Wall -std=gnu99
16 CDEBUGFLAGS
= -Os
-g
-Wall
17 # CDEBUGFLAGS = -Os -Wall
18 # CDEBUGFLAGS = -g -Wall
20 # To compile on a pure POSIX system:
26 # To compile with icc 7, you need -restrict. (Their bug.)
29 # CDEBUGFLAGS = -O -restrict
31 # On System V (Solaris, HP/UX) you need the following:
33 # PLATFORM_DEFINES = -DSVR4
35 # On Solaris, you need the following:
37 # LDLIBS = -lsocket -lnsl -lresolv
44 FILE_DEFINES
= -DLOCAL_ROOT
=\"$(LOCAL_ROOT
)/\" \
45 -DDISK_CACHE_ROOT
=\"$(DISK_CACHE_ROOT
)/\"
47 # You may optionally also add any of the following to DEFINES:
49 # -DNO_DISK_CACHE to compile out the on-disk cache and local web server;
50 # -DNO_IPv6 to avoid using the RFC 3493 API and stick to stock
52 # -DHAVE_IPv6 to force the use of the RFC 3493 API on systems other
53 # than GNU/Linux and BSD (let me know if it works);
54 # -DNO_FANCY_RESOLVER to compile out the asynchronous name resolution
56 # -DNO_STANDARD_RESOLVER to compile out the code that falls back to
57 # gethostbyname/getaddrinfo when DNS requests fail;
58 # -DNO_TUNNEL to compile out the code that handles CONNECT requests;
59 # -DNO_SOCKS to compile out the SOCKS gateway code.
60 # -DNO_FORBIDDEN to compile out the all of the forbidden URL code
61 # -DNO_REDIRECTOR to compile out the Squid-style redirector code
62 # -DNO_SYSLOG to compile out logging to syslog
64 DEFINES
= $(FILE_DEFINES
) $(PLATFORM_DEFINES
)
66 CFLAGS
= $(MD5INCLUDES
) $(CDEBUGFLAGS
) $(DEFINES
) $(EXTRA_DEFINES
)
68 SRCS
= util.c event.c io.c chunk.c atom.c object.c log.c diskcache.c main.c \
69 config.c local.c http.c client.c server.c auth.c tunnel.c \
70 http_parse.c parse_time.c dns.c forbidden.c \
71 md5import.c md5.c ftsimport.c fts_compat.c socks.c mingw.c
73 OBJS
= util.o event.o io.o chunk.o atom.o object.o log.o diskcache.o main.o \
74 config.o local.o http.o client.o server.o auth.o tunnel.o \
75 http_parse.o parse_time.o dns.o forbidden.o \
76 md5import.o ftsimport.o socks.o mingw.o
79 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o polipo
$(EXE
) $(OBJS
) $(MD5LIBS
) $(LDLIBS
)
81 ftsimport.o
: ftsimport.c fts_compat.c
83 md5import.o
: md5import.c md5.c
85 .PHONY
: all install install.binary
install.man
87 all: polipo
$(EXE
) polipo.
info html
/index.html localindex.html
89 install: install.binary
install.man
92 mkdir
-p
$(TARGET
)$(BINDIR
)
93 mkdir
-p
$(TARGET
)$(LOCAL_ROOT
)
94 mkdir
-p
$(TARGET
)$(LOCAL_ROOT
)/doc
95 rm -f
$(TARGET
)$(BINDIR
)/polipo
96 cp
-f polipo
$(TARGET
)$(BINDIR
)/
97 cp
-f html
/* $(TARGET
)$(LOCAL_ROOT
)/doc
98 cp
-f localindex.html
$(TARGET
)$(LOCAL_ROOT
)/index.html
101 mkdir
-p
$(TARGET
)$(MANDIR
)/man1
102 mkdir
-p
$(TARGET
)$(INFODIR
)
103 cp
-f polipo.man
$(TARGET
)$(MANDIR
)/man1
/polipo
.1
104 cp polipo.
info $(TARGET
)$(INFODIR
)/
105 install-info
--info-dir
=$(TARGET
)$(INFODIR
) polipo.
info
108 polipo.
info: polipo.texi
111 html
/index.html
: polipo.texi
113 makeinfo --html
-o html polipo.texi
115 polipo.html
: polipo.texi
116 makeinfo --html
--no-split
--no-headers
-o polipo.html polipo.texi
118 polipo.pdf
: polipo.texi
121 polipo.ps.gz
: polipo.ps
122 gzip
-c polipo.ps
> polipo.ps.gz
124 polipo.ps
: polipo.
dvi
125 dvips
-Pwww
-o polipo.ps polipo.
dvi
127 polipo.
dvi: polipo.texi
130 polipo.man.html
: polipo.man
131 rman
-f html polipo.man
> polipo.man.html
139 -rm -f polipo
$(EXE
) *.o
*~ core TAGS gmon.out
140 -rm -f polipo.cp polipo.fn polipo.log polipo.vr
141 -rm -f polipo.cps polipo.
info* polipo.pg polipo.toc polipo.vrs
142 -rm -f polipo.aux polipo.
dvi polipo.ky polipo.ps polipo.tp
143 -rm -f polipo.
dvi polipo.ps polipo.ps.gz polipo.pdf polipo.html
145 -rm -f polipo.man.html