From 835b0dea59dc8a244836070c1efda53c45606730 Mon Sep 17 00:00:00 2001 Message-Id: <835b0dea59dc8a244836070c1efda53c45606730.1746222852.git.mdw@distorted.org.uk> From: Mark Wooding Date: Thu, 3 Apr 2025 20:42:14 +0100 Subject: [PATCH] Makefile, chain.c: Use Xyla found using `pkg-config'. Organization: Straylight/Edgeware From: Mark Wooding --- Makefile | 4 ++-- chain.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index bbcd22b..fe5d8c3 100644 --- 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 69de698..b90dbc4 100644 --- a/chain.c +++ b/chain.c @@ -35,28 +35,28 @@ #if !TREE # error "`TREE' not defined or bungled constant setting" #elif TREE == XYLA_AVL -# include "avl.h" +# include # 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 # 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 # 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 # define USE_XYLA 1 # undef WANT_HEIGHT # define TREE__NAME(name) XYLA_TREAP_##name -- [mdw]