summaryrefslogtreecommitdiffstats
path: root/example/Makefile
blob: 67a7746e28620287ae2b703cc29442cf48cb6ce4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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