diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-06-25 14:00:54 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-25 14:01:11 +0200 |
| commit | 13dd2132310fb4dc5aa3dd217ed62f2e8301b981 (patch) | |
| tree | 0e6f5dfdc686365af06fb59d32957e47a3ca5a79 /build.mk | |
| parent | b673eb9a72138b89f1efecf52578020cb43857ff (diff) | |
| download | ffwd-13dd2132310fb4dc5aa3dd217ed62f2e8301b981.tar.gz ffwd-13dd2132310fb4dc5aa3dd217ed62f2e8301b981.zip | |
all: migrate to yyjson
Diffstat (limited to 'build.mk')
| -rw-r--r-- | build.mk | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -34,18 +34,18 @@ ifeq ($(strip $(OPENBLAS_LDFLAGS)),) OPENBLAS_LDFLAGS = -lopenblas endif -CJSON_CFLAGS ?= $(shell sh -c 'pkg-config --cflags libcjson 2>/dev/null') -CJSON_LDFLAGS ?= $(shell sh -c 'pkg-config --libs libcjson 2>/dev/null') +YYJSON_CFLAGS ?= $(shell sh -c 'pkg-config --cflags yyjson 2>/dev/null') +YYJSON_LDFLAGS ?= $(shell sh -c 'pkg-config --libs yyjson 2>/dev/null') ifeq ($(OS),Darwin) -ifeq ($(strip $(CJSON_CFLAGS)),) - CJSON_CFLAGS = -I/opt/homebrew/include -I/usr/local/include +ifeq ($(strip $(YYJSON_CFLAGS)),) + YYJSON_CFLAGS = -I/opt/homebrew/include -I/usr/local/include endif -ifeq ($(strip $(CJSON_LDFLAGS)),) - CJSON_LDFLAGS = -L/opt/homebrew/lib -L/usr/local/lib -lcjson +ifeq ($(strip $(YYJSON_LDFLAGS)),) + YYJSON_LDFLAGS = -L/opt/homebrew/lib -L/usr/local/lib -lyyjson endif endif -ifeq ($(strip $(CJSON_LDFLAGS)),) - CJSON_LDFLAGS = -lcjson +ifeq ($(strip $(YYJSON_LDFLAGS)),) + YYJSON_LDFLAGS = -lyyjson endif MLX_PREFIX := $(shell brew --prefix mlx 2>/dev/null) @@ -154,9 +154,7 @@ else CFLAGS = $(OPT) endif CPPFLAGS ?= -# Vendored yyjson (deps/yyjson) is the one JSON parser/writer for the whole -# tree; every component includes its header from here. -CPPFLAGS += -I$(ROOT)/deps/yyjson +CPPFLAGS += $(YYJSON_CFLAGS) LDLIBS ?= SHARED_LDLIBS ?= @@ -233,7 +231,7 @@ $(1): $(2) $(3) endef export BACKEND MODE ARCH_FLAGS CFLAGS_BASE OPT LDFLAGS_OPT CUDA_HOME NVCC CUDAFLAGS -export OPENBLAS_CFLAGS OPENBLAS_LDFLAGS CJSON_CFLAGS CJSON_LDFLAGS +export OPENBLAS_CFLAGS OPENBLAS_LDFLAGS YYJSON_CFLAGS YYJSON_LDFLAGS export MLX_PREFIX MLXC_PREFIX export HOST_BLAS_CFLAGS HOST_BLAS_LDFLAGS export BLAS_BACKEND_CFLAGS BLAS_BACKEND_LDFLAGS |
