<commit_before># swc: Makefile

.PHONY: all
all: build

VERSION_MAJOR   := 0
VERSION_MINOR   := 0
VERSION         := $(VERSION_MAJOR).$(VERSION_MINOR)

TARGETS         := swc.pc
SUBDIRS         := launch libswc protocol
CLEAN_FILES     := $(TARGETS)

include config.mk

ifeq ($(if $(V),$(V),0), 0)
    define quiet
        @echo "  $1	$@"
        @$(if $2,$2,$($1))
    endef
else
    quiet = $(if $2,$2,$($1))
endif

define check_deps
    @echo "Checking for dependencies of $1 ($2)"
    @$(PKG_CONFIG) --exists --print-errors $2
endef

override CFLAGS += -fvisibility=hidden

compile     = $(call quiet,CC) $(CPPFLAGS) $(CFLAGS) -I . -c -o $@ $< \
              -MMD -MP -MF .deps/$(basename $<).d -MT $(basename $@).o -MT $(basename $@).lo
link        = $(call quiet,CCLD,$(CC)) $(CFLAGS) -o $@ $^
pkgconfig   = $(sort $(foreach pkg,$(1),$(if $($(pkg)_$(3)),$($(pkg)_$(3)), \
                                           $(shell $(PKG_CONFIG) --$(2) $(pkg)))))

include $(SUBDIRS:%=%/Makefile.local)

$(foreach dir,BIN LIB INCLUDE PKGCONFIG,$(DESTDIR)$($(dir)DIR)):
	mkdir -p "$@"

.PHONY: check-dependencies
check-dependencies: $(SUBDIRS:%=check-dependencies-%)

.PHONY: build
build: $(SUBDIRS:%=build-%) $(TARGETS)

swc.pc: swc.pc.in<commit_msg>Use FINAL_CFLAGS instead of override<commit_after># swc: Makefile

.PHONY: all
all: build

VERSION_MAJOR   := 0
VERSION_MINOR   := 0
VERSION         := $(VERSION_MAJOR).$(VERSION_MINOR)

TARGETS         := swc.pc
SUBDIRS         := launch libswc protocol
CLEAN_FILES     := $(TARGETS)

include config.mk

ifeq ($(if $(V),$(V),0), 0)
    define quiet
        @echo "  $1	$@"
        @$(if $2,$2,$($1))
    endef
else
    quiet = $(if $2,$2,$($1))
endif

define check_deps
    @echo "Checking for dependencies of $1 ($2)"
    @$(PKG_CONFIG) --exists --print-errors $2
endef

FINAL_CFLAGS = $(CFLAGS) -fvisibility=hidden
FINAL_CPPFLAGS = $(CPPFLAGS)

compile     = $(call quiet,CC) $(FINAL_CPPFLAGS) $(FINAL_CFLAGS) -I . -c -o $@ $< \
              -MMD -MP -MF .deps/$(basename $<).d -MT $(basename $@).o -MT $(basename $@).lo
link        = $(call quiet,CCLD,$(CC)) $(FINAL_CFLAGS) -o $@ $^
pkgconfig   = $(sort $(foreach pkg,$(1),$(if $($(pkg)_$(3)),$($(pkg)_$(3)), \
                                           $(shell $(PKG_CONFIG) --$(2) $(pkg)))))

include $(SUBDIRS:%=%/Makefile.local)

$(foreach dir,BIN LIB INCLUDE PKGCONFIG,$(DESTDIR)$($(dir)DIR)):
	mkdir -p "$@"

.PHONY: check-dependencies
check-dependencies: $(SUBDIRS:%=check-dependencies-%)

.PHONY: build
build: $(SUBDIRS:%=build-%) $(TARGETS)

swc.pc: swc.pc.in
{'fraction_non_alphanumeric': 0.21228615863141523, 'fraction_numerical': 0.013996889580093312, 'mean_word_length': 2.9222560975609757, 'pattern_counts': {'":': 0, '<': 7, '<?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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1125059', 'n_tokens_mistral': 1010, 'n_tokens_neox': 960, 'n_words': 223}