<commit_before># important directories
prefix?=/usr/local
mandir?=$(prefix)/share/man
datadir?=$(prefix)/share
localedir?=$(datadir)/locale
docdir?=$(datadir)/doc/$(PACKAGE)

CPPCHECK_JOBS?=5

# compiler
CXX?=c++

# compiler and linker flags
DEFINES=-DLOCALEDIR=\"$(localedir)\"

ifneq ($(wildcard .git/.),)
GIT_HASH:=$(shell git describe --abbrev=4 --dirty --always --tags)
DEFINES+=-DGIT_HASH=\"$(GIT_HASH)\"
endif

WARNFLAGS=-Werror -Wall -Wextra -Wunreachable-code
INCLUDES=-Iinclude -Istfl -Ifilter -I. -Irss
BARE_CXXFLAGS=-std=c++11 -O2 -ggdb $(INCLUDES)
LDFLAGS+=-L.

PACKAGE=newsboat

ifeq (, $(filter $(MAKECMDGOALS),distclean run-i18nspector))
include config.mk
endif

ifeq ($(PROFILE),1)
BARE_CXXFLAGS+=-O0 -fprofile-arcs -ftest-coverage
LDFLAGS+=-fprofile-arcs -ftest-coverage
endif

CXXFLAGS:=$(BARE_CXXFLAGS) $(WARNFLAGS) $(DEFINES) $(CXXFLAGS)

LIB_SOURCES:=$(shell cat mk/libboat.deps)
LIB_OBJS:=$(patsubst %.cpp,%.o,$(LIB_SOURCES))
LIB_OUTPUT=libboat.a

FILTERLIB_SOURCES=filter/Scanner.cpp filter/Parser.cpp filter/FilterParser.cpp
FILTERLIB_OBJS:=$(patsubst %.cpp,%.o,$(FILTERLIB_SOURCES))
FILTERLIB_OUTPUT=libfilter.a

NEWSBOAT=newsboat
NEWSBOAT_SOURCES:=$(shell cat mk/newsboat.deps)
NEWSBOAT_OBJS:=$(patsubst %.cpp,%.o,$(NEWSBOAT_SOURCES))
NEWSBOAT_LIBS=-lboat -lfilter -lpthread -lrsspp

RSSPPLIB_SOURCES=$(sort $(wildcard rss/*.cpp))
RSSPPLIB_OBJS=$(patsubst rss/%.cpp,rss/%.o,$(RSSPPLIB_SOURCES))
RSSPPLIB_OUTPUT=librsspp.a

CARGO_FLAGS+=--verbose
ifeq ($(PROFILE),1)
NEWSBOATLIB_OUTPUT=target/debug/libnewsboat.a
LDFLAGS+=-L./target/debug
else
NEWSBOATLIB_OUTPUT=target/release/libnewsboat.a
LDFLAGS+=-L.//target/release
CARGO_FLAGS+=--release
endif
LDFLAGS+=-lnewsboat -lpthread -ldl

PODBOAT=podboat
PODBOAT_SOURCES:=$(shell cat mk/podboat.deps)<commit_msg>Makefile: add support for cross compiling via CARGO_BUILD_TARGET<commit_after># important directories
prefix?=/usr/local
mandir?=$(prefix)/share/man
datadir?=$(prefix)/share
localedir?=$(datadir)/locale
docdir?=$(datadir)/doc/$(PACKAGE)

CPPCHECK_JOBS?=5

# compiler
CXX?=c++

# compiler and linker flags
DEFINES=-DLOCALEDIR=\"$(localedir)\"

ifneq ($(wildcard .git/.),)
GIT_HASH:=$(shell git describe --abbrev=4 --dirty --always --tags)
DEFINES+=-DGIT_HASH=\"$(GIT_HASH)\"
endif

WARNFLAGS=-Werror -Wall -Wextra -Wunreachable-code
INCLUDES=-Iinclude -Istfl -Ifilter -I. -Irss
BARE_CXXFLAGS=-std=c++11 -O2 -ggdb $(INCLUDES)
LDFLAGS+=-L.

PACKAGE=newsboat

ifeq (, $(filter $(MAKECMDGOALS),distclean run-i18nspector))
include config.mk
endif

ifeq ($(PROFILE),1)
BARE_CXXFLAGS+=-O0 -fprofile-arcs -ftest-coverage
LDFLAGS+=-fprofile-arcs -ftest-coverage
endif

CXXFLAGS:=$(BARE_CXXFLAGS) $(WARNFLAGS) $(DEFINES) $(CXXFLAGS)

LIB_SOURCES:=$(shell cat mk/libboat.deps)
LIB_OBJS:=$(patsubst %.cpp,%.o,$(LIB_SOURCES))
LIB_OUTPUT=libboat.a

FILTERLIB_SOURCES=filter/Scanner.cpp filter/Parser.cpp filter/FilterParser.cpp
FILTERLIB_OBJS:=$(patsubst %.cpp,%.o,$(FILTERLIB_SOURCES))
FILTERLIB_OUTPUT=libfilter.a

NEWSBOAT=newsboat
NEWSBOAT_SOURCES:=$(shell cat mk/newsboat.deps)
NEWSBOAT_OBJS:=$(patsubst %.cpp,%.o,$(NEWSBOAT_SOURCES))
NEWSBOAT_LIBS=-lboat -lfilter -lpthread -lrsspp

RSSPPLIB_SOURCES=$(sort $(wildcard rss/*.cpp))
RSSPPLIB_OBJS=$(patsubst rss/%.cpp,rss/%.o,$(RSSPPLIB_SOURCES))
RSSPPLIB_OUTPUT=librsspp.a

CARGO_FLAGS+=--verbose
ifeq ($(PROFILE),1)
ifdef CARGO_BUILD_TARGET
NEWSBOATLIB_OUTPUT=target/$(CARGO_BUILD_TARGET)/debug/libnewsboat.a
LDFLAGS+=-L./target/$(CARGO_BUILD_TARGET)/debug
else
NEWSBOATLIB_OUTPUT=target/debug/libnewsboat.a
LDFLAGS+=-L./target/debug
endif
else
ifdef CARGO_BUILD_TARGET
NEWSBOATLIB_OUTPUT=target/$(CARGO_BUILD_TARGET)/release/libnewsboat.a
LDFLAGS+=-L./target/$(CARGO_BUILD_TARGET)/release
else
NEWSBOATLIB_OUTPUT=target/release/libnewsboat.a
LDFLAGS+=-L./target/release
endif
CARGO_FLAGS+=--release
endif
LDFLAGS+=-lnewsboat -lpthread -ldl

PODBOAT=podboat
PODBOAT_SOURCES:=$(shell cat mk/podboat.deps)
{'fraction_non_alphanumeric': 0.1670061099796334, 'fraction_numerical': 0.0050916496945010185, 'mean_word_length': 6.937373737373737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2024215', 'n_tokens_mistral': 1692, 'n_tokens_neox': 1594, 'n_words': 232}