]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: addons: convert deviceatlas addon to EXTRA_MAKE
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 28 May 2026 14:25:44 +0000 (16:25 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 28 May 2026 14:45:27 +0000 (16:45 +0200)
Move the deviceatlas Makefile.inc to Makefile.mk so it can be used with
EXTRA_MAKE and allow to cleanup the main Makefile.

EXTRA_MAKE paths are appended with /Makefile.mk via addsuffix, so the
path must not have a trailing slash.

Shouldn't have impact on the build system, every build variable
previously used are the same.

Makefile
addons/deviceatlas/Makefile.mk [moved from addons/deviceatlas/Makefile.inc with 71% similarity]

index e799a19acc035c619f5049a77c448d6249d2322c..ff72d0f95c44d9b56f885c9fdd824760abc5becb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -722,14 +722,7 @@ ifneq ($(USE_PROMEX:0=),)
 endif
 
 ifneq ($(USE_DEVICEATLAS:0=),)
-  # Use DEVICEATLAS_SRC and possibly DEVICEATLAS_INC and DEVICEATLAS_LIB to force path
-  # to DeviceAtlas headers and libraries if needed. In this context, DEVICEATLAS_NOCACHE
-  # can be used to disable the cache support if needed (this also removes the necessity of having
-  # a C++ toolchain installed).
-  DEVICEATLAS_INC = $(DEVICEATLAS_SRC)
-  DEVICEATLAS_LIB = $(DEVICEATLAS_SRC)
-  include addons/deviceatlas/Makefile.inc
-  OPTIONS_OBJS += addons/deviceatlas/da.o
+  EXTRA_MAKE += addons/deviceatlas
 endif
 
 ifneq ($(USE_51DEGREES:0=),)
similarity index 71%
rename from addons/deviceatlas/Makefile.inc
rename to addons/deviceatlas/Makefile.mk
index b144f883b48c2b2ef53ca2f149ebc24c9d5ed786..00ec04dbefdeaa68d160343394c6e2b4e7aa7dfe 100644 (file)
@@ -1,6 +1,13 @@
 # DEVICEATLAS_SRC     : DeviceAtlas API source root path
 
 
+# Use DEVICEATLAS_SRC and possibly DEVICEATLAS_INC and DEVICEATLAS_LIB to force path
+# to DeviceAtlas headers and libraries if needed. In this context, DEVICEATLAS_NOCACHE
+# can be used to disable the cache support if needed (this also removes the necessity of having
+# a C++ toolchain installed).
+DEVICEATLAS_INC = $(DEVICEATLAS_SRC)
+DEVICEATLAS_LIB = $(DEVICEATLAS_SRC)
+
 CXX             := c++
 CXXLIB          := -lstdc++
 
@@ -28,5 +35,7 @@ OPTIONS_OBJS    += $(DEVICEATLAS_SRC)/dadwcurl.o
 OPTIONS_OBJS    += $(DEVICEATLAS_SRC)/Os/daunix.o
 endif
 
+OPTIONS_OBJS += addons/deviceatlas/da.o
+
 addons/deviceatlas/dummy/%.o:    addons/deviceatlas/dummy/%.cpp
        $(cmd_CXX) $(CXXFLAGS) -c -o $@ $<