<commit_before># ---------- C++ support ----------
.PHONY: help_cc # Generate list of C++ targets with descriptions.
help_cc:
	@echo Use one of the following C++ targets:
ifeq ($(SYSTEM),win)
	@tools\grep.exe "^.PHONY: .* #" $(CURDIR)/makefiles/Makefile.cpp.mk | tools\sed.exe "s/\.PHONY: \(.*\) # \(.*\)/\1\t\2/"
	@echo off & echo(
else
	@grep "^.PHONY: .* #" $(CURDIR)/makefiles/Makefile.cpp.mk | sed "s/\.PHONY: \(.*\) # \(.*\)/\1\t\2/" | expand -t20
	@echo
endif

.PHONY: ccc rcc clean_cc clean_compat ccexe

# Main target
.PHONY: cc # Build C++ OR-Tools.
cc: ortoolslibs ccexe
.PHONY: test_cc # Test C++ OR-Tools using various examples.
test_cc: test_cc_examples
BUILT_LANGUAGES += C++

.PHONY: clean_cc # Clean C++ output from previous build.
clean_cc:
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)cvrptw_lib.$(LIB_SUFFIX)
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)dimacs.$(LIB_SUFFIX)
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)fap.$(LIB_SUFFIX)
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)fz.$(LIB_SUFFIX)
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)ortools.$(LIB_SUFFIX)
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)*.a
	-$(DEL) $(OBJ_DIR)$S*.$O
	-$(DEL) $(OBJ_DIR)$Salgorithms$S*.$O
	-$(DEL) $(OBJ_DIR)$Sbase$S*.$O
	-$(DEL) $(OBJ_DIR)$Sbop$S*.$O
	-$(DEL) $(OBJ_DIR)$Sconstraint_solver$S*.$O
	-$(DEL) $(OBJ_DIR)$Sdata$S*.$O
	-$(DEL) $(OBJ_DIR)$Sflatzinc$S*.$O
	-$(DEL) $(OBJ_DIR)$Sglop$S*.$O
	-$(DEL) $(OBJ_DIR)$Sgraph$S*.$O
	-$(DEL) $(OBJ_DIR)$Slinear_solver$S*.$O
	-$(DEL) $(OBJ_DIR)$Slp_data$S*.$O
	-$(DEL) $(OBJ_DIR)$Sport$S*.$O
	-$(DEL) $(OBJ_DIR)$Ssat$S*.$O
	-$(DEL) $(OBJ_DIR)$Sutil$S*.$O
	-$(DEL) $(BIN_DIR)$Sfz$E
	-$(DEL) $(BIN_DIR)$Ssat_runner$E
	-$(DEL) $(CP_BINARIES)
	-$(DEL) $(LP_BINARIES)
	-$(DEL) $(GEN_DIR)$Sortools$Sbop$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Sconstraint_solver$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Sdata$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Sflatzinc$S*.tab.*
	-$(DEL) $(GEN_DIR)$Sortools$Sflatzinc$S*.yy.*
	-$(DEL) $(GEN_DIR)$Sortools$Sflatzinc$Sparser.*
	-$(DEL) $(GEN_DIR)$Sortools$Sglop$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Sgraph$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Slinear_solver$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Ssat$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Sutil$S*.pb.*
	-$(DEL) $(BIN_DIR)$S*.exp
	-$(DEL) $(BIN_DIR)$S*.lib
	-$(DELREC) $(OR_ROOT)src$Sgen$Sflatzinc$S*
	-$(DELREC) $(OR_ROOT)objs$Sflatzinc$S*

clean_compat:
	-$(DELREC) $(OR_ROOT)constraint_solver
	-$(DELREC) $(OR_ROOT)linear_solver
	-$(DELREC) $(OR_ROOT)algorithms
	-$(DELREC) $(OR_ROOT)graph
	-$(DELREC) $(OR_ROOT)gen

# All libraries and dependecies

include $(OR_ROOT)makefiles/Makefile.gen.mk

OR_TOOLS_LIBS = $(LIB_DIR)/$(LIB_PREFIX)ortools.$(LIB_SUFFIX)
OR_TOOLS_LNK = $(PRE_LIB)ortools$(POST_LIB)
ortoolslibs: third_party_check $(OR_TOOLS_LIBS)

# Specific libraries for examples, and flatzinc.

CVRPTW_LIBS   = $(LIB_DIR)/$(LIB_PREFIX)cvrptw_lib.$(LIB_SUFFIX)
CVRPTW_DEPS = \
	$(EX_DIR)/cpp/cvrptw_lib.h \
	$(CP_DEPS) $(SRC_DIR)/ortools/constraint_solver/routing.h
