]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: make DeviceAtlas easier to build by defaulting to DEVICEATLAS_SRC
authorWilly Tarreau <w@1wt.eu>
Tue, 2 Jun 2015 12:10:28 +0000 (14:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Jun 2015 17:30:59 +0000 (19:30 +0200)
Since both DEVICEATLAS_INC and DEVICEATLAS_LIB are set to the same path
when building from sources, simply allow DEVICEATLAS_SRC to be set alone
to simplify the build procedure.

Makefile
README

index 219c076694d4d54413b47b3b247db438803c1b82..10de1deae9132dd8cfe847923a548a8ae738ff90 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -603,8 +603,11 @@ OPTIONS_OBJS    += src/hlua.o
 endif
 
 ifneq ($(USE_DEVICEATLAS),)
-DEVICEATLAS_INC =
-DEVICEATLAS_LIB =
+# Use DEVICEATLAS_SRC and possibly DEVICEATLAS_INC and DEVICEATLAS_LIB to force path
+# to 51degrees headers and libraries if needed.
+DEVICEATLAS_SRC =
+DEVICEATLAS_INC = $(DEVICEATLAS_SRC)
+DEVICEATLAS_LIB = $(DEVICEATLAS_SRC)
 OPTIONS_OBJS   += $(DEVICEATLAS_LIB)/json.o
 OPTIONS_OBJS   += $(DEVICEATLAS_LIB)/dac.o
 OPTIONS_OBJS   += src/da.o
diff --git a/README b/README
index 3d7df12f2b1aad4def6e543e51bc5f8719e77669..ab007643ebfb8b8d1581e46fb43944f97ff93bbe 100644 (file)
--- a/README
+++ b/README
@@ -211,7 +211,11 @@ In order to add DeviceAtlas Device Detection support, you would need to download
 the API source code from https://deviceatlas.com/deviceatlas-haproxy-module and
 once extracted :
 
-    $ make TARGET=<target> USE_PCRE=1 USE_DEVICEATLAS=1 DEVICEATLAS_INC=<path to the API root folder> DEVICEATLAS_LIB=<path to the API root folder>
+    $ make TARGET=<target> USE_PCRE=1 USE_DEVICEATLAS=1 DEVICEATLAS_SRC=<path to the API root folder>
+
+Optionally DEVICEATLAS_INC and DEVICEATLAS_LIB may be set to override the path
+to the include files and libraries respectively if they're not in the source
+directory.
 
 These are supported DeviceAtlas directives (see doc/configuration.txt) :
   - deviceatlas-json-file <path to the DeviceAtlas JSON data file>.