<commit_before>INC_PATH=include/
CFLAGS=-c -Wall
TARGET=out/libd.a
TEST_BUILD=out/test
OBJ_PATH=obj/
SRC_PATH=src/
TEST_FILE=AllTest.c
TEST_FILE_OBJ=AllTest.o
TEST_FILES=$(wildcard test/src/**/*.c)
TEST_OBJ_FILES=$(TEST_FILES:.c=.o)

build: $(TARGET)

$(TARGET):
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)base/stack.c -o $(OBJ_PATH)stack.o
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)base/clist.c -o $(OBJ_PATH)clist.o
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)base/d_malloc.c -o $(OBJ_PATH)d_malloc.o
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)base/hash.c -o $(OBJ_PATH)hash.o
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)base/util.c -o $(OBJ_PATH)util.o
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)mm.c -o $(OBJ_PATH)mm.o
	ar rcs $(TARGET) $(OBJ_PATH)*.o

test: $(TEST_BUILD)
	out/test

$(TEST_FILE):
	test/search-script.sh > test/obj/$(TEST_FILE)

$(TEST_BUILD): $(TARGET) $(TEST_FILE)
	gcc $(CFLAGS) -I$(INC_PATH) test/src/mm.c -o test/obj/mm.o 
	gcc $(CFLAGS) -I$(INC_PATH) test/src/base/stackTest.c -o test/obj/stackTest.o 
	gcc $(CFLAGS) -I$(INC_PATH) test/src/base/hashTest.c -o test/obj/hashTest.o 
	gcc $(CFLAGS) -I$(INC_PATH) test/src/base/clistTest.c -o test/obj/clistTest.o 
	gcc $(CFLAGS) -I$(INC_PATH) test/obj/$(TEST_FILE) -o test/obj/$(TEST_FILE_OBJ)
	gcc $(CFLAGS) -I$(INC_PATH) test/cutest/CuTest.c -o test/obj/CuTest.o
	gcc test/obj/*.o -Lout/ -ld -o out/test


clean:
	rm -f out/*
	rm -f obj/*
	rm -f test/obj/*<commit_msg>Added Creation of output folders<commit_after>INC_PATH=include/
CFLAGS=-c -Wall
OUT_PATH=out/
TARGET=$(OUT_PATH)libd.a
TEST_BUILD=$(OUT_PATH)test
OBJ_PATH=obj/
SRC_PATH=src/
TEST_FILE=AllTest.c
TEST_FILE_OBJ=AllTest.o
TEST_FILES=$(wildcard test/src/**/*.c)
TEST_OBJ_FILES=$(TEST_FILES:.c=.o)

build: $(TARGET)

$(TARGET):
	mkdir -p $(OBJ_PATH)
	mkdir -p $(OUT_PATH)
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)base/stack.c -o $(OBJ_PATH)stack.o
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)base/clist.c -o $(OBJ_PATH)clist.o
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)base/d_malloc.c -o $(OBJ_PATH)d_malloc.o
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)base/hash.c -o $(OBJ_PATH)hash.o
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)base/util.c -o $(OBJ_PATH)util.o
	gcc $(CFLAGS) -I$(INC_PATH) $(SRC_PATH)mm.c -o $(OBJ_PATH)mm.o
	ar rcs $(TARGET) $(OBJ_PATH)*.o

test: $(TEST_BUILD)
	$(OUT_PATH)test

$(TEST_FILE):
	mkdir -p test/obj/
	test/search-script.sh > test/obj/$(TEST_FILE)

$(TEST_BUILD): $(TARGET) $(TEST_FILE)
	mkdir -p test/obj/
	gcc $(CFLAGS) -I$(INC_PATH) test/src/mm.c -o test/obj/mm.o 
	gcc $(CFLAGS) -I$(INC_PATH) test/src/base/stackTest.c -o test/obj/stackTest.o 
	gcc $(CFLAGS) -I$(INC_PATH) test/src/base/hashTest.c -o test/obj/hashTest.o 
	gcc $(CFLAGS) -I$(INC_PATH) test/src/base/clistTest.c -o test/obj/clistTest.o 
	gcc $(CFLAGS) -I$(INC_PATH) test/obj/$(TEST_FILE) -o test/obj/$(TEST_FILE_OBJ)
	gcc $(CFLAGS) -I$(INC_PATH) test/cutest/CuTest.c -o test/obj/CuTest.o
	gcc test/obj/*.o -Lout/ -ld -o out/test

clean:
	rm -rf out/*
	rm -rf obj/*
	rm -rf test/obj/*
{'fraction_non_alphanumeric': 0.20548862115127176, 'fraction_numerical': 0.0, 'mean_word_length': 4.424682395644283, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4052618', 'n_tokens_mistral': 1447, 'n_tokens_neox': 1340, 'n_words': 248}