summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-05-09 03:15:30 +0200
committerAlejandro Colomar <alx@kernel.org>2023-05-09 03:15:30 +0200
commit321db68f6f2a47361fb9f888ddda3dca1202393d (patch)
tree2b60b04efac6866f6fe39c862dd4146a59b7ccf6
parent940d5cb7ce9537e997ad2dee863997c94e65b2d9 (diff)
Makefile: Use a variable for libunit's $prefix
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e6e24d0..668be64 100644
--- a/Makefile
+++ b/Makefile
@@ -8,13 +8,16 @@ srcdir := .
builddir := tmp
-LIBNXT_CFLAGS := -isystem/opt/local/unit/include
-LIBNXT_LIBS := -L/opt/local/unit/lib -lunit
+LIBUNIT_PREFIX := /opt/local/unit
-CFLAGS := -Wall -Wextra -Werror -std=gnu2x -O3 $(LIBNXT_CFLAGS)
+
+LIBUNIT_CFLAGS := -isystem$(LIBUNIT_PREFIX)/include
+LIBUNIT_LIBS := -L$(LIBUNIT_PREFIX)/lib -lunit
+
+CFLAGS := -Wall -Wextra -Werror -std=gnu2x -O3 $(LIBUNIT_CFLAGS)
ASFLAGS :=
LDFLAGS :=
-LIBS := $(LIBNXT_LIBS) -lpthread -lc -lgcc
+LIBS := $(LIBUNIT_LIBS) -lpthread -lc -lgcc
AR := ar
AS := as