<commit_before>CPPFLAGS := -MMD -MP
CFLAGS += -O2 -Iinclude -std=c11 -Wall -Wextra -pedantic
CFLAGS += -Wunused -Wno-implicit-fallthrough
LDFLAGS += -Wl,--as-needed,-O2,-z,relro,-z,now
LDLIBS += -lm

TARGET := oak
SRC := $(wildcard src/*.c)
OBJ = $(SRC:.c=.o) $(TARGET).o
DEP = $(OBJ:.o=.d)

all: $(TARGET)

debug: all
debug: CFLAGS += -g -Og
debug: LDFLAGS += -g -Og

$(TARGET): $(OBJ)
	$(LINK.o) $^ $(LDLIBS) -o $@

clean: $(TARGET)
	$(RM) $(OBJ) $(DEP) $(TARGET)

-include $(DEP)

.PHONY: all debug clean<commit_msg>Makefile: fix debug target flags<commit_after>CC ?= gcc
LD = $(CC)

CPPFLAGS += -MMD -MP
CFLAGS += -std=c11 -Wall -Wextra -pedantic-errors -Iinclude
CFLAGS += -fuse-ld=gold -flto -fuse-linker-plugin
CFLAGS += -Wno-missing-field-initializers -Wstrict-overflow
CFLAGS += -Wunused -Wno-implicit-fallthrough
LDFLAGS += -fuse-ld=gold -flto -fuse-linker-plugin
LDFLAGS += -Wl,-O2,-z,relro,-z,now,--sort-common,--as-needed

TARGET := oak
LIBS := -lm
SRC := $(wildcard src/*.c)
HDR := $(wildcard include/*.h)
OBJ := $(SRC:.c=.o) $(TARGET).o
DEP := $(OBJ:.o=.d) $(TARGET).d

all: CFLAGS += -O2
all:
	@$(MAKE) $(TARGET) CFLAGS="$(CFLAGS)"

debug: CFLAGS += -g -Og
debug: CFLAGS += -Wfloat-equal -Wrestrict -Wshadow
# exposes a couple multiple definition errors
# debug: CFLAGS += -fno-builtin -fno-common -fno-inline
debug:
	@$(MAKE) $(TARGET) CFLAGS="$(CFLAGS)"

$(TARGET): $(OBJ)
	$(LD) $(LDFLAGS) $^ $(LIBS) -o $@
%.o %.d: %.c $(HDR)
	$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
clean:
	$(RM) $(OBJ) $(DEP) $(TARGET)

-include $(DEP)
.PHONY: all debug clean $(DEP) $(HDR)
{'fraction_non_alphanumeric': 0.23622545915136162, 'fraction_numerical': 0.00506649778340722, 'mean_word_length': 3.817073170731707, 'pattern_counts': {'":': 0, '<': 4, '<?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': '4271469', 'n_tokens_mistral': 694, 'n_tokens_neox': 652, 'n_words': 163}