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

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

CPP_VERSION = c++20

#GCC_LIB = /usr/lib/gcc/x86_64-linux-gnu/7.4.0
CXX = /usr/bin/g++

#IMPORT = -fmodules -fsearch-include-path bits/std.cc
IMPORT = 

# 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

# -no-pie?
CXXFLAGS =  -Wall -Wextra -Weffc++ -fPIC $(PROFILE) -std=$(CPP_VERSION) $(IMPORT) $(OPTIMIZE) \
-I$(KLAMMERTEXT_HOME)/mac \
-I/usr/include \
-I/usr/include/$(PYTHON)

# -L$(GCC_LIB) \

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

LDLIBS = \
-ldl

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

#GCC_ROOT = /h/dev/pkg/gcc-$(GCC_VERSION)
#GCC_LIB = $(GCC_ROOT)/$(GCC_DIR)/lib/gcc/$(GCC_DIR)/$(GCC_VERSION)
#$(GCC_LIB)

LD_LIBRARY_PATH=\
/usr/lib64\
:/usr/lib/x86_64-linux-gnu