CVRPTW_LNK = $(PRE_LIB)cvrptw_lib$(POST_LIB) $(OR_TOOLS_LNK)
cvrptwlibs: $(CVRPTW_LIBS)


DIMACS_LIBS   = $(LIB_DIR)/$(LIB_PREFIX)dimacs.$(LIB_SUFFIX)
DIMACS_DEPS = \
	$(EX_DIR)/cpp/parse_dimacs_assignment.h \
	$(EX_DIR)/cpp/print_dimacs_assignment.h \
	$(GRAPH_DEPS)
DIMACS_LNK = $(PRE_LIB)dimacs$(POST_LIB) $(OR_TOOLS_LNK)
dimacslibs: $(DIMACS_LIBS)

FAP_LIBS = $(LIB_DIR)/$(LIB_PREFIX)fap.$(LIB_SUFFIX)
FAP_DEPS = \
	$(EX_DIR)/cpp/fap_model_printer.h \
	$(EX_DIR)/cpp/fap_parser.h \
	$(EX_DIR)/cpp/fap_utilities.h \
	$(CP_DEPS) \
	$(LP_DEPS)
FAP_LNK = $(PRE_LIB)fap$(POST_LIB) $(OR_TOOLS_LNK)
faplibs: $(FAP_LIBS)


FLATZINC_LIBS = $(LIB_DIR)/$(LIB_PREFIX)fz.$(LIB_SUFFIX)
FLATZINC_DEPS = \
	$(SRC_DIR)/ortools/flatzinc/checker.h \
	$(SRC_DIR)/ortools/flatzinc/constraints.h \
	$(SRC_DIR)/ortools/flatzinc/cp_model_fz_solver.h \
	$(SRC_DIR)/ortools/flatzinc/flatzinc_constraints.h \
	$(SRC_DIR)/ortools/flatzinc/logging.h \
	$(SRC_DIR)/ortools/flatzinc/model.h \
	$(SRC_DIR)/ortools/flatzinc/parser.h \
	$(SRC_DIR)/ortools/flatzinc/parser.tab.hh \
	$(SRC_DIR)/ortools/flatzinc/presolve.h \
	$(SRC_DIR)/ortools/flatzinc/reporting.h \
	$(SRC_DIR)/ortools/flatzinc/sat_constraint.h \
	$(SRC_DIR)/ortools/flatzinc/solver_data.h \
	$(SRC_DIR)/ortools/flatzinc/solver.h \
	$(SRC_DIR)/ortools/flatzinc/solver_util.h \
	$(CP_DEPS) \
	$(SAT_DEPS)
FLATZINC_LNK = $(PRE_LIB)fz$(POST_LIB) $(OR_TOOLS_LNK)

# Binaries

CC_BINARIES = \
	$(BIN_DIR)/costas_array$E \
	$(BIN_DIR)/cryptarithm$E \
	$(BIN_DIR)/cvrp_disjoint_tw$E \
	$(BIN_DIR)/cvrptw$E \
	$(BIN_DIR)/cvrptw_with_breaks$E \
	$(BIN_DIR)/cvrptw_with_refueling$E \
	$(BIN_DIR)/cvrptw_with_resources$E \
	$(BIN_DIR)/cvrptw_with_stop_times_and_resources$E \
	$(BIN_DIR)/dimacs_assignment$E \
	$(BIN_DIR)/dobble_ls$E \
	$(BIN_DIR)/flow_api$E \
	$(BIN_DIR)/frequency_assignment_problem$E \
	$(BIN_DIR)/golomb$E \
	$(BIN_DIR)/integer_programming$E \
	$(BIN_DIR)/jobshop$E \
	$(BIN_DIR)/jobshop_earlytardy$E \
	$(BIN_DIR)/jobshop_ls$E \
	$(BIN_DIR)/jobshop_sat$E \
	$(BIN_DIR)/linear_assignment_api$E \
	$(BIN_DIR)/linear_programming$E \
	$(BIN_DIR)/linear_solver_protocol_buffers$E \
	$(BIN_DIR)/ls_api$E \
	$(BIN_DIR)/magic_square$E \
	$(BIN_DIR)/model_util$E \
	$(BIN_DIR)/mps_driver$E \
	$(BIN_DIR)/multidim_knapsack$E \
	$(BIN_DIR)/network_routing$E \
	$(BIN_DIR)/nqueens$E \
	$(BIN_DIR)/pdptw$E \
	$(BIN_DIR)/rcpsp_sat$E \
	$(BIN_DIR)/shift_minimization_sat$E \
	$(BIN_DIR)/solve$E \
	$(BIN_DIR)/sports_scheduling$E \
	$(BIN_DIR)/strawberry_fields_with_column_generation$E \
	$(BIN_DIR)/tsp$E \
	$(BIN_DIR)/weighted_tardiness_sat$E

