~ubuntu-branches/debian/stretch/haproxy/stretch

« back to all changes in this revision

Viewing changes to Makefile.osx

  • Committer: Package Import Robot
  • Author(s): Apollon Oikonomopoulos
  • Date: 2014-06-20 11:05:17 UTC
  • mfrom: (1.1.15) (15.1.12 experimental)
  • Revision ID: package-import@ubuntu.com-20140620110517-u6q5p9kyy2f3ozw9
Tags: 1.5.0-1
* New upstream stable series. Notable changes since the 1.4 series:
  + Native SSL support on both sides with SNI/NPN/ALPN and OCSP stapling.
  + IPv6 and UNIX sockets are supported everywhere
  + End-to-end HTTP keep-alive for better support of NTLM and improved
    efficiency in static farms
  + HTTP/1.1 response compression (deflate, gzip) to save bandwidth
  + PROXY protocol versions 1 and 2 on both sides
  + Data sampling on everything in request or response, including payload
  + ACLs can use any matching method with any input sample
  + Maps and dynamic ACLs updatable from the CLI
  + Stick-tables support counters to track activity on any input sample
  + Custom format for logs, unique-id, header rewriting, and redirects
  + Improved health checks (SSL, scripted TCP, check agent, ...)
  + Much more scalable configuration supports hundreds of thousands of
    backends and certificates without sweating

* Upload to unstable, merge all 1.5 work from experimental. Most important
  packaging changes since 1.4.25-1 include:
  + systemd support.
  + A more sane default config file.
  + Zero-downtime upgrades between 1.5 releases by gracefully reloading
    HAProxy during upgrades.
  + HTML documentation shipped in the haproxy-doc package.
  + kqueue support for kfreebsd.

* Packaging changes since 1.5~dev26-2:
  + Drop patches merged upstream:
    o Fix-reference-location-in-manpage.patch
    o 0001-BUILD-stats-workaround-stupid-and-bogus-Werror-forma.patch
  + d/watch: look for stable 1.5 releases
  + systemd: respect CONFIG and EXTRAOPTS when specified in
    /etc/default/haproxy.
  + initscript: test the configuration before start or reload.
  + initscript: remove the ENABLED flag and logic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# This makefile is dedicated to darwin (and possibly other BSDs)
2
 
# You should use it this way :
3
 
#   make TARGET=os CPU=cpu
4
 
#
5
 
# Some optional components may be added, such as DLMALLOC :
6
 
#
7
 
#   make DLMALLOC_SRC=/usr/local/src/dlmalloc.c \
8
 
#        OPT_OBJS=src/dlmalloc.o
9
 
 
10
 
# Select target OS. TARGET must match a system for which COPTS and LIBS are
11
 
# correctly defined below.
12
 
TARGET = generic
13
 
 
14
 
# pass CPU=<cpu_name> to make to optimize for a particular CPU
15
 
CPU = generic
16
 
#CPU = native
17
 
#CPU = i586
18
 
#CPU = i686
19
 
#CPU = ultrasparc
20
 
 
21
 
# By default, we use libc's regex. WARNING! On Solaris 8/Sparc, group
22
 
# references seem broken using libc ! Use pcre instead.
23
 
REGEX=libc
24
 
#REGEX=pcre
25
 
#REGEX=static-pcre
26
 
 
27
 
# tools options
28
 
CC = gcc
29
 
LD = gcc
30
 
 
31
 
# This is the directory hosting include/pcre.h and lib/libpcre.* when REGEX=pcre
32
 
PCREDIR!= pcre-config --prefix 2>/dev/null || :
33
 
#PCREDIR=/usr/local
34
 
 
35
 
# This one can be changed to look for ebtree files in an external directory
36
 
EBTREE_DIR = ebtree
37
 
 
38
 
# This is for darwin 3.0 and above
39
 
COPTS.darwin = -DENABLE_POLL -DENABLE_KQUEUE
40
 
LIBS.darwin =
41
 
 
42
 
# CPU dependant optimizations
43
 
COPTS.generic = -O2
44
 
COPTS.native = -O2 -march=native
45
 
COPTS.i586 = -O2 -march=i586
46
 
COPTS.i686 = -O2 -march=i686
47
 
COPTS.ultrasparc = -O6 -mcpu=v9 -mtune=ultrasparc
48
 
 
49
 
# options for standard regex library
50
 
COPTS.libc=
51
 
LIBS.libc=
52
 
 
53
 
# options for libpcre
54
 
COPTS.pcre=-DUSE_PCRE -I$(PCREDIR)/include
55
 
LIBS.pcre=-L$(PCREDIR)/lib -lpcreposix -lpcre
56
 
 
57
 
# options for static libpcre
58
 
COPTS.static-pcre=-DUSE_PCRE -I$(PCREDIR)/include
59
 
LIBS.static-pcre=-L$(PCREDIR)/lib -Wl,-Bstatic -lpcreposix -lpcre -Wl,-Bdynamic
60
 
 
61
 
# you can enable debug arguments with "DEBUG=-g" or disable them with "DEBUG="
62
 
#DEBUG = -g -DDEBUG_MEMORY -DDEBUG_FULL
63
 
DEBUG = -g
64
 
 
65
 
