42 lines
804 B
Makefile
Raw Normal View History

2024-11-28 17:39:34 +00:00
CC = gcc
CFLAGS = -Wall -Werror -Wextra -Ofast -std=c2x
2024-11-30 20:10:24 +00:00
all: build run valgrind build_risspam run_risspam
2024-11-28 17:39:34 +00:00
build:
2024-11-30 21:05:06 +00:00
@echo "Compiling retoor_c project.".
2024-11-28 17:39:34 +00:00
@# removed -pedantic flag because it doesn't accept ' for formatting numbers
@# using printf
2024-11-30 21:05:06 +00:00
@$(CC) $(CFLAGS) retoor_c/isspam.c -o isspam
2024-11-28 17:39:34 +00:00
2024-11-30 19:58:00 +00:00
build_risspam:
2024-11-30 21:11:41 +00:00
@echo "Compiling 12bitfloat_risspam project."
2024-11-30 19:58:00 +00:00
cd 12bitfloat_rust/risspam && cargo run --release && cp target/release/risspam ../../
2024-11-28 17:39:34 +00:00
run: run_spam wl run_not_spam
2024-11-30 20:04:01 +00:00
run_risspam: run_spam_risspam run_not_spam_risspam
2024-11-30 19:58:00 +00:00
2024-11-28 17:39:34 +00:00
format:
clang-format *.c *.h -i
wl:
@echo ""
run_spam:
@./isspam ./spam/*.txt
run_not_spam:
@./isspam ./not_spam/*.txt
2024-11-30 19:58:00 +00:00
run_spam_risspam:
@./risspam ./spam/*.txt
run_not_spam_risspam:
@./risspam ./not_spam/*.txt
2024-11-28 17:39:34 +00:00
valgrind: build
2024-11-30 19:58:00 +00:00
valgrind ./isspam ./spam/*.txt