From: Willy Tarreau Date: Sun, 15 Oct 2006 21:50:42 +0000 (+0200) Subject: [BUILD] Makefile.bsd is functionnal again. X-Git-Tag: v1.3.3~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4eeec0967df0139a951ee390e3cdc93d8d518074;p=thirdparty%2Fhaproxy.git [BUILD] Makefile.bsd is functionnal again. --- diff --git a/Makefile.bsd b/Makefile.bsd index cf190ef1f3..5fe7ab1a5e 100644 --- a/Makefile.bsd +++ b/Makefile.bsd @@ -1,4 +1,8 @@ # This makefile is dedicated to OpenBSD (and possibly other BSDs) +# You should use it this way : +# make TARGET=os CPU=cpu + +VERSION := 1.3.2 # Select target OS. TARGET must match a system for which COPTS and LIBS are # correctly defined below. @@ -20,9 +24,11 @@ REGEX=libc CC = gcc LD = gcc -PCREDIR=/usr/local +# This is the directory hosting include/pcre.h and lib/libpcre.* when REGEX=pcre +PCREDIR!= pcre-config --prefix 2>/dev/null || : +#PCREDIR=/usr/local -# This is for OpenBSD 3.0 +# This is for OpenBSD 3.0 and above COPTS.openbsd = -DENABLE_POLL LIBS.openbsd = @@ -61,7 +67,7 @@ ADDINC = ADDLIB = # set some defines when needed. -# Known ones are -DENABLE_POLL, -DENABLE_EPOLL, and -DUSE_MY_EPOLL +# Known ones are -DENABLE_POLL # - use -DTPROXY to compile with transparent proxy support. DEFINE = -DTPROXY @@ -70,35 +76,30 @@ TARGET_OPTS=$(COPTS.$(TARGET)) REGEX_OPTS=$(COPTS.$(REGEX)) CPU_OPTS=$(COPTS.$(CPU)) -COPTS=-I. $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) $(REGEX_OPTS) $(SMALL_OPTS) $(DEFINE) +COPTS=-Iinclude $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) $(REGEX_OPTS) $(SMALL_OPTS) $(DEFINE) LIBS=$(LIBS.$(TARGET)) $(LIBS.$(REGEX)) $(ADDLIB) CFLAGS = -Wall $(COPTS) $(DEBUG) LDFLAGS = -g +OBJS = src/haproxy.o src/list.o src/chtbl.o src/hashpjw.o src/base64.o \ + src/uri_auth.o src/standard.o src/buffers.o src/log.o src/task.o \ + src/time.o src/fd.o src/regex.o src/cfgparse.o src/server.o \ + src/checks.o src/queue.o src/capture.o src/client.o src/proxy.o \ + src/proto_http.o src/stream_sock.o src/appsession.o src/backend.o \ + src/session.o + all: haproxy -haproxy: src/list.o src/chtbl.o src/hashpjw.o haproxy.o src/base64.o src/uri_auth.o +haproxy: $(OBJS) $(LD) $(LDFLAGS) -o $@ $> $(LIBS) -src/base64.o: src/base64.c - $(CC) $(CFLAGS) -c -o $@ $< - -src/uri_auth.o: src/uri_auth.c - $(CC) $(CFLAGS) -c -o $@ $< - -src/list.o: src/list.c - $(CC) $(CFLAGS) -c -o $@ $< +.SUFFIXES: .c.o -src/chtbl.o: src/chtbl.c - $(CC) $(CFLAGS) -c -o $@ $< - -src/hashpjw.o: src/hashpjw.c - $(CC) $(CFLAGS) -c -o $@ $< - -haproxy.o: haproxy.c - $(CC) $(CFLAGS) -c -o $@ $< +.c.o: + $(CC) $(CFLAGS) -c -o $@ $> clean: - rm -f *.[oas] *~ *.rej core haproxy test nohup.out gmon.out src/*.[oas] - + rm -f *.[oas] src/*.[oas] core haproxy test + for dir in . src include/* doc; do rm -f $$dir/*~ $$dir/*.rej;done + rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION) nohup.out gmon.out