<commit_before>all : moltengamepad

LDLIBS=-ludev -lpthread
CPPFLAGS+=-std=c++14

SRCS=$(shell echo source/*.cpp source/*/*.cpp source/*/*/*.cpp)
OBJS=$(subst .cpp,.o,$(SRCS))

#Borrowed magic to handle using gcc to generate build dependencies.

DEPDIR := .d/source
$(shell mkdir -p $(DEPDIR) >/dev/null)
$(shell find source -type d -exec mkdir -p .d/{} \;)
DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td

COMPILE.c = $(CC) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
COMPILE.cpp = $(CXX) $(DEPFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
POSTCOMPILE = mv -f $(DEPDIR)/$*.Td $(DEPDIR)/$*.d


.SECONDEXPANSION:
%.o : %.c
%.o : %.c $(DEPDIR)/%.d
	$(COMPILE.c) $(OUTPUT_OPTION) $<
	$(POSTCOMPILE)

.SECONDEXPANSION:
%.o : %.cpp
source/%.o : source/%.cpp $(DEPDIR)/%.d
	$(COMPILE.cpp) $(OUTPUT_OPTION) $<
	$(POSTCOMPILE)

$(DEPDIR)/%.d: ;
.PRECIOUS: $(DEPDIR)/%.d

.SECONDEXPANSION:
-include $(patsubst %,.d/%.d,$(basename $(SRCS)))



moltengamepad : $(OBJS)
	$(CXX) $(LDFLAGS) -o moltengamepad $(OBJS) $(LDLIBS)

clean :
	$(RM) moltengamepad
	$(RM) $(OBJS)

.PHONY: debug
debug : CPPFLAGS+=-DDEBUG -g
debug : moltengamepad

.PHONY: steam
steam : CPPFLAGS+=-DBUILD_STEAM_CONTROLLER_DRIVER
steam : LDLIBS+=-lscraw
steam : moltengamepad
<commit_msg>building made easier to read<commit_after>all : moltengamepad

LDLIBS=-ludev -lpthread
CPPFLAGS+=-std=c++14

SRCS=$(shell echo source/*.cpp source/*/*.cpp source/*/*/*.cpp)
OBJS=$(subst .cpp,.o,$(SRCS))

#Borrowed magic to handle using gcc to generate build dependencies.

DEPDIR := .d/source
$(shell mkdir -p $(DEPDIR) >/dev/null)
$(shell find source -type d -exec mkdir -p .d/{} \;)
DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td

COMPILE.c = $(CC) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
COMPILE.cpp = $(CXX) $(DEPFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
POSTCOMPILE = mv -f $(DEPDIR)/$*.Td $(DEPDIR)/$*.d


.SECONDEXPANSION:
%.o : %.c
%.o : %.c $(DEPDIR)/%.d
	$(COMPILE.c) $(OUTPUT_OPTION) $<
	$(POSTCOMPILE)

.SECONDEXPANSION:
%.o : %.cpp
source/%.o : source/%.cpp $(DEPDIR)/%.d
	@echo "compiling $<..."
	@$(COMPILE.cpp) $(OUTPUT_OPTION) $<
	$(POSTCOMPILE)

$(DEPDIR)/%.d: ;
.PRECIOUS: $(DEPDIR)/%.d

.SECONDEXPANSION:
-include $(patsubst %,.d/%.d,$(basename $(SRCS)))



moltengamepad : $(OBJS)
	$(CXX) $(LDFLAGS) -o moltengamepad $(OBJS) $(LDLIBS)

clean :
	$(RM) moltengamepad
	$(RM) $(OBJS)

.PHONY: debug
debug : CPPFLAGS+=-DDEBUG -g
debug : moltengamepad

.PHONY: steam
steam : CPPFLAGS+=-DBUILD_STEAM_CONTROLLER_DRIVER
steam : LDLIBS+=-lscraw
steam : moltengamepad

{'fraction_non_alphanumeric': 0.2228750489620055, 'fraction_numerical': 0.0015667841754798276, 'mean_word_length': 4.233606557377049, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 5, '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': '542824', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1122, 'n_words': 240}