-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcompile.sh
executable file
·42 lines (34 loc) · 1.13 KB
/
compile.sh
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
#!/bin/bash
# create sub-directories
mkdir -p obj/inc/pugixml
# delete old files:
rm obj/inc/pugixml/*.o &> /dev/null
rm obj/inc/*.o &> /dev/null
rm obj/*.o &> /dev/null
rm QET_ElementScaler &> /dev/null
echo ""
echo ""
echo ""
echo "--------------------------------------------------------------------------------"
Compiler="g++"
CompileOptions="-Wall -std=c++17 -O2"
# compile
$Compiler $CompileOptions -c inc/pugixml/pugixml.cpp -o obj/inc/pugixml/pugixml.o
$Compiler $CompileOptions -c inc/helpers.cpp -o obj/inc/helpers.o
$Compiler $CompileOptions -c inc/elements.cpp -o obj/inc/elements.o
$Compiler $CompileOptions -c main.cpp -o obj/main.o
# link:
$Compiler -o QET_ElementScaler \
obj/inc/pugixml/pugixml.o \
obj/inc/helpers.o \
obj/inc/elements.o \
obj/main.o \
-s
# delete object-files again:
rm obj/inc/pugixml/*.o &> /dev/null
rm obj/inc/*.o &> /dev/null
rm obj/*.o &> /dev/null
echo "--------------------------------------------------------------------------------"
echo ""
echo ""
echo ""