summaryrefslogtreecommitdiffstats
path: root/example/Makefile
diff options
context:
space:
mode:
authorEthan Werner <mail@ethanwerner.com>2026-06-09 01:17:41 +0400
committerEthan Werner <mail@ethanwerner.com>2026-06-09 01:17:41 +0400
commit96ecf29e8be977f51f351308ef2c7c492bb829aa (patch)
treec664aa61262e6f7627a732f0e4fbb84281b99952 /example/Makefile
parentf6a144987cc403de8ad6bddd055f756120f8d405 (diff)
refactor
Diffstat (limited to 'example/Makefile')
-rw-r--r--example/Makefile20
1 files changed, 20 insertions, 0 deletions
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