# if small memory footprint is required, you can reduce the buffer size. There
66
 
# are 2 buffers per concurrent session, so 16 kB buffers will eat 32 MB memory
67
 
# with 1000 concurrent sessions. Putting it slightly lower than a page size
68
 
# will avoid the additionnal paramters to overflow a page. 8030 bytes is
69
 
# exactly 5.5 TCP segments of 1460 bytes.
70
 
#SMALL_OPTS =
71
 
SMALL_OPTS = -DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024
72
 
 
73
 
# redefine this if you want to add some special PATH to include/libs
74
 
ADDINC =
75
 
ADDLIB =
76
 
 
77
 
# set some defines when needed.
78
 
# Known ones are -DENABLE_POLL
79
 
# - use -DTPROXY to compile with transparent proxy support.
80
 
DEFINE = -DTPROXY 
81
 
 
82
 
# May be changed to patch PAGE_SIZE on every platform when using dlmalloc
83
 
DLMALLOC_THRES=4096
84
 
 
85
 
# global options
86
 
TARGET_OPTS=$(COPTS.$(TARGET))
87
 
REGEX_OPTS=$(COPTS.$(REGEX))
88
 
CPU_OPTS=$(COPTS.$(CPU))
89
 
SPEC_OPTS=-fno-strict-aliasing
90
 
 
91
 
VERSION != cat VERSION 2>/dev/null || touch VERSION
92
 
SUBVERS != cat SUBVERS 2>/dev/null || touch SUBVERS
93
 
VERDATE != cat VERDATE 2>/dev/null || touch VERDATE
94
 
 
95
 
VER_OPTS := -DCONFIG_HAPROXY_VERSION=\"$(VERSION)$(SUBVERS)\" \
96
 
            -DCONFIG_HAPROXY_DATE=\"$(VERDATE)\"
97
 
 
98
 
COPTS   = -Iinclude -I$(EBTREE_DIR) $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) \
99
 
          $(SPEC_OPTS) $(REGEX_OPTS) $(SMALL_OPTS) $(VER_OPTS) $(DEFINE)
100
 
LIBS    = $(LIBS.$(TARGET)) $(LIBS.$(REGEX)) $(ADDLIB)
101
 
CFLAGS  = -Wall $(COPTS) $(DEBUG) -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4
102
 
LDFLAGS = -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4
103
 
 
104
 
OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \
105
 
       src/uri_auth.o src/standard.o src/buffers.o src/log.o src/task.o \
106
 
       src/time.o src/fd.o src/pipe.o src/regex.o src/cfgparse.o src/server.o \
107
 
       src/checks.o src/queue.o src/client.o src/proxy.o src/proto_uxst.o \
108
 
       src/proto_http.o src/stream_sock.o src/appsession.o src/backend.o \
109
 
       src/stream_interface.o src/dumpstats.o src/proto_tcp.o \
110
 
       src/session.o src/hdr_idx.o src/ev_select.o src/signal.o \
111
 
       src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o \
112
 
       src/ev_poll.o \
113
 
       src/acl.o src/memory.o src/freq_ctr.o \
114
 
       src/auth.o src/stick_table.o src/pattern.o
115
 
 
116
 
EBTREE_OBJS = $(EBTREE_DIR)/ebtree.o \
117
 
              $(EBTREE_DIR)/eb32tree.o $(EBTREE_DIR)/eb64tree.o \
118
 
              $(EBTREE_DIR)/ebmbtree.o $(EBTREE_DIR)/ebsttree.o \
119
 
              $(EBTREE_DIR)/ebimtree.o $(EBTREE_DIR)/ebistree.o
120
 
 
121
 
all: haproxy
122
 
 
123
 
haproxy: $(OBJS) $(EBTREE_OBJS)
124
 
        $(LD) $(LDFLAGS) $(OBJS) $(EBTREE_OBJS) -o $@
125
 
 
126
 
.SUFFIXES: .c.o
127
 
 
128
 
.c.o:
129
 
        $(CC) $(CFLAGS) -c -o $@ $<
130
 
 
131
 
src/haproxy.o: src/haproxy.c
132
 
        $(CC) $(CFLAGS) -DBUILD_TARGET='"$(TARGET)"' -DBUILD_CC='"$(CC)"' \
133
 
                        -DBUILD_CPU='"$(CPU)"' -DBUILD_REGEX='"$(REGEX)"' \
134
 
                        -DBUILD_OPTS='"$(COPTS)"' -c -o $@ $<
135
 
 
136
 
src/dlmalloc.o: $(DLMALLOC_SRC)
137
 
        $(CC) $(CFLAGS) -DDEFAULT_MMAP_THRESHOLD=$(DLMALLOC_THRES) -c -o $@ $<
138
 
 
139
 
clean:
140
 
        rm -f *.[oas] src/*.[oas] ebtree/*.[oas] haproxy test
141
 
        for dir in . src include/* doc ebtree; do rm -f $$dir/*~ $$dir/*.rej $$dir/core; done
142
 
        rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION) nohup.out gmon.out
143
 
 
144
 
version:
145
 
        @echo "VERSION: $(VERSION)"
146
 
        @echo "SUBVERS: $(SUBVERS)"
147
 
        @echo "VERDATE: $(VERDATE)"