freebsd-ports/net/haproxy-devel/files/patch-Makefile.bsd
Xin LI 96b14bdcd4 Update to 1.3.14. [1]
Add a 'reload' subcommand to rc.d startup script. [2]

Submitted by:	p.rybicki cadera.com.pl [2]
		delphij [1]
PR:		ports/119755 [1]
Approved by:	maintainer
2008-01-21 07:54:44 +00:00

96 lines
2.8 KiB
Text

--- ./Makefile.bsd.orig 2007-12-05 16:25:44.000000000 -0800
+++ ./Makefile.bsd 2008-01-17 11:26:47.695860700 -0800
@@ -1,4 +1,4 @@
-# This makefile is dedicated to OpenBSD (and possibly other BSDs)
+# This makefile is dedicated to FreeBSD (and possibly other BSDs)
# You should use it this way :
# make TARGET=os CPU=cpu
#
@@ -9,31 +9,31 @@
# Select target OS. TARGET must match a system for which COPTS and LIBS are
# correctly defined below.
-TARGET = openbsd
+TARGET = freebsd
# pass CPU=<cpu_name> to make to optimize for a particular CPU
-CPU = generic
+#CPU = generic
#CPU = i586
#CPU = i686
#CPU = ultrasparc
# By default, we use libc's regex. WARNING! On Solaris 8/Sparc, group
# references seem broken using libc ! Use pcre instead.
-REGEX=libc
+REGEX?=libc
#REGEX=pcre
#REGEX=static-pcre
# tools options
-CC = gcc
-LD = gcc
+CC? = gcc
+LD? = gcc
# This is the directory hosting include/pcre.h and lib/libpcre.* when REGEX=pcre
-PCREDIR!= pcre-config --prefix 2>/dev/null || :
-#PCREDIR=/usr/local
+#PCREDIR!= pcre-config --prefix 2>/dev/null || :
+PCREDIR=${LOCALBASE}
-# This is for OpenBSD 3.0 and above
-COPTS.openbsd = -DENABLE_POLL -DENABLE_KQUEUE
-LIBS.openbsd =
+# This is for FreeBSD
+COPTS.freebsd = -DENABLE_POLL -DENABLE_KQUEUE
+LIBS.freebsd =
# CPU dependant optimizations
COPTS.generic = -O2
@@ -55,7 +55,7 @@
# you can enable debug arguments with "DEBUG=-g" or disable them with "DEBUG="
#DEBUG = -g -DDEBUG_MEMORY -DDEBUG_FULL
-DEBUG = -g
+#DEBUG = -g
# if small memory footprint is required, you can reduce the buffer size. There
# are 2 buffers per concurrent session, so 16 kB buffers will eat 32 MB memory
@@ -63,7 +63,7 @@
# will avoid the additionnal paramters to overflow a page. 8030 bytes is
# exactly 5.5 TCP segments of 1460 bytes.
#SMALL_OPTS =
-SMALL_OPTS = -DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024
+#SMALL_OPTS = -DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024
# redefine this if you want to add some special PATH to include/libs
ADDINC =
@@ -75,7 +75,7 @@
# set some defines when needed.
# Known ones are -DENABLE_POLL
# - use -DTPROXY to compile with transparent proxy support.
-DEFINE = -DTPROXY
+#DEFINE = -DTPROXY
# May be changed to patch PAGE_SIZE on every platform when using dlmalloc
DLMALLOC_THRES=4096
@@ -95,7 +95,7 @@
COPTS = -Iinclude $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) $(REGEX_OPTS) \
$(SMALL_OPTS) $(VER_OPTS) $(DEFINE)
LIBS = $(LIBS.$(TARGET)) $(LIBS.$(REGEX)) $(ADDLIB)
-CFLAGS = -Wall $(COPTS) $(DEBUG)
+CFLAGS = -Wall $(COPTS)
LDFLAGS = -g
OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \
@@ -112,7 +112,8 @@
all: haproxy
haproxy: $(OBJS) $(OPT_OBJS)
- $(LD) $(LDFLAGS) -o $@ $> $(LIBS)
+# $(LD) $(LDFLAGS) -o $@ $> $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $> $(LIBS)
.SUFFIXES: .c.o