<commit_before>CXXFLAGS += -Iproto $(shell pkg-config --cflags protobuf) -std=c++11 -ggdb -Wall -Wextra

proto   = proto/appendconcat.pb.o proto/appendconcat/time.pb.o \
	  proto/appendconcat/uuid.pb.o proto/appendconcat/site.pb.o \
	  proto/appendconcat/figure.pb.o proto/appendconcat/name.pb.o
objects = main.o util.o state.o $(proto)

all: appendconcat
.PHONY: all

appendconcat: $(objects)
	$(CXX) $(objects) -o $@ $(CXXFLAGS) $(LDFLAGS) $(shell pkg-config --libs protobuf) -lboost_program_options

proto/.dummy: $(wildcard definitions/*.proto) $(wildcard definitions/*/*.proto)
	rm -rf proto
	mkdir proto
	protoc --cpp_out=proto -I definitions definitions/*.proto definitions/*/*.proto
	touch proto/.dummy

$(proto:%.o=%.cc) $(proto:%.o=%.h): proto/.dummy
	@touch $@

clean:
	rm -f appendconcat $(objects)
	rm -rf proto
.PHONY: clean

proto/%.pb.cc: proto/.dummy
main.o:  util.h state.h proto/.dummy
util.o:  util.h         proto/.dummy
state.o: util.h state.h proto/.dummy<commit_msg>statically link to avoid having to distribute copies of a bunch of libraries<commit_after>CXXFLAGS += -Iproto $(shell pkg-config --cflags protobuf) -std=c++11 -ggdb -Wall -Wextra

proto   = proto/appendconcat.pb.o proto/appendconcat/time.pb.o \
	  proto/appendconcat/uuid.pb.o proto/appendconcat/site.pb.o \
	  proto/appendconcat/figure.pb.o proto/appendconcat/name.pb.o
objects = main.o util.o state.o $(proto)

all: appendconcat
.PHONY: all

appendconcat: $(objects)
	$(CXX) $(objects) -o $@ $(CXXFLAGS) $(LDFLAGS) -static $(shell pkg-config --libs protobuf) -lboost_program_options -lz

proto/.dummy: $(wildcard definitions/*.proto) $(wildcard definitions/*/*.proto)
	rm -rf proto
	mkdir proto
	protoc --cpp_out=proto -I definitions definitions/*.proto definitions/*/*.proto
	touch proto/.dummy

$(proto:%.o=%.cc) $(proto:%.o=%.h): proto/.dummy
	@touch $@

clean:
	rm -f appendconcat $(objects)
	rm -rf proto
.PHONY: clean

proto/%.pb.cc: proto/.dummy
main.o:  util.h state.h proto/.dummy
util.o:  util.h         proto/.dummy
state.o: util.h state.h proto/.dummy
{'fraction_non_alphanumeric': 0.1654501216545012, 'fraction_numerical': 0.0019464720194647203, 'mean_word_length': 3.7048054919908466, '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': '4340051', 'n_tokens_mistral': 747, 'n_tokens_neox': 720, 'n_words': 179}