chiark / gitweb /
Makefile, chain.c: Use Xyla found using `pkg-config'. master
authorMark Wooding <mdw@distorted.org.uk>
Thu, 3 Apr 2025 19:42:14 +0000 (20:42 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 3 Apr 2025 19:42:14 +0000 (20:42 +0100)
Makefile
chain.c

index bbcd22b2c359fa16ba0b63b30fa1690caf46827d..fe5d8c335b2ff2aa8183bb5b02b6116db41f34ae 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -84,8 +84,8 @@ VPATH                  =
 TREELIBS               += xyla
 xyla_VARIANTS           = avl rb splay treap
 XYLADIR                         = $(HOME)/src/xyla
-xyla_LIBS               = $(XYLADIR)/build/.libs/libxyla.a
-xyla_CFLAGS             = -I$(XYLADIR)
+xyla_LIBS              := $(shell pkg-config --libs xyla)
+xyla_CFLAGS            := $(shell pkg-config --cflags xyla)
 xyla-avl_CFLAGS                 = -DTREE=XYLA_AVL
 xyla-rb_CFLAGS          = -DTREE=XYLA_RB
 xyla-splay_CFLAGS       = -DTREE=XYLA_SPLAY
diff --git a/chain.c b/chain.c
index 69de698db1a8f78c993007d9d21905c670f726a3..b90dbc40568133bce839244778cf88f1034fbdcc 100644 (file)
--- a/chain.c
+++ b/chain.c
 #if !TREE
 #  error "`TREE' not defined or bungled constant setting"
 #elif TREE == XYLA_AVL
-#  include "avl.h"
+#  include <xyla/avl.h>
 #  define USE_XYLA 1
 #  define WANT_HEIGHT 1
 #  define TREE__NAME(name) XYLA_AVL_##name
 #  define tree__name(name) xyla_avl_##name
 #  define T avl
 #elif TREE == XYLA_RB
-#  include "rb.h"
+#  include <xyla/rb.h>
 #  define USE_XYLA 1
 #  define WANT_HEIGHT 1
 #  define TREE__NAME(name) XYLA_RB_##name
 #  define tree__name(name) xyla_rb_##name
 #  define T rb
 #elif TREE == XYLA_SPLAY
-#  include "splay.h"
+#  include <xyla/splay.h>
 #  define USE_XYLA 1
 #  undef WANT_HEIGHT
 #  define TREE__NAME(name) XYLA_SPLAY_##name
 #  define tree__name(name) xyla_splay_##name
 #  define T spl
 #elif TREE == XYLA_TREAP
-#  include "treap.h"
+#  include <xyla/treap.h>
 #  define USE_XYLA 1
 #  undef WANT_HEIGHT
 #  define TREE__NAME(name) XYLA_TREAP_##name