<commit_before>CC = gcc
BUILD_PATH = build
EXEC = $(BUILD_PATH)/ucwiki
SRC = $(wildcard src/*.c) 
OBJ = $(SRC:src/%.c=$(BUILD_PATH)/%.o)

INCLUDES = -Iinc \
	   -I/usr/include \
	   -I./tanoku-sundown-11d2add/src \
	   -I./tanoku-sundown-11d2add/html \
	   -I./ctemplate-1.0

CFLAGS = -W -Wall -g
LDFLAGS = -L/usr/lib -L$(BUILD_PATH) -lsundown

all: prepare sundown $(EXEC)

prepare:
	mkdir -p $(BUILD_PATH)

$(BUILD_PATH)/%.o: src/%.c
	$(CC) $(CFLAGS) $(INCLUDES) -o $@ -c $<

$(EXEC): $(OBJ)
	$(CC) -o $@ $^ $(LDFLAGS)

sundown:
	make -C tanoku-sundown-11d2add
	cp tanoku-sundown-11d2add/libsundown.so* $(BUILD_PATH)

clean:
	-@(rm -f $(EXEC) $(OBJ))
	make -C tanoku-sundown-11d2add clean
	rm $(BUILD_PATH)/libsundown*<commit_msg>improve Makefile and statically link sundown library<commit_after>CC = gcc
BUILD_PATH = build
EXEC = $(BUILD_PATH)/ucwiki
SD_PATH=tanoku-sundown-11d2add
SRC  = $(wildcard src/*.c)
OBJ = $(SRC:src/%.c=$(BUILD_PATH)/%.o) $(SD_PATH)/libsundown.a

INCLUDES = -Iinc \
	   -I/usr/include \
	   -I./$(SD_PATH)/src \
	   -I./$(SD_PATH)/html \
	   -I./ctemplate-1.0

CFLAGS = -W -Wall -g
LDFLAGS = -L/usr/lib -L$(BUILD_PATH)

all: prepare sundown $(EXEC)

prepare:
	mkdir -p $(BUILD_PATH)

$(BUILD_PATH)/%.o: src/%.c
	$(CC) $(CFLAGS) $(INCLUDES) -o $@ -c $<

$(EXEC): $(OBJ)
	$(CC) -o $@ $^ $(LDFLAGS)

sundown:
	make -C $(SD_PATH) libsundown.a

clean:
	-@(rm -f $(EXEC) $(OBJ))

clear: clean
	make -C $(SD_PATH) clean
{'fraction_non_alphanumeric': 0.21512838306731435, 'fraction_numerical': 0.015267175572519083, 'mean_word_length': 3.2411764705882353, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3324357', 'n_tokens_mistral': 687, 'n_tokens_neox': 645, 'n_words': 130}