<commit_before>include ../../buildconf.mk

LIB   	:= -lsyndicate -lfskit -lprotobuf
C_SRCS	:= $(wildcard *.c)
CXSRCS	:= $(wildcard *.cpp)

UG_COMMON 		:= ../
UG_COMMON_OBJ  := $(patsubst $(UG_COMMON)/%.c,$(BUILD_UG)/%.o,$(wildcard $(UG_COMMON)/*.c)) \
						$(patsubst $(UG_COMMON)/%.cpp,$(BUILD_UG)/%.o,$(wildcard $(UG_COMMON)/*.cpp))

OBJ				:= $(patsubst %.c,$(BUILD_UG_TOOLS)/%.o,$(C_SRCS)) \
						$(patsubst %.cpp,$(BUILD_UG_TOOLS)/%.o,$(CXSRCS))

TOOL_NAMES := syndicate-ls syndicate-mkdir syndicate-rmdir syndicate-touch syndicate-put
TOOLS := $(patsubst %,$(BUILD_UG_TOOLS)/%,$(TOOL_NAMES))
COMMON_SRC := common.cpp
COMMON_OBJ := $(patsubst %.cpp,$(BUILD_UG_TOOLS)/%.o,$(COMMON_SRC))

all: $(TOOLS)

$(BUILD_UG_TOOLS)/syndicate-% : $(BUILD_UG_TOOLS)/syndicate-%.o $(UG_COMMON_OBJ) $(COMMON_OBJ)
	@mkdir -p $(shell dirname "$@")
	$(CPP) -o "$@" $(INC) "$<" $(UG_COMMON_OBJ) $(COMMON_OBJ) $(LIBINC) $(LIB)

$(BUILD_UG_TOOLS)/%.o : %.c
	@mkdir -p $(shell dirname "$@")
	$(CPP) -o "$@" $(INC) -c $< $(DEFS)

$(BUILD_UG_TOOLS)/%.o : %.cpp
	@mkdir -p $(shell dirname "$@")
	$(CPP) -o "$@" $(INC) -c $< $(DEFS)

.PHONY: clean
clean:<commit_msg>Update Makefile with new tools<commit_after>include ../../buildconf.mk

LIB   	:= -lsyndicate -lfskit -lprotobuf -lcurl
C_SRCS	:= $(wildcard *.c)
CXSRCS	:= $(wildcard *.cpp)

UG_COMMON 		:= ../
UG_COMMON_OBJ  := $(patsubst $(UG_COMMON)/%.c,$(BUILD_UG)/%.o,$(wildcard $(UG_COMMON)/*.c)) \
						$(patsubst $(UG_COMMON)/%.cpp,$(BUILD_UG)/%.o,$(wildcard $(UG_COMMON)/*.cpp))

OBJ				:= $(patsubst %.c,$(BUILD_UG_TOOLS)/%.o,$(C_SRCS)) \
						$(patsubst %.cpp,$(BUILD_UG_TOOLS)/%.o,$(CXSRCS))

TOOL_NAMES := syndicate-ls syndicate-mkdir syndicate-rmdir syndicate-touch \
  			  syndicate-put syndicate-cat syndicate-vacuum syndicate-unlink \
			  syndicate-trunc syndicate-write syndicate-read

TOOLS := $(patsubst %,$(BUILD_UG_TOOLS)/%,$(TOOL_NAMES))
COMMON_SRC := common.cpp
COMMON_OBJ := $(patsubst %.cpp,$(BUILD_UG_TOOLS)/%.o,$(COMMON_SRC))

all: $(TOOLS)

$(BUILD_UG_TOOLS)/syndicate-% : $(BUILD_UG_TOOLS)/syndicate-%.o $(UG_COMMON_OBJ) $(COMMON_OBJ)
	@mkdir -p $(shell dirname "$@")
	$(CPP) -o "$@" $(INC) "$<" $(UG_COMMON_OBJ) $(COMMON_OBJ) $(LIBINC) $(LIB)

$(BUILD_UG_TOOLS)/%.o : %.c
	@mkdir -p $(shell dirname "$@")
	$(CPP) -o "$@" $(INC) -c "$<" $(DEFS)

$(BUILD_UG_TOOLS)/%.o : %.cpp
	@mkdir -p $(shell dirname "$@")
	$(CPP) -o "$@" $(INC) -c "$<" $(DEFS)

.PHONY: clean
clean:
{'fraction_non_alphanumeric': 0.25287828947368424, 'fraction_numerical': 0.0, 'mean_word_length': 4.430803571428571, 'pattern_counts': {'":': 0, '<': 9, '<?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': '5171839', 'n_tokens_mistral': 1186, 'n_tokens_neox': 1057, 'n_words': 172}