1 # Note: Makefile is built automatically from Makefile.in
3 # $Id: GNUmakefile.in,v 1.36 2002/03/27 14:58:08 swa Exp $
5 # Written by and Copyright (C) 2001 the SourceForge
6 # Privoxy team. http://www.privoxy.org/
8 # Based on the Internet Junkbuster originally written
9 # by and Copyright (C) 1997 Anonymous Coders and
10 # Junkbusters Corporation. http://www.junkbusters.com
12 # This program is free software; you can redistribute it
13 # and/or modify it under the terms of the GNU General
14 # Public License as published by the Free Software
15 # Foundation; either version 2 of the License, or (at
16 # your option) any later version.
18 # This program is distributed in the hope that it will
19 # be useful, but WITHOUT ANY WARRANTY; without even the
20 # implied warranty of MERCHANTABILITY or FITNESS FOR A
21 # PARTICULAR PURPOSE. See the GNU General Public
22 # License for more details.
24 # The GNU General Public License should be included with
25 # this file. If not, you can view it at
26 # http://www.gnu.org/copyleft/gpl.html
27 # or write to the Free Software Foundation, Inc., 59
28 # Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 #############################################################################
32 # Version number (for RPM)
33 #############################################################################
35 VERSION_MAJOR = @VERSION_MAJOR@
36 VERSION_MINOR = @VERSION_MINOR@
37 VERSION_POINT = @VERSION_POINT@
38 CODE_STATUS = @CODE_STATUS@
39 VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_POINT)
40 # will automatically be postfixed with -$(RPM_PACKAGEV) in the SPECfile
41 RPM_VERSION = $(VERSION)
42 RPM_PACKAGEV = @VERSION_RPM_PACKAGE@
45 #############################################################################
46 # Directories for "make install"
47 #############################################################################
49 DEST = @sysconfdir@/privoxy
54 #############################################################################
56 #############################################################################
58 PROGRAM = privoxy@EXEEXT@
75 DB = $(JADEBIN) -t sgml -ihtml -D.. -d ldpOK.dsl\#html
81 # Program to do LF->CRLF
83 # The sed version should be the most portable, but it doesn't for for me,
84 # the other two do. FIXME.
86 #DOSFILTER = $(SED) -e $$'s,$$,\r,'
87 #DOSFILTER = gawk -v ORS='\r\n' '{print $0;}'
88 DOSFILTER = perl -p -e 's/\n/\r\n/'
90 #############################################################################
91 # Setup for make distribution rh and suse for now
92 #############################################################################
94 TAR_ARCH = /tmp/privoxy-$(RPM_VERSION).tar.gz
97 #############################################################################
98 # Filenames and libraries
99 #############################################################################
101 C_SRC = actions.c cgi.c cgiedit.c cgisimple.c deanimate.c encode.c \
102 errlog.c filters.c gateway.c jbsockets.c jcc.c killpopup.c \
103 list.c loadcfg.c loaders.c miscutil.c parsers.c ssplit.c \
106 C_OBJS = $(C_SRC:.c=.@OBJEXT@)
107 C_HDRS = $(C_SRC:.c=.h) project.h actionlist.h
109 CONFIG_FILES = config trust \
111 basic.action intermediate.action advanced.action \
115 DOC_FILES = AUTHORS LICENSE README ChangeLog doc/text/* privoxy.1
117 W32_SRC = @WIN_ONLY@w32log.c w32taskbar.c win32.c
118 W32_FILES = @WIN_ONLY@w32.res
119 W32_OBJS = @WIN_ONLY@$(W32_SRC:.c=.@OBJEXT@) $(W32_FILES)
120 W32_HDRS = @WIN_ONLY@w32log.h w32taskbar.h win32.h w32res.h
121 W32_LIB = @WIN_ONLY@-lwsock32 -lcomctl32
122 W32_INIS = @WIN_ONLY@config.txt trust.txt
124 PCRS_SRC = @STATIC_PCRS_ONLY@pcrs.c
125 PCRS_OBJS = @STATIC_PCRS_ONLY@$(PCRS_SRC:.c=.@OBJEXT@)
126 PCRS_HDRS = @STATIC_PCRS_ONLY@$(PCRS_SRC:.c=.h)
128 PCRE_SRC = @STATIC_PCRE_ONLY@pcre/get.c pcre/maketables.c pcre/study.c pcre/pcre.c
129 PCRE_OBJS = @STATIC_PCRE_ONLY@$(PCRE_SRC:.c=.@OBJEXT@)
130 PCRE_HDRS = @STATIC_PCRE_ONLY@pcre/config.h pcre/chartables.c pcre/internal.h pcre/pcre.h
132 # No REGEX (Either because dynamically linked pcreposix, or no regex at all):
135 @GNU_REGEX_ONLY@REGEX_SRC = gnu_regex.c
137 @PCRE_REGEX_ONLY@@STATIC_PCRE_ONLY@REGEX_SRC = pcre/pcreposix.c
139 REGEX_OBJS = $(REGEX_SRC:.c=.@OBJEXT@)
140 REGEX_HDRS = $(REGEX_SRC:.c=.h)
142 # Dependencies introduced by #include "project.h".
143 PROJECT_H_DEPS = project.h $(REGEX_HDRS) $(PCRS_HDRS) @STATIC_PCRE_ONLY@pcre/pcre.h
145 # Socket libraries for platforms that need them explicitly defined
146 SOCKET_LIB = @SOCKET_LIB@
148 # PThreads library, if needed.
149 PTHREAD_LIB = @PTHREAD_ONLY@@PTHREAD_LIB@
151 SRCS = $(C_SRC) $(W32_SRC) $(PCRS_SRC) $(PCRE_SRC) $(REGEX_SRC)
152 OBJS = $(C_OBJS) $(W32_OBJS) $(PCRS_OBJS) $(PCRE_OBJS) $(REGEX_OBJS)
153 HDRS = $(C_HDRS) $(W32_HDRS) $(PCRS_HDRS) $(PCRE_OBJS) $(REGEX_HDRS)
154 LIBS = @LIBS@ $(W32_LIB) $(SOCKET_LIB) $(PTHREAD_LIB)
157 #############################################################################
159 #############################################################################
161 # The flag "-mno-win32" can be used by Cygwin to emulate a un?x type build.
162 # The flag "-mwindows -mno-cygwin" will cause Cygwin to use MingW32 for a
164 # The flag "-pthread" is required if using Pthreads under Linux (and
165 # possibly other OSs).
166 SPECIAL_CFLAGS = @SPECIAL_CFLAGS@
168 # Add your flags here
171 CFLAGS = @CFLAGS@ @CPPFLAGS@ $(OTHER_CFLAGS) $(SPECIAL_CFLAGS) -Wall \
172 @STATIC_PCRE_ONLY@ -Ipcre
174 LDFLAGS = $(DEBUG_CFLAGS) $(SPECIAL_CFLAGS)
177 #############################################################################
180 # There should NOT be any targets above this line.
181 #############################################################################
185 #############################################################################
187 #############################################################################
188 .PHONY: all inifiles redhat-dist redhat-upload solaris-dist suse-dist \
189 suse-upload win-dist tarball-dist dok redhat-dok webserver clean clobber tags \
193 #############################################################################
194 # Define this explicitly because Solaris is broken!
195 #############################################################################
197 $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
200 #############################################################################
202 #############################################################################
204 inifiles: $(W32_INIS)
207 $(SED) -e 's!\trustfile trust!trustfile trust.txt!' \
208 -e 's!\jarfile jarfile!jarfile jar.log!' \
209 -e 's!\logfile logfile!logfile privoxy.log!' \
210 -e 's!#Win32-only: !!' \
213 # LF to CRLF in default.action
214 $(DOSFILTER) <default.action >default.action.txt && mv default.action.txt default.action
215 # LF to CRLF in default.filter
216 $(DOSFILTER) <default.filter >default.filter.txt && mv default.filter.txt default.filter
219 $(DOSFILTER) < $< > $@
221 re_filterfile.txt: re_filterfile
222 $(DOSFILTER) < $< > $@
225 #############################################################################
226 # redhat distribution alpha and x86
227 #############################################################################
230 for dir in RPMS SRPMS BUILD SOURCES SPECS; do \
231 if [ ! -w $(RPM_BASE)/$$dir ]; then \
232 $(ECHO) "$(RPM_BASE)/$$dir is not writable for you. Maybe try as root."; \
233 $(ECHO) "Or add a suitable path to .rpmmacros like."; \
234 $(ECHO) "%_topdir /home/foo/rpm-build"; \
240 if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
242 TMPFILE=$$(mktemp -q /tmp/$(PROGRAM).XXXXXX); \
243 if $(SED) -e 's/^\(Version:\).*/\1 $(RPM_VERSION)/g' \
244 -e 's/^\(Release:\).*/\1 $(RPM_PACKAGEV)/g' \
245 privoxy-rh.spec > $$TMPFILE ; then \
246 $(MV) -f $$TMPFILE privoxy-rh.spec; \
248 $(ECHO) "Could not set version info in specfile."; \
252 $(TAR) --exclude "CVS" --exclude "privoxy-suse.spec" -czf $(TAR_ARCH) .
253 $(RPM) --clean -ta $(TAR_ARCH)
254 if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
257 # anonymously ncftps the rpms to sourceforge
260 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/SRPMS/privoxy-$(RPM_VERSION)-$(RPM_PACKAGEV).src.rpm
261 # better should use `arch` here instead of ix86 to support other platforms too
262 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/RPMS/*/privoxy-$(RPM_VERSION)-$(RPM_PACKAGEV).*.rpm
263 @$(ECHO) -------------------------------------------------------
265 @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
266 @$(ECHO) ... and release the files.
267 @$(ECHO) -------------------------------------------------------
268 # w3m http://sourceforge.net/project/admin/editpackages.php?group_id=11118
270 #############################################################################
271 # sun solaris distribution
272 #############################################################################
276 @$(ECHO) "You have run autoconf && autoheader && ./configure right?"
279 $(STRIP_PROG) $(PROGRAM)
280 $(LN) -s current ../privoxy-$(VERSION)-$(CODE_STATUS)
282 $(TAR) -C.. -cvhf privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$(PROGRAM)
284 for foo in $(CONFIG_FILES); do \
285 $(TAR) -C.. --exclude "CVS" --exclude "#*" --exclude ".#*" --exclude ".cvsignore" -uvhf privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo; \
288 for foo in $(DOC_FILES); do \
289 $(TAR) -C.. --exclude "CVS" --exclude "#*" --exclude ".#*" --exclude ".cvsignore" -uvhf privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo; \
291 # and zip the archive
292 $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)
293 $(GZIP_PROG) privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar
294 @$(ECHO) Distribution with binary created.
296 # anonymously ncftps the tarball to sourceforge
298 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar.gz
299 @$(ECHO) -------------------------------------------------------
301 @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
302 @$(ECHO) ... and release the files.
303 @$(ECHO) -------------------------------------------------------
307 $(RM) privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar*
309 #############################################################################
311 #############################################################################
313 @$(ECHO) coming soon.
315 @$(ECHO) coming soon.
317 #############################################################################
318 # debian distribution
319 #############################################################################
321 @$(ECHO) coming soon.
323 @$(ECHO) coming soon.
325 #############################################################################
326 # macosx distribution
327 #############################################################################
329 @$(ECHO) coming soon.
331 @$(ECHO) coming soon.
333 #############################################################################
335 #############################################################################
337 @$(ECHO) coming soon.
339 @$(ECHO) coming soon.
341 #############################################################################
342 # freebsd distribution
343 #############################################################################
345 @$(ECHO) coming soon.
347 @$(ECHO) coming soon.
349 #############################################################################
350 # suse distribution. works fine. no need to be root.
351 #############################################################################
353 for dir in RPMS SRPMS BUILD SOURCES SPECS; do \
354 if [ ! -w $(RPM_BASE)/$$dir ]; then \
355 $(ECHO) "$(RPM_BASE)/$$dir is not writable for you. Maybe try as root."; \
356 $(ECHO) "Or add a suitable path to .rpmmacros like."; \
357 $(ECHO) "%_topdir /home/foo/rpm-build"; \
363 if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
365 TMPFILE=$$(mktemp -q /tmp/$(PROGRAM).XXXXXX); \
366 if $(SED) -e 's/^\(Version:\).*/\1 $(RPM_VERSIO)/g' \
367 -e 's/^\(Release:\).*/\1 $(RPM_PACKAGEV)/g' \
368 privoxy-suse.spec > $$TMPFILE ; then \
369 $(MV) -f $$TMPFILE privoxy-suse.spec; \
371 $(ECHO) "Could not set version info in specfile."; \
375 $(TAR) --exclude "CVS" --exclude "privoxy-rh.spec" -czf $(TAR_ARCH) .
376 $(RPM) --clean -ta $(TAR_ARCH)
377 if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
380 # anonymously ncftps the rpms to sourceforge
383 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/SRPMS/privoxy-suse-$(RPM_VERSION)-$(RPM_PACKAGEV).src.rpm
384 # better should use `arch` here instead of ix86 to support other platforms too
385 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/RPMS/*/privoxy-suse-$(RPM_VERSION)-$(RPM_PACKAGEV).*.rpm
386 @$(ECHO) -------------------------------------------------------
388 @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
389 @$(ECHO) ... and release the files.
390 @$(ECHO) -------------------------------------------------------
392 # handle with care. use with root.
394 rpm -e junkbuster-suse || true
395 rm -rf /etc/junkbuster
396 rm -rf /etc/rc.d/junkbuster*
397 rm -rf /var/run/junkbuster.pid
398 rm -rf /var/log/junkbuster
399 rm -f /etc/init.d/junkbuster
400 rm -f /usr/sbin/junkbuster
401 rm -f /usr/sbin/rcjunkbuster
402 rm -f /usr/share/man/man1/junkbuster.1.gz
403 rpm -e privoxy-suse || true
405 rm -rf /etc/rc.d/privoxy*
406 rm -rf /var/run/privoxy.pid
407 rm -rf /var/log/privoxy
408 rm -f /etc/init.d/privoxy
409 rm -f /usr/sbin/privoxy
410 rm -f /usr/sbin/rcprivoxy
411 rm -f /usr/share/man/man1/privoxy.1.gz
413 #############################################################################
414 # Windows distribution
415 #############################################################################
417 $(ECHO) Not implemented.
420 #############################################################################
421 # Tarball distribution
422 #############################################################################
423 tarball-dist: clobber
424 $(LN) -s current ../privoxy-$(VERSION)-$(CODE_STATUS)
425 $(TAR) -C.. --exclude "CVS" --exclude "#*" --exclude ".#*" --exclude ".cvsignore" -cvhzf privoxy-$(VERSION)-$(CODE_STATUS)-src.tar.gz privoxy-$(VERSION)-$(CODE_STATUS)
426 $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)
427 @$(ECHO) Tarball (without any binary) created.
429 # anonymously ncftps the tarball to sourceforge
431 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming privoxy-$(VERSION)-$(CODE_STATUS)-src.tar.gz
432 @$(ECHO) -------------------------------------------------------
434 @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
435 @$(ECHO) ... and release the files.
436 @$(ECHO) -------------------------------------------------------
440 $(RM) privoxy-$(VERSION)-$(CODE_STATUS)-src.tar.gz
442 #############################################################################
446 # converts doc/source/*.sgml into html, text and man pages
448 #############################################################################
449 dok: doc/source/ldpOK.dsl man2html-swa
450 mkdir -p doc/text doc/man
452 rm -rf doc/webserver/user-manual
453 cd doc/source && $(DB2HTML) -s ldpOK.dsl user-manual.sgml && mv user-manual ../webserver
454 cd doc/source && $(DB2HTML) -s ldpOK.dsl --nochunks user-manual.sgml > tmp.html && lynx -dump tmp.html > ../text/user-manual.txt && rm -rf tmp.html user-manual
456 rm -rf doc/webserver/developer-manual
457 cd doc/source && $(DB2HTML) -s ldpOK.dsl developer-manual.sgml && mv developer-manual ../webserver
458 cd doc/source && $(DB2HTML) -s ldpOK.dsl --nochunks developer-manual.sgml > tmp.html && lynx -dump tmp.html > ../text/developer-manual.txt && rm -rf tmp.html developer-manual
460 rm -rf doc/webserver/faq
461 cd doc/source && $(DB2HTML) -s ldpOK.dsl faq.sgml && mv faq ../webserver
462 cd doc/source && $(DB2HTML) -s ldpOK.dsl --nochunks faq.sgml > tmp.html && lynx -dump tmp.html > ../text/faq.txt && rm -rf tmp.html faq
465 if [ "$(MAN2HTML)" != "false" ]; then \
466 mkdir -p doc/webserver/man-page; \
467 $(ECHO) "<html><head><title>Privoxy|Doc/Man page</title><link rel=\"stylesheet\" type=\"text/css\" href=\"../p_web.css\"></head><body><H2>NAME</H2>" > doc/webserver/man-page/privoxy-man-page.html; \
468 man ./privoxy.1 | $(MAN2HTML) -bare \
469 >> doc/webserver/man-page/privoxy-man-page.html; \
470 $(ECHO) "</body></html>" >> doc/webserver/man-page/privoxy-man-page.html; \
473 redhat-dok: doc/source/ldpOK.dsl man2html
474 mkdir -p doc/text doc/man doc/source/user-manual \
475 doc/source/developer-manual doc/source/faq
477 rm -rf doc/webserver/user-manual
478 cd doc/source/user-manual && $(DB) ../user-manual.sgml && cd .. &&\
479 mv user-manual ../webserver
480 cd doc/source && $(DB) -V nochunks user-manual.sgml > tmp.html && \
481 $(WDUMP) tmp.html > ../text/user-manual.txt && rm -rf tmp.html \
484 rm -rf doc/webserver/developer-manual
485 cd doc/source/developer-manual && $(DB) ../developer-manual.sgml &&\
486 cd .. && mv developer-manual ../webserver
487 cd doc/source && $(DB) -V nochunks developer-manual.sgml > tmp.html && \
488 $(WDUMP) tmp.html > ../text/developer-manual.txt && rm -rf tmp.html \
491 rm -rf doc/webserver/faq
492 cd doc/source/faq && $(DB) ../faq.sgml && cd .. && mv faq ../webserver
493 cd doc/source && $(DB) -V nochunks faq.sgml > tmp.html && $(WDUMP) \
494 tmp.html > ../text/faq.txt && rm -rf tmp.html faq
496 doc/source/ldpOK.dsl:
497 if [ "$(DKPREFIX)" != "none" ]; then \
498 sed -e "s@/usr/share/sgml/docbook/dsssl-stylesheets@$(DKPREFIX)@g" doc/source/ldp.dsl > doc/source/ldpOK.dsl; \
500 cp doc/source/ldp.dsl doc/source/ldpOK.dsl; \
504 if [ "$(MAN2HTML)" != "false" ]; then \
505 $(MAN2HTML) privoxy.1 |grep -v "^Content-type" > doc/webserver/man-page/privoxy-man-page.html; \
508 #############################################################################
512 # moves dokumentation to webserver
514 #############################################################################
516 @$(ECHO) -------------------------------------------------------
517 @$(ECHO) You have run make dok/redhat-dok before, right?
518 @$(ECHO) Note that this command scps all stuff to the webserver,
519 @$(ECHO) it will not remove obsolete documents.
520 @$(ECHO) -------------------------------------------------------
521 chmod -R a+r doc/webserver
522 find doc/webserver -type d -exec chmod a+rx {} \;
523 cd doc/webserver && scp -Cr . ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
525 #############################################################################
526 # Source file dependencies
527 #############################################################################
529 actions.@OBJEXT@: actions.c actions.h config.h $(PROJECT_H_DEPS) errlog.h jcc.h list.h loaders.h miscutil.h actionlist.h
530 cgi.@OBJEXT@: cgi.c cgi.h config.h $(PROJECT_H_DEPS) cgiedit.h cgisimple.h list.h pcrs.h encode.h ssplit.h jcc.h filters.h actions.h errlog.h miscutil.h
531 cgiedit.@OBJEXT@: cgiedit.c cgiedit.h config.h $(PROJECT_H_DEPS) cgi.h list.h pcrs.h encode.h ssplit.h jcc.h filters.h actions.h errlog.h miscutil.h
532 cgisimple.@OBJEXT@: cgisimple.c cgisimple.h config.h $(PROJECT_H_DEPS) cgi.h list.h pcrs.h encode.h ssplit.h jcc.h filters.h actions.h errlog.h miscutil.h
533 deanimate.@OBJEXT@: deanimate.c deanimate.h config.h $(PROJECT_H_DEPS)
534 encode.@OBJEXT@: encode.c encode.h config.h
535 errlog.@OBJEXT@: errlog.c errlog.h config.h $(PROJECT_H_DEPS) @WIN_ONLY@w32log.h
536 filters.@OBJEXT@: filters.c filters.h config.h $(PROJECT_H_DEPS) errlog.h encode.h gateway.h jbsockets.h jcc.h loadcfg.h parsers.h ssplit.h cgi.h deanimate.h @WIN_ONLY@win32.h
537 gateway.@OBJEXT@: gateway.c gateway.h config.h $(PROJECT_H_DEPS) errlog.h jbsockets.h jcc.h loadcfg.h
538 jbsockets.@OBJEXT@: jbsockets.c jbsockets.h config.h $(PROJECT_H_DEPS) filters.h
539 jcc.@OBJEXT@: jcc.c jcc.h config.h $(PROJECT_H_DEPS) errlog.h filters.h gateway.h jbsockets.h killpopup.h loadcfg.h loaders.h miscutil.h parsers.h @WIN_ONLY@w32log.h win32.h cgi.h
540 killpopup.@OBJEXT@: killpopup.c killpopup.h config.h $(PROJECT_H_DEPS) jcc.h loadcfg.h
541 list.@OBJEXT@: list.c list.h config.h $(PROJECT_H_DEPS) list.h miscutil.h
542 loadcfg.@OBJEXT@: loadcfg.c loadcfg.h config.h $(PROJECT_H_DEPS) errlog.h filters.h gateway.h jbsockets.h jcc.h killpopup.h loaders.h miscutil.h parsers.h @WIN_ONLY@w32log.h win32.h
543 loaders.@OBJEXT@: loaders.c loaders.h config.h $(PROJECT_H_DEPS) errlog.h encode.h filters.h gateway.h jcc.h loadcfg.h miscutil.h parsers.h ssplit.h
544 miscutil.@OBJEXT@: miscutil.c miscutil.h config.h
545 parsers.@OBJEXT@: parsers.c parsers.h config.h $(PROJECT_H_DEPS) errlog.h encode.h filters.h jbsockets.h jcc.h loadcfg.h loaders.h miscutil.h ssplit.h
546 ssplit.@OBJEXT@: ssplit.c ssplit.h config.h miscutil.h
547 urlmatch.@OBJEXT@: urlmatch.c urlmatch.h config.h $(PROJECT_H_DEPS) errlog.h miscutil.h ssplit.h
550 gnu_regex.@OBJEXT@: gnu_regex.c gnu_regex.h config.h
553 pcrs.@OBJEXT@: pcrs.c pcre/pcre.h pcrs.h
556 pcre/get.@OBJEXT@: pcre/get.c pcre/config.h pcre/internal.h pcre/pcre.h
557 pcre/maketables.@OBJEXT@: pcre/maketables.c pcre/config.h pcre/internal.h pcre/pcre.h
558 pcre/pcre.@OBJEXT@: pcre/pcre.c pcre/config.h pcre/internal.h pcre/pcre.h pcre/chartables.c
559 pcre/pcreposix.@OBJEXT@: pcre/pcreposix.c pcre/config.h pcre/internal.h pcre/pcre.h pcre/pcreposix.h
560 pcre/study.@OBJEXT@: pcre/study.c pcre/config.h pcre/internal.h pcre/pcre.h
562 # An auxiliary program makes the PCRE default character table source
564 pcre/chartables.c: pcre/dftables@EXEEXT@
565 pcre/dftables@EXEEXT@ >pcre/chartables.c
567 pcre/dftables@EXEEXT@: pcre/dftables.c pcre/maketables.c pcre/pcre.h pcre/internal.h pcre/config.h
568 $(CC) -o pcre/dftables@EXEEXT@ $(CFLAGS) pcre/dftables.c
571 w32log.@OBJEXT@: w32log.c errlog.h config.h jcc.h loadcfg.h miscutil.h pcre/pcre.h pcre/pcreposix.h pcrs.h project.h w32log.h w32taskbar.h win32.h
572 w32taskbar.@OBJEXT@: w32taskbar.c config.h w32log.h w32taskbar.h
573 win32.@OBJEXT@: win32.c config.h jcc.h loadcfg.h pcre/pcre.h pcre/pcreposix.h pcrs.h project.h w32log.h win32.h
575 w32.res: w32.rc w32res.h icons/ico00001.ico icons/ico00002.ico icons/ico00003.ico icons/ico00004.ico icons/ico00005.ico icons/ico00006.ico icons/ico00007.ico icons/ico00008.ico icons/idle.ico icons/privoxy.ico config.h
576 windres -D__MINGW32__=0.2 -O coff -i $< -o $@
579 @AMIGAOS_ONLY@OBJS += amiga.o
580 @AMIGAOS_ONLY@CFLAGS += -D__AMIGAVERSION__=\"$(VERSION_MAJOR).$(VERSION_MINOR)$(VERSION_POINT)\" -D__AMIGADATE__=\"`date +%d.%m.%Y`\" -W -m68020 -noixemul -fbaserel -msmall-code
581 @AMIGAOS_ONLY@LDFLAGS += -m68020 -noixemul -fbaserel
582 @AMIGAOS_ONLY@LIBS = -lm /gg/lib/libb/libm020/libnix/swapstack.o
583 @AMIGAOS_ONLY@amiga.o: amiga.c amiga.h config.h
586 $(PROGRAM): $(OBJS) $(W32_FILES)
587 $(LD) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
590 $(RM) a.out core $(OBJS) $(W32_FILES) $(W32_INIS) $(PROGRAM) junkbuster
593 $(RM) $(PROGRAM) cscope.* logfile *.pdb *.lib *.exp `find . -name tags` `find . -name TAGS` config.status config.h.in config.log junkbuster.log privoxy.log config.cache *~ *.tar.gz configure
595 tags: $(SRCS) $(HDRS)
596 etags $(SRCS) $(HDRS)
600 # FIXME: This is a dirty hack to have an install target
601 # that works at least for some setups. This needs
604 $(STRIP_PROG) $(PROGRAM)
605 $(INSTALL) $(PROGRAM) $(SBIN_DEST)
606 mkdir -p $(DEST)/user-manual
607 mkdir -p $(DEST)/templates
608 cp -r doc/webserver/user-manual $(DEST)
609 cp -r templates $(DEST)
610 $(INSTALL) config default.action default.filter trust $(DEST)
611 # FIXME $(ECHO) privoxy.logrotate privoxy.monthly privoxy.weekly
612 # FIXME: Need new manual! $(GZIP_PROG) -c privoxy.1 > $(MAN_DEST)/privoxy.1.gz
613 $(INSTALL) privoxy.init /etc/init.d/privoxy
616 #############################################################################
622 # $Log: GNUmakefile.in,v $
623 # Revision 1.36 2002/03/27 14:58:08 swa
624 # can be used by mutilple targets
626 # Revision 1.35 2002/03/27 14:53:19 swa
629 # Revision 1.34 2002/03/27 10:30:11 swa
630 # we want a html man file on the webserver
632 # Revision 1.33 2002/03/27 03:05:35 hal9
633 # Added man2html target for docs (redhat-dok only for now)
635 # Revision 1.32 2002/03/26 22:29:54 swa
636 # we have a new homepage!
638 # Revision 1.31 2002/03/26 14:00:18 swa
639 # fixed make tarball, tarball-dist, tarball-clean
641 # Revision 1.30 2002/03/25 12:52:25 swa
644 # Revision 1.29 2002/03/24 17:03:55 jongfoster
647 # Revision 1.28 2002/03/24 16:19:48 swa
648 # configure needs to be generated.
650 # Revision 1.27 2002/03/24 16:13:57 swa
651 # generated files are a nono in cvs
653 # Revision 1.26 2002/03/24 15:36:02 swa
656 # Revision 1.25 2002/03/24 14:31:08 swa
657 # remove more crappy files. set RPM
658 # release version correctly.
660 # Revision 1.24 2002/03/24 14:19:55 swa
661 # set rpm package release in configure.in. nowhere else.
663 # Revision 1.23 2002/03/24 13:06:49 swa
664 # suse-clean now runs fine
666 # Revision 1.22 2002/03/24 12:56:21 swa
667 # name change related issues.
669 # Revision 1.21 2002/03/24 12:43:57 swa
672 # Revision 1.20 2002/03/24 11:39:17 jongfoster
673 # Renaming config files
675 # Revision 1.19 2002/03/22 20:53:03 morcego
676 # - Ongoing process to change name to JunkbusterNG
677 # - configure/configure.in: no change needed
679 # - TAR_ARCH = /tmp/JunkbusterNG-$(RPM_VERSION).tar.gz
680 # - PROGRAM = jbng@EXEEXT@
681 # - rh-spec now references as junkbusterng-rh.spec
682 # - redhat-upload: references changed to junkbusterng-* (package names)
683 # - tarball-dist: references changed to JunkbusterNG-distribution-*
684 # - tarball-src: now JunkbusterNG-*
685 # - install: initscript now junkbusterng.init and junkbusterng (when
687 # - junkbuster-rh.spec: renamed to junkbusterng-rh.spec
688 # - junkbusterng.spec:
689 # - References to the expression ijb where changed where possible
690 # - New package name: junkbusterng (all in lower case, acording to
691 # the LSB recomendation)
692 # - Version changed to: 2.9.13
694 # - Added: junkbuster to obsoletes and conflicts (Not sure this is
695 # right. If it obsoletes, why conflict ? Have to check it later)
696 # - Summary changed: Stefan, please check and aprove it
697 # - Changes description to use the new name
698 # - Sed string was NOT changed. Have to wait to the manpage to
700 # - Keeping the user junkbuster for now. It will require some aditional
701 # changes on the script (scheduled for the next specfile release)
702 # - Added post entry to move the old logfile to the new log directory
703 # - Removing "chkconfig --add" entry (not good to have it automaticaly
704 # added to the startup list).
705 # - Added preun section to stop the service with the old name, as well
706 # as remove it from the startup list
707 # - Removed the chkconfig --del entry from the conditional block on
708 # the preun scriptlet (now handled on the %files section)
709 # - junkbuster.init: renamed to junkbusterng.init
710 # - junkbusterng.init:
711 # - Changed JB_BIN to jbng
712 # - Created JB_OBIN with the old value of JB_BIN (junkbuster), to
713 # be used where necessary (config dir)
716 # - The config directory is /etc/junkbuster yet. Have to change it on the
717 # specfile, after it is changes on the code
718 # - The only files that got renamed on the cvs tree were the rh specfile and
719 # the init file. Some file references got changes on the makefile and on the
720 # rh-spec (as listed above)
722 # Revision 1.18 2002/03/21 23:00:00 swa
723 # want to autogenerate stuff.
725 # Revision 1.17 2002/03/19 19:30:04 morcego
726 # - Fixing stylesheet checking on configure. If it is found, no further checks
729 # - configure will now check for db2html or docbook2html (should work now
730 # on SuSe without the docbktls package)
732 # Revision 1.16 2002/03/14 22:32:32 hal9
733 # Bumped the RPM version.
735 # Revision 1.15 2002/03/08 20:00:28 swa
738 # Revision 1.14 2002/03/07 18:25:56 swa
739 # synced redhat and suse build process
741 # Revision 1.13 2002/03/07 17:17:56 oes
742 # (Hopefully) fixed for older make versions
744 # Revision 1.12 2002/03/07 15:28:27 swa
747 # Revision 1.11 2002/03/06 14:33:18 sarantis
748 # Use proper temp file, not "abc".
750 # Revision 1.10 2002/03/06 14:19:35 sarantis
751 # Cleanup PID_FILE_PATH from redhat-dist target
753 # Revision 1.9 2002/03/05 17:31:11 morcego
754 # Search for docbook.dsl. Should solve portability problems for SuSe.
756 # Revision 1.8 2002/03/05 14:07:42 morcego
757 # configure now detects rpm topdir, and change GNUmakefile acordingly
758 # (based on sugestion by Sarantis Paskalis)
760 # Revision 1.7 2002/03/05 13:43:28 morcego
761 # Checking for text browser, so redhat-dok can work.
763 # Revision 1.6 2002/03/05 13:10:51 morcego
764 # Changes to implement redhat-dok (Hal Burgiss)
765 # Changes to make it work on other distros and out-of-the-shelf configurations
767 # Revision 1.5 2002/02/27 15:30:39 hal9
768 # Reset $(RPM_PACKAGEV) to 1 (was 2)
770 # Revision 1.4 2002/01/17 21:44:04 jongfoster
771 # Adding urlmatch.[ch]
773 # Revision 1.3 2002/01/04 15:26:08 oes
774 # Added tarball-src target
776 # Revision 1.2 2001/12/30 14:07:31 steudten
777 # - Add signal handling (unix)
778 # - Add SIGHUP handler (unix)
779 # - Add creation of pidfile (unix)
780 # - Add action 'top' in rc file (RH)
781 # - Add entry 'SIGNALS' to manpage
782 # - Add exit message to logfile (unix)
784 # Revision 1.1 2001/12/01 11:22:57 jongfoster
785 # Renaming Makefile.in to GNUmakefile.in so that non-GNU versions of
786 # make break in a more obvious way.
787 # Adding .PHONY section.
789 # Revision 1.40 2001/12/01 00:24:11 jongfoster
790 # Renaming various config files
791 # Fixing CR->CRLF under Win32 (I hope)
793 # Revision 1.39 2001/11/06 12:07:30 steudten
794 # Add --clean for building rpm in target redhat-dist.
796 # Revision 1.38 2001/11/05 21:35:23 steudten
797 # Complete rewrite for the 'redhat-dist' target.
798 # Checks for writeable RPM build directories for calling user.
799 # So you must not be root, just set the modes to 1777 to
800 # build a RH package.
801 # Fix the upload-target to be arch independant.
802 # Add target for 'solaris-dist' - coming soon.
804 # Revision 1.37 2001/11/01 00:52:04 hal9
805 # Redhat-upload stuff per Stefan.
807 # Revision 1.36 2001/10/31 19:26:13 swa
808 # automate process of uploading new releases
811 # Revision 1.35 2001/10/15 22:14:59 joergs
812 # Removed -O2 and -Wall from AmigaOS-only CFLAGS since they are now in
813 # the general CFLAGS already.
815 # Revision 1.34 2001/10/15 18:28:06 steudten
816 # remove config.cache for target clobber.
817 # Cleanup make dist for RH and S.u.S.E.
819 # Revision 1.33 2001/10/10 12:43:33 oes
820 # Added ugly hack to make install target work at least for some setups.
822 # Revision 1.32 2001/10/09 22:38:19 jongfoster
823 # Correcting actionsfile filename for Win32 INI build
825 # Revision 1.31 2001/09/23 10:13:48 swa
826 # upload process established. run make webserver and
827 # the documentation is moved to the webserver. documents
828 # are now linked correctly.
830 # Revision 1.30 2001/09/19 17:55:49 oes
833 # Revision 1.29 2001/09/16 17:34:27 jongfoster
834 # Removing showargs.[ch], adding cgi(simple|edit).[ch]
835 # Replacing $(OBJEXT) with @OBJEXT@ - this seems to be a common source
838 # Revision 1.28 2001/09/13 15:19:08 swa
839 # we want text files as well.
841 # Revision 1.27 2001/09/13 13:11:37 steudten
843 # Replace DEBUG_CFLAGS with OTHER_CFLAGS
845 # Revision 1.26 2001/09/12 23:44:54 david__schmidt
846 # Mac OSX (Darwin) support added.
848 # Revision 1.25 2001/09/12 22:55:45 joergs
849 # AmigaOS support added.
851 # Revision 1.24 2001/09/12 17:28:59 david__schmidt
853 # OS/2 port: update autoconf'd support for the platform.
855 # Revision 1.23 2001/09/12 16:28:42 swa
856 # added "make dok" section to generate html pages from
857 # the sgml source documents. note that the we do not want
858 # generated stuff in cvs.
860 # Revision 1.22 2001/09/10 16:31:23 swa
861 # buildroot definition in the specfile fucks up the build
862 # process under suse. hence I moved it to the "rpm -ta"
865 # Revision 1.21 2001/09/10 11:12:49 oes
868 # Revision 1.20 2001/08/02 22:04:29 jongfoster
869 # Removing some remaining references to obsolete w32rulesdlg.[ch]
871 # Revision 1.19 2001/07/30 22:14:03 jongfoster
872 # Removing obsolete w32rulesdlg.c and w32rulesdlg.h
874 # Revision 1.18 2001/07/29 17:09:17 jongfoster
875 # Major changes to build system in order to fix these bugs:
876 # - pthreads under Linux was broken - changed -lpthread to -pthread
877 # - Compiling in MinGW32 mode under CygWin now correctly detects
878 # which shared libraries are available
879 # - Solaris support (?) (Not tested under Solaris yet)
881 # Revision 1.17 2001/07/28 16:44:54 oes
882 # Fixed sed LF->CRLF conversion and removed deprecated files
884 # Revision 1.16 2001/07/15 19:45:33 jongfoster
885 # Added support for linking with POSIX threads library
887 # Revision 1.15 2001/07/13 13:48:07 oes
888 # - Moved STATIC #define for pcre to (ac)config.h
889 # - Made -Ipcre depandant on static pcre compilation to
890 # avoid version conflicts
891 # - Included compilation and depandancies for new deanimate.c
892 # - Made changes to the pcre/pcreposix/pcrs build process
893 # as required by the new library autodetection in
896 # Revision 1.14 2001/07/01 16:27:44 oes
897 # Fixed misplaced dependancy
899 # Revision 1.13 2001/06/29 13:18:36 oes
900 # - added depandancy of filters.o on cgi.h
902 # Revision 1.12 2001/06/12 17:15:56 swa
903 # fixes, because a clean build on rh6.1 was impossible.
904 # GZIP confuses make, %configure confuses rpm, etc.
906 # Revision 1.11 2001/06/11 11:26:35 sarantis
907 # RPM version should be the same as ijbswa version. The rpm release is
908 # specified in the specfile.
910 # Revision 1.10 2001/06/07 17:27:45 swa
911 # added suse build section
913 # Revision 1.9 2001/06/04 18:31:58 swa
914 # files are now prefixed with either `confdir' or `logdir'.
915 # `make redhat-dist' replaces both entries confdir and logdir
918 # Revision 1.8 2001/06/04 10:44:57 swa
919 # `make redhatr-dist' now works. Except for the paths
920 # in the config file.
922 # Revision 1.7 2001/06/03 17:09:09 swa
923 # swa for oes: reversed my earlier change
925 # Revision 1.6 2001/06/03 17:07:27 swa
928 # Revision 1.5 2001/06/03 13:57:26 swa
929 # compile cgi.c (for andreas' GUI)
931 # Revision 1.4 2001/05/31 21:18:45 jongfoster
932 # Added files actions.[ch], actionlist.h, list.[ch] to Makefile
934 # Revision 1.3 2001/05/29 20:02:48 joergs
935 # Changes for AmigaOS added.
937 # Revision 1.2 2001/05/17 22:23:23 oes
938 # - Added auto-generation of CRLFs for Win32 config files
939 # - Added comment-prefix to all Win32-only options in the config file
940 # and provided auto stripping of this prefix for the Win32 platform by make
942 # Revision 1.1.1.1 2001/05/15 13:59:00 oes
943 # Initial import of version 2.9.3 source tree