KLAMMERTEXT_HOME = /home/ack/projects/klammertext/K

include $(KLAMMERTEXT_HOME)/mac/env/optimize.env

CPP_VERSION = c++20

CXX = /usr/bin/g++

# Hack for now; to be generalized:
ifneq ("$(wildcard /usr/include/python3.14)","")
    PYTHON = python3.14
else ifneq ("$(wildcard /usr/include/python3.13)","")
    PYTHON = python3.13
else
    PYTHON = python3.12
endif

CPPFLAGS = \
-I$(KLAMMERTEXT_HOME)/mac \
-I/usr/include \
-I/usr/include/$(PYTHON)

CXXFLAGS = -Wall -Wextra -Weffc++ -Wshadow -std=$(CPP_VERSION) -fPIC $(OPTIMIZE) $(SANITIZE)

LDFLAGS = \
-L/usr/lib/x86_64-linux-gnu

LDLIBS = \
-ldl

ifndef NOPYTHON
LDLIBS += -l$(PYTHON)
endif
