From: Apollon Oikonomopoulos Date: Tue, 2 Jul 2013 12:24:59 +0000 (+0300) Subject: Use dpkg-buildflags to build halog X-Git-Tag: archive/raspbian/2.2.7-1+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=26a1a1960694c6e0c854b07f3a0a8e6c1f9f436e;p=haproxy.git Use dpkg-buildflags to build halog Forwarded: no Last-Update: 2013-07-02 Gbp-Pq: Name 0002-Use-dpkg-buildflags-to-build-halog.patch --- diff --git a/contrib/halog/Makefile b/contrib/halog/Makefile index bf67c1f..686a81c 100644 --- a/contrib/halog/Makefile +++ b/contrib/halog/Makefile @@ -1,22 +1,16 @@ INCLUDE = -I../../include SRC = ../../src -CC = gcc - -# note: it is recommended to also add -fomit-frame-pointer on i386 -OPTIMIZE = -O3 +CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) +CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) +LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -# most recent glibc provide platform-specific optimizations that make -# memchr faster than the generic C implementation (eg: SSE and prefetch -# on x86_64). Try with an without. In general, on x86_64 it's better to -# use memchr using the define below. -# DEFINE = -DUSE_MEMCHR -DEFINE = +CC = gcc OBJS = halog halog: halog.c fgets2.c - $(CC) $(OPTIMIZE) $(DEFINE) -o $@ $(INCLUDE) $(SRC)/ebtree.c $(SRC)/eb32tree.c $(SRC)/eb64tree.c $(SRC)/ebmbtree.c $(SRC)/ebsttree.c $(SRC)/ebistree.c $(SRC)/ebimtree.c $^ + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDE) $(SRC)/ebtree.c $(SRC)/eb32tree.c $(SRC)/eb64tree.c $(SRC)/ebmbtree.c $(SRC)/ebsttree.c $(SRC)/ebistree.c $(SRC)/ebimtree.c $^ clean: rm -f $(OBJS) *.[oas]