Abort dynamic objects in httpServerAbort.
[polipo.git] / Makefile
blob78c31ab68668f2d158fc95b726045beb2ffb1f40
1 PREFIX = /usr/local
2 BINDIR = $(PREFIX)/bin
3 MANDIR = $(PREFIX)/man
4 INFODIR = $(PREFIX)/info
5 LOCAL_ROOT = /usr/share/polipo/www
6 DISK_CACHE_ROOT = /var/cache/polipo
8 # To compile with Unix CC:
10 # CDEBUGFLAGS=-O
12 # To compile with GCC:
14 # CC = gcc
15 # CDEBUGFLAGS = -Os -g -Wall -std=gnu99
16 CDEBUGFLAGS = -Os -g -Wall
17 # CDEBUGFLAGS = -Os -Wall
18 # CDEBUGFLAGS = -g -Wall
20 # Add options to harden the build with specific gcc magic dust to help
21 # protect against buffer overflow exploits. SSP is available on gcc 4.1.2
22 # and above. See: http://www.trl.ibm.com/projects/security/ssp/
24 # _FORTIFY_SOURCE tells the C library to perform additional safety checks.
26 # CDEBUGFLAGS += -D_FORTIFY_SOURCE=2 -fstack-protector-all \
27 # -Wstack-protector -fwrapv
29 # To compile on a pure POSIX system:
31 # CC = c89
32 # CC = c99
33 # CDEBUGFLAGS=-O
35 # To compile with icc 7, you need -restrict. (Their bug.)
37 # CC=icc
38 # CDEBUGFLAGS = -O -restrict
40 # On System V (Solaris, HP/UX) you need the following:
42 # PLATFORM_DEFINES = -DSVR4
44 # On Solaris, you need the following:
46 # LDLIBS = -lsocket -lnsl -lresolv
48 # On mingw, you need
50 # EXE=.exe
51 # LDLIBS = -lwsock32
53 FILE_DEFINES = -DLOCAL_ROOT=\"$(LOCAL_ROOT)/\" \
54 -DDISK_CACHE_ROOT=\"$(DISK_CACHE_ROOT)/\"
56 # You may optionally also add any of the following to DEFINES:
58 # -DNO_DISK_CACHE to compile out the on-disk cache and local web server;
59 # -DNO_IPv6 to avoid using the RFC 3493 API and stick to stock
60 # Berkeley sockets;
61 # -DHAVE_IPv6 to force the use of the RFC 3493 API on systems other
62 # than GNU/Linux and BSD (let me know if it works);
63 # -DNO_FANCY_RESOLVER to compile out the asynchronous name resolution
64 # code;
65 # -DNO_STANDARD_RESOLVER to compile out the code that falls back to
66 # gethostbyname/getaddrinfo when DNS requests fail;
67 # -DNO_TUNNEL to compile out the code that handles CONNECT requests;
68 # -DNO_SOCKS to compile out the SOCKS gateway code.
69 # -DNO_FORBIDDEN to compile out the all of the forbidden URL code
70 # -DNO_REDIRECTOR to compile out the Squid-style redirector code
71 # -DNO_SYSLOG to compile out logging to syslog
73 DEFINES = $(FILE_DEFINES) $(PLATFORM_DEFINES)
75 CFLAGS = $(MD5INCLUDES) $(CDEBUGFLAGS) $(DEFINES) $(EXTRA_DEFINES)
77 SRCS = util.c event.c io.c chunk.c atom.c object.c log.c diskcache.c main.c \
78 config.c local.c http.c client.c server.c auth.c tunnel.c \
79 http_parse.c parse_time.c dns.c forbidden.c \
80 md5import.c md5.c ftsimport.c fts_compat.c socks.c mingw.c
82 OBJS = util.o event.o io.o chunk.o atom.o object.o log.o diskcache.o main.o \
83 config.o local.o http.o client.o server.o auth.o tunnel.o \
84 http_parse.o parse_time.o dns.o forbidden.o \
85 md5import.o ftsimport.o socks.o mingw.o
87 polipo$(EXE): $(OBJS)
88 $(CC) $(CFLAGS) $(LDFLAGS) -o polipo$(EXE) $(OBJS) $(MD5LIBS) $(LDLIBS)
90 ftsimport.o: ftsimport.c fts_compat.c
92 md5import.o: md5import.c md5.c
94 .PHONY: all install install.binary install.man
96 all: polipo$(EXE) polipo.info html/index.html localindex.html
98 install: install.binary install.man
100 install.binary: all
101 mkdir -p $(TARGET)$(BINDIR)
102 mkdir -p $(TARGET)$(LOCAL_ROOT)
103 mkdir -p $(TARGET)$(LOCAL_ROOT)/doc
104 rm -f $(TARGET)$(BINDIR)/polipo
105 cp -f polipo $(TARGET)$(BINDIR)/
106 cp -f html/* $(TARGET)$(LOCAL_ROOT)/doc
107 cp -f localindex.html $(TARGET)$(LOCAL_ROOT)/index.html
109 install.man: all
110 mkdir -p $(TARGET)$(MANDIR)/man1
111 mkdir -p $(TARGET)$(INFODIR)
112 cp -f polipo.man $(TARGET)$(MANDIR)/man1/polipo.1
113 cp polipo.info $(TARGET)$(INFODIR)/
114 install-info --info-dir=$(TARGET)$(INFODIR) polipo.info
117 polipo.info: polipo.texi
118 makeinfo polipo.texi
120 html/index.html: polipo.texi
121 mkdir -p html
122 makeinfo --html -o html polipo.texi
124 polipo.html: polipo.texi
125 makeinfo --html --no-split --no-headers -o polipo.html polipo.texi
127 polipo.pdf: polipo.texi
128 texi2pdf polipo.texi
130 polipo.ps.gz: polipo.ps
131 gzip -c polipo.ps > polipo.ps.gz
133 polipo.ps: polipo.dvi
134 dvips -Pwww -o polipo.ps polipo.dvi
136 polipo.dvi: polipo.texi
137 texi2dvi polipo.texi
139 polipo.man.html: polipo.man
140 rman -f html polipo.man > polipo.man.html
142 TAGS: $(SRCS)
143 etags $(SRCS)
145 .PHONY: clean
147 clean:
148 -rm -f polipo$(EXE) *.o *~ core TAGS gmon.out
149 -rm -f polipo.cp polipo.fn polipo.log polipo.vr
150 -rm -f polipo.cps polipo.info* polipo.pg polipo.toc polipo.vrs
151 -rm -f polipo.aux polipo.dvi polipo.ky polipo.ps polipo.tp
152 -rm -f polipo.dvi polipo.ps polipo.ps.gz polipo.pdf polipo.html
153 -rm -rf ./html/
154 -rm -f polipo.man.html