ccexe: $(CC_BINARIES)

# CVRPTW common library

CVRPTW_OBJS=\<commit_msg>Remove C++ examples in clean_cc<commit_after># ---------- C++ support ----------
.PHONY: help_cc # Generate list of C++ targets with descriptions.
help_cc:
	@echo Use one of the following C++ targets:
ifeq ($(SYSTEM),win)
	@tools\grep.exe "^.PHONY: .* #" $(CURDIR)/makefiles/Makefile.cpp.mk | tools\sed.exe "s/\.PHONY: \(.*\) # \(.*\)/\1\t\2/"
	@echo off & echo(
else
	@grep "^.PHONY: .* #" $(CURDIR)/makefiles/Makefile.cpp.mk | sed "s/\.PHONY: \(.*\) # \(.*\)/\1\t\2/" | expand -t20
	@echo
endif

.PHONY: ccc rcc clean_cc clean_compat ccexe

# Main target
.PHONY: cc # Build C++ OR-Tools.
cc: ortoolslibs ccexe
.PHONY: test_cc # Test C++ OR-Tools using various examples.
test_cc: test_cc_examples
BUILT_LANGUAGES += C++

.PHONY: clean_cc # Clean C++ output from previous build.
clean_cc:
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)cvrptw_lib.$(LIB_SUFFIX)
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)dimacs.$(LIB_SUFFIX)
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)fap.$(LIB_SUFFIX)
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)fz.$(LIB_SUFFIX)
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)ortools.$(LIB_SUFFIX)
	-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)*.a
	-$(DEL) $(OBJ_DIR)$S*.$O
	-$(DEL) $(OBJ_DIR)$Salgorithms$S*.$O
	-$(DEL) $(OBJ_DIR)$Sbase$S*.$O
	-$(DEL) $(OBJ_DIR)$Sbop$S*.$O
	-$(DEL) $(OBJ_DIR)$Sconstraint_solver$S*.$O
	-$(DEL) $(OBJ_DIR)$Sdata$S*.$O
	-$(DEL) $(OBJ_DIR)$Sflatzinc$S*.$O
	-$(DEL) $(OBJ_DIR)$Sglop$S*.$O
	-$(DEL) $(OBJ_DIR)$Sgraph$S*.$O
	-$(DEL) $(OBJ_DIR)$Slinear_solver$S*.$O
	-$(DEL) $(OBJ_DIR)$Slp_data$S*.$O
	-$(DEL) $(OBJ_DIR)$Sport$S*.$O
	-$(DEL) $(OBJ_DIR)$Ssat$S*.$O
	-$(DEL) $(OBJ_DIR)$Sutil$S*.$O
	-$(DEL) $(BIN_DIR)$Sfz$E
	-$(DEL) $(BIN_DIR)$Ssat_runner$E
	-$(DEL) $(addsuffix $E, $(addprefix $(BIN_DIR)$S, $(CC_EXAMPLES)))
	-$(DEL) $(CP_BINARIES)
	-$(DEL) $(LP_BINARIES)
	-$(DEL) $(GEN_DIR)$Sortools$Sbop$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Sconstraint_solver$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Sdata$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Sflatzinc$S*.tab.*
	-$(DEL) $(GEN_DIR)$Sortools$Sflatzinc$S*.yy.*
	-$(DEL) $(GEN_DIR)$Sortools$Sflatzinc$Sparser.*
	-$(DEL) $(GEN_DIR)$Sortools$Sglop$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Sgraph$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Slinear_solver$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Ssat$S*.pb.*
	-$(DEL) $(GEN_DIR)$Sortools$Sutil$S*.pb.*
	-$(DEL) $(BIN_DIR)$S*.exp
	-$(DEL) $(BIN_DIR)$S*.lib
	-$(DELREC) $(OR_ROOT)src$Sgen$Sflatzinc$S*
	-$(DELREC) $(OR_ROOT)objs$Sflatzinc$S*

clean_compat:
	-$(DELREC) $(OR_ROOT)constraint_solver
	-$(DELREC) $(OR_ROOT)linear_solver
	-$(DELREC) $(OR_ROOT)algorithms
	-$(DELREC) $(OR_ROOT)graph
	-$(DELREC) $(OR_ROOT)gen

# All libraries and dependecies

include $(OR_ROOT)makefiles/Makefile.gen.mk

