-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
50 lines (33 loc) · 1.4 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
all: adviceBuild compile link
compiler:="g++"
linker:="g++"
cppVersion:="c++17"
buildDir:="build"
adviceBuild:
@echo "building graphml, use \"make install\" to install it if needed."
link:linkMain
install:
@echo "Please use \"make installLinux\" or \"make installMacOS\", on windows just add \"$$(pwd)/build/\" to the path"
compile: compileOperators compileError compileParser compileCairoInterpreter compileCairoInterpreter001 compileGisl compileMain
compileOperators:
@$(compiler) -std=$(cppVersion) -c src/operators.cpp -o $(buildDir)/operators.o
compileError:
@$(compiler) -std=$(cppVersion) -c src/error.cpp -o $(buildDir)/error.o
compileParser:
@$(compiler) -std=$(cppVersion) -c src/parser.cpp -o $(buildDir)/parser.o
compileGisl:
@$(compiler) -std=$(cppVersion) -c src/gisl.cpp -o $(buildDir)/gisl.o
compileMain:
@$(compiler) -std=$(cppVersion) -c src/main.cpp -o $(buildDir)/main.o
compileCairoInterpreter:
@$(compiler) -std=$(cppVersion) -c src/cairoInterpreter.cpp -o $(buildDir)/cairoInterpreter.o
compileCairoInterpreter001:
@$(compiler) -std=$(cppVersion) -c src/cairoInterpreter0.0.1.cpp -o $(buildDir)/cairoInterpreter0.0.1.o
onlyMain:
@$(compiler) -std=$(cppVersion) ./src/main.cpp -lxml2 -lcairo build/*.o -o build/main
linkMain:
@$(linker) $(buildDir)/*.o -lxml2 -lcairo -o $(buildDir)/graphml
installMacOS:
cp build/graphml /usr/local/bin/
installLinux:
cp build/graphml /usr/bin/