Makefile.mingw 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. PREFIX = Polipo
  2. BINDIR = $(PREFIX)\bin
  3. MANDIR = $(PREFIX)\man
  4. INFODIR = $(PREFIX)\info
  5. LOCAL_ROOT = $(PREFIX)
  6. DISK_CACHE_ROOT = $(PREFIX)\cache
  7. # To compile with Unix CC:
  8. # CDEBUGFLAGS=-O
  9. # To compile with GCC:
  10. # CC = gcc
  11. # CDEBUGFLAGS = -Os -g -Wall -std=gnu99
  12. CDEBUGFLAGS = -Os -g -Wall
  13. # CDEBUGFLAGS = -Os -Wall
  14. # CDEBUGFLAGS = -g -Wall
  15. # To compile on a pure POSIX system:
  16. # CC = c89
  17. # CC = c99
  18. # CDEBUGFLAGS=-O
  19. # To compile with icc 7, you need -restrict. (Their bug.)
  20. # CC=icc
  21. # CDEBUGFLAGS = -O -restrict
  22. # On System V (Solaris, HP/UX) you need the following:
  23. # PLATFORM_DEFINES = -DSVR4
  24. # On Solaris, you need the following:
  25. # LDLIBS = -lsocket -lnsl -lresolv
  26. # On mingw, you need
  27. EXE=.exe
  28. LDLIBS = -lwsock32 -lregex
  29. FILE_DEFINES = -DHAVE_REGEX
  30. # You may optionally also add any of the following to DEFINES:
  31. #
  32. # -DNO_DISK_CACHE to compile out the on-disk cache and local web server;
  33. # -DNO_IPv6 to avoid using the RFC 3493 API and stick to stock
  34. # Berkeley sockets;
  35. # -DHAVE_IPv6 to force the use of the RFC 3493 API on systems other
  36. # than GNU/Linux and BSD (let me know if it works);
  37. # -DNO_FANCY_RESOLVER to compile out the asynchronous name resolution
  38. # code;
  39. # -DNO_STANDARD_RESOLVER to compile out the code that falls back to
  40. # gethostbyname/getaddrinfo when DNS requests fail;
  41. # -DNO_TUNNEL to compile out the code that handles CONNECT requests;
  42. # -DNO_SOCKS to compile out the SOCKS gateway code.
  43. # -DNO_FORBIDDEN to compile out the all of the forbidden URL code
  44. # -DNO_REDIRECTOR to compile out the Squid-style redirector code
  45. # -DNO_SYSLOG to compile out logging to syslog
  46. DEFINES = $(FILE_DEFINES) $(PLATFORM_DEFINES)
  47. CFLAGS = $(MD5INCLUDES) $(CDEBUGFLAGS) $(DEFINES) $(EXTRA_DEFINES)
  48. SRCS = util.c event.c io.c chunk.c atom.c object.c log.c diskcache.c main.c \
  49. config.c local.c http.c client.c server.c auth.c tunnel.c \
  50. http_parse.c parse_time.c dns.c forbidden.c \
  51. md5import.c md5.c ftsimport.c fts_compat.c socks.c mingw.c
  52. OBJS = util.o event.o io.o chunk.o atom.o object.o log.o diskcache.o main.o \
  53. config.o local.o http.o client.o server.o auth.o tunnel.o \
  54. http_parse.o parse_time.o dns.o forbidden.o \
  55. md5import.o ftsimport.o socks.o mingw.o
  56. polipo$(EXE): $(OBJS)
  57. $(CC) $(CFLAGS) $(LDFLAGS) -o polipo$(EXE) $(OBJS) $(MD5LIBS) $(LDLIBS)
  58. ftsimport.o: ftsimport.c fts_compat.c
  59. md5import.o: md5import.c md5.c
  60. .PHONY: all install install.binary install.man
  61. all: polipo$(EXE) polipo.info html/index.html localindex.html
  62. TAGS: $(SRCS)
  63. etags $(SRCS)
  64. .PHONY: clean
  65. clean:
  66. -rm -f polipo$(EXE) *.o *~ core TAGS gmon.out
  67. -rm -f polipo.cp polipo.fn polipo.log polipo.vr
  68. -rm -f polipo.cps polipo.info* polipo.pg polipo.toc polipo.vrs
  69. -rm -f polipo.aux polipo.dvi polipo.ky polipo.ps polipo.tp
  70. -rm -f polipo.dvi polipo.ps polipo.ps.gz polipo.pdf polipo.html
  71. -rm -rf ./html/
  72. -rm -f polipo.man.html