OR_TOOLS_LIBS = $(LIB_DIR)/$(LIB_PREFIX)ortools.$(LIB_SUFFIX)
OR_TOOLS_LNK = $(PRE_LIB)ortools$(POST_LIB)
ortoolslibs: third_party_check $(OR_TOOLS_LIBS)

# Specific libraries for examples, and flatzinc.

CVRPTW_LIBS   = $(LIB_DIR)/$(LIB_PREFIX)cvrptw_lib.$(LIB_SUFFIX)
CVRPTW_DEPS = \
	$(EX_DIR)/cpp/cvrptw_lib.h \
	$(CP_DEPS) $(SRC_DIR)/ortools/constraint_solver/routing.h
CVRPTW_LNK = $(PRE_LIB)cvrptw_lib$(POST_LIB) $(OR_TOOLS_LNK)
cvrptwlibs: $(CVRPTW_LIBS)


DIMACS_LIBS   = $(LIB_DIR)/$(LIB_PREFIX)dimacs.$(LIB_SUFFIX)
DIMACS_DEPS = \
	$(EX_DIR)/cpp/parse_dimacs_assignment.h \
	$(EX_DIR)/cpp/print_dimacs_assignment.h \
	$(GRAPH_DEPS)
DIMACS_LNK = $(PRE_LIB)dimacs$(POST_LIB) $(OR_TOOLS_LNK)
dimacslibs: $(DIMACS_LIBS)

FAP_LIBS = $(LIB_DIR)/$(LIB_PREFIX)fap.$(LIB_SUFFIX)
FAP_DEPS = \
	$(EX_DIR)/cpp/fap_model_printer.h \
	$(EX_DIR)/cpp/fap_parser.h \
	$(EX_DIR)/cpp/fap_utilities.h \
	$(CP_DEPS) \
	$(LP_DEPS)
FAP_LNK = $(PRE_LIB)fap$(POST_LIB) $(OR_TOOLS_LNK)
faplibs: $(FAP_LIBS)


FLATZINC_LIBS = $(LIB_DIR)/$(LIB_PREFIX)fz.$(LIB_SUFFIX)
FLATZINC_DEPS = \
	$(SRC_DIR)/ortools/flatzinc/checker.h \
	$(SRC_DIR)/ortools/flatzinc/constraints.h \
	$(SRC_DIR)/ortools/flatzinc/cp_model_fz_solver.h \
	$(SRC_DIR)/ortools/flatzinc/flatzinc_constraints.h \
	$(SRC_DIR)/ortools/flatzinc/logging.h \
	$(SRC_DIR)/ortools/flatzinc/model.h \
	$(SRC_DIR)/ortools/flatzinc/parser.h \
	$(SRC_DIR)/ortools/flatzinc/parser.tab.hh \
	$(SRC_DIR)/ortools/flatzinc/presolve.h \
	$(SRC_DIR)/ortools/flatzinc/reporting.h \
	$(SRC_DIR)/ortools/flatzinc/sat_constraint.h \
	$(SRC_DIR)/ortools/flatzinc/solver_data.h \
	$(SRC_DIR)/ortools/flatzinc/solver.h \
	$(SRC_DIR)/ortools/flatzinc/solver_util.h \
	$(CP_DEPS) \
	$(SAT_DEPS)
FLATZINC_LNK = $(PRE_LIB)fz$(POST_LIB) $(OR_TOOLS_LNK)

# Binaries
CC_EXAMPLES = \
costas_array \
cryptarithm \
cvrp_disjoint_tw \
cvrptw \
cvrptw_with_breaks \
cvrptw_with_refueling \
cvrptw_with_resources \
cvrptw_with_stop_times_and_resources \
dimacs_assignment \
dobble_ls \
flow_api \
frequency_assignment_problem \
golomb \
integer_programming \
jobshop \
jobshop_earlytardy \
jobshop_ls \
jobshop_sat \
linear_assignment_api \
linear_programming \
linear_solver_protocol_buffers \
ls_api \
magic_square \
model_util \
mps_driver \
multidim_knapsack \
network_routing \
nqueens \
pdptw \
rcpsp_sat \
shift_minimization_sat \
solve \
sports_scheduling \
strawberry_fields_with_column_generation \
tsp \
weighted_tardiness_sat

ccexe: $(addsuffix $E, $(addprefix $(BIN_DIR)/, $(CC_EXAMPLES)))

# CVRPTW common library

CVRPTW_OBJS=\
{'fraction_non_alphanumeric': 0.21428571428571427, 'fraction_numerical': 0.0011117287381878821, 'mean_word_length': 5.346266901822458, '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': '891112', 'n_tokens_mistral': 5306, 'n_tokens_neox': 5083, 'n_words': 591}