40 lines
682 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 19:58:00 +00:00
all: build run run_rust
2024-11-28 17:39:34 +00:00
build:
@# removed -pedantic flag because it doesn't accept ' for formatting numbers
@# using printf
@$(CC) $(CFLAGS) isspam.c -o isspam
2024-11-30 19:58:00 +00:00
build_risspam:
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 19:58:00 +00:00
run_risspam: run_spam_rispam run_not_spam_rispam
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