Sure either way I m ok with the changes decided. Thanks ! On 27 December 2017 at 18:40, Willy Tarreau <w...@1wt.eu> wrote:
> Thank you. I'll check with Christopher once he's back but I think that > should be OK this way. I may have a suggestion (we'll edit before merging, > don't worry) : > > On Wed, Dec 27, 2017 at 06:26:56PM +0000, David CARLIER wrote: > > From 2e76de286db0e4672a9173e52a070e4b61452983 Mon Sep 17 00:00:00 2001 > > From: David Carlier <devne...@gmail.com> > > Date: Wed, 27 Dec 2017 13:19:14 +0000 > > Subject: [PATCH] BUILD/SMALL: contrib : spoa example > > > > Change to the build to be able to build it in systems > > different than Linux. > > --- > > contrib/spoa_example/Makefile | 8 ++++++-- > > contrib/spoa_example/spoa.c | 2 +- > > 2 files changed, 7 insertions(+), 3 deletions(-) > > > > diff --git a/contrib/spoa_example/Makefile b/contrib/spoa_example/ > Makefile > > index c44c2b879..548d280ba 100644 > > --- a/contrib/spoa_example/Makefile > > +++ b/contrib/spoa_example/Makefile > > @@ -5,9 +5,13 @@ BINDIR = $(PREFIX)/bin > > CC = gcc > > LD = $(CC) > > > > +EVENTINC = $(PREFIX)/include > > +EVENTLIB = $(PREFIX)/lib > > +EVENTLIBNM = event > > + > > CFLAGS = -g -O2 -Wall -Werror -pthread > > -INCS += -I../../ebtree -I./include > > -LIBS = -lpthread -levent -levent_pthreads > > +INCS += -I../../ebtree -I./include -I$(EVENTINC) > > +LIBS = -lpthread -l$(EVENTLIBNM) -levent_pthreads -L$(EVENTLIB) > > Here we could add the -I/-L only if the variable isn't empty, allowing > to use the build system's path only if relevant (very convenient when > cross-compiling as you generally have all your libs in the sysroot but > you never know the sysroot path well) : > > INCS += -I../../ebtree -I./include $(if $(EVENTINC),-I$(EVENTINC)) > LIBS = -lpthread -l$(EVENTLIBNM) -levent_pthreads $(if > $(EVENTLIB),-L$(EVENTLIB)) > > I'm just seeing we already have similar ones in the main Makefile for > certain options (SLZ/SLIB/SSL/LUA). > > Cheers, > Willy >