summaryrefslogtreecommitdiff
path: root/impl/Makefile
blob: 7df94a066c6bfeaf240099c321cb12faa5706275 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CC=gcc
CPP=g++
BUILD=build/
FLAGS=-Wall -Werror -g -lantlr3c

all: main

main: build-dir grammar
	$(CPP) main.cpp *.o -o $(BUILD)/main $(FLAGS)

grammar: build-dir
	java -jar antlr/antlr-3.4-complete.jar EquationSystem.g
	$(CC) *.c -c -lantrl3c

build-dir:
	mkdir -p $(BUILD)

clean:
	rm -rf $(BUILD)
	rm *.o *.c *.h *.tokens
	# antlr o, c, h and tokens files