aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 4fd4faf4845a49e2b64d54fce8387e157b0b55dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
LIB_FILES  = src/nodes.cc src/tree.cc src/parser.cc
PROG_FILES = main.cc
TEST_FILES = test.cc

FLAGS  = -std=c++11 -W -Wall -Wextra -pedantic
PARSER = -o bin/parser $(FLAGS) $(PROG_FILES) $(LIB_FILES)

all: dev test

dev: $(PROG_FILES) $(LIB_FILES)
	g++ -g $(PARSER)

release: $(PROG_FILES) $(LIB_FILES)
	g++ -O3 $(PARSER)

test: $(LIB_FILES) $(TEST_FILES)
	g++ -O3 -o bin/test -lgtest $(TEST_FILES) $(FLAGS) $(LIB_FILES)
	./bin/test