a41a8b4ee6
* 'listen' now supports optionnal address:port-range lists * 'bind' introduced to add new listen addresses * fixed a bug which caused a session to be kept established on a server till it timed out if the client closed during the DATA phase. * the port part of each server address can now be empty to make the proxy connect to the server on the same port it was connected to, be an absolute unsigned number to reflect a single port (as in older versions), or an explicitly signed number (+N/-N) to indicate that this offset must be applied to the port the proxy was connected to, when connecting to the server. * the 'port' server option allows the user to specify a different health-check port than the service one. It is mandatory when only relative ports have been specified and check is required. By default, the checks are sent to the service port. * new 'defaults' section which is rather similar to 'listen' except that all values are only used as default values for future 'listen' sections, until a new 'defaults' resets them. At the moment, server options, regexes, cookie names and captures cannot be set in the 'defaults' section. * Makefile now optimizes for Ultrasparc by default on Solaris/Sparc * large documentation updates and fixes * new 'tests' directory with some debug files
70 lines
1.6 KiB
Makefile
70 lines
1.6 KiB
Makefile
# Select target OS. TARGET must match a system for which COPTS and LIBS are
|
|
# correctly defined below.
|
|
# You can set it on make's command line. eg: make TARGET=solaris
|
|
TARGET = linux24
|
|
#TARGET = linux22
|
|
#TARGET = solaris
|
|
#TARGET = solarisv9
|
|
#TARGET = openbsd
|
|
|
|
CC = gcc
|
|
LD = gcc
|
|
|
|
# By default, we use libc's regex.
|
|
REGEX=libc
|
|
#REGEX=pcre
|
|
|
|
# This is the directory hosting include/pcre.h and lib/libpcre.* when REGEX=pcre
|
|
PCREDIR := $(shell pcre-config --prefix 2>/dev/null || :)
|
|
#PCREDIR=/usr/local
|
|
|
|
# This is for Linux 2.4 with netfilter
|
|
COPTS.linux24 = -O2 -DNETFILTER
|
|
LIBS.linux24 =
|
|
|
|
# This is for Linux 2.2
|
|
COPTS.linux22 = -O2 -DUSE_GETSOCKNAME
|
|
LIBS.linux22 =
|
|
|
|
# This is for Solaris 8
|
|
COPTS.solaris = -O2 -fomit-frame-pointer -DSOLARIS
|
|
LIBS.solaris = -lnsl -lsocket
|
|
|
|
# This is for Solaris 8 on UltraSparc2 processor
|
|
COPTS.solarisv9 = -O6 -mcpu=v9 -mtune=ultrasparc -fomit-frame-pointer -DSOLARIS
|
|
LIBS.solarisv9 = -lnsl -lsocket
|
|
|
|
# This is for OpenBSD 3.0
|
|
COPTS.openbsd = -O2
|
|
LIBS.openbsd =
|
|
|
|
COPTS.libc=
|
|
LIBS.libs=
|
|
|
|
COPTS.pcre=-DUSE_PCRE -I$(PCREDIR)/include
|
|
LIBS.pcre=-L$(PCREDIR)/lib -lpcreposix -lpcre
|
|
|
|
#DEBUG =
|
|
DEBUG = -g
|
|
|
|
COPTS=$(COPTS.$(TARGET)) $(COPTS.$(REGEX))
|
|
LIBS=$(LIBS.$(TARGET)) $(LIBS.$(REGEX))
|
|
|
|
# - use -DSTATTIME=0 to disable statistics, else specify an interval in
|
|
# milliseconds.
|
|
# - use -DTPROXY to compile with transparent proxy support.
|
|
CFLAGS = -Wall $(COPTS) $(DEBUG) -DSTATTIME=0 -DTPROXY
|
|
LDFLAGS = -g
|
|
|
|
all: haproxy
|
|
|
|
haproxy: haproxy.o
|
|
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
rm -f *.[oas] *~ core haproxy test nohup.out gmon.out
|
|
|