From 96ecf29e8be977f51f351308ef2c7c492bb829aa Mon Sep 17 00:00:00 2001 From: Ethan Werner Date: Tue, 9 Jun 2026 01:17:41 +0400 Subject: refactor --- example/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 example/Makefile (limited to 'example/Makefile') diff --git a/example/Makefile b/example/Makefile new file mode 100644 index 0000000..67a7746 --- /dev/null +++ b/example/Makefile @@ -0,0 +1,20 @@ +CC = gcc +CFLAGS = -Wall -Wextra -Werror -pedantic -std=c99 -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wformat-security -Wnull-dereference -I ../include +LDFLAGS = -lm + +EXAMPLES = ann_xor buffer bin direct escape genetic_ann genetic_char \ + genetic_pushdown_btc pool pushdown stack ufo + +.PHONY: all clean run + +all: $(EXAMPLES) + +%: %.c + $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) + +clean: + rm -f $(EXAMPLES) + +run: all + @for ex in $(EXAMPLES); do \ + echo ">>> $$ex"; ./$$ex; echo; done -- cgit v1.3.1