summaryrefslogtreecommitdiffstats
path: root/example/Makefile
diff options
context:
space:
mode:
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