-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
63 lines (46 loc) · 1.88 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
51
52
53
54
55
56
57
58
59
60
61
62
63
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This makefile runs correctly on Debian 3.16.7 with gcc 4.9.2 and libzip-dev installed.
# To install libzip dev on debian systems:
# su
# <enter password>
# apt-cache update
# <Lots of stuff follows>
# apt-get install libzip-dev
# To make the executable:
# Copy this file into the directory you unzipped the "cp13.zip" source code into
# At the command line in this directory, type "make". It should compile without errors
# and leave you with a "3mf2stl" executable. Use "make test" to verify that it works.
# Charles Shapiro 3 Oct 2016
#
GCC=gcc
GLN=g++
EXEC=3mf2stl
TESTOUT=Lion_Cookie_Cutter.stl
top: $(EXEC)
test: $(EXEC) ./convert_to_stl.sh Lion_Cookie_Cutter.3mf
chmod +x ./convert_to_stl.sh ; ./convert_to_stl.sh Lion_Cookie_Cutter.3mf
clean:
rm -f $(EXEC) *.o $(TESTOUT)
$(EXEC) : main.o tinyxml2.o triangle.o vertex_3.o utils.o
$(GLN) -o $(EXEC) main.o tinyxml2.o triangle.o vertex_3.o utils.o -lzip
main.o: main.cpp
$(GCC) -c -o main.o main.cpp
tinyxml2.o : tinyxml2.cpp tinyxml2.h
$(GCC) -c -o tinyxml2.o tinyxml2.cpp
vertex_3.o : vertex_3.cpp vertex_3.h
$(GCC) -c -o vertex_3.o vertex_3.cpp
triangle.o : triangle.cpp triangle.h
$(GCC) -c -o triangle.o triangle.cpp
utils.o : utils.cpp utils.h
$(GCC) -c -o utils.o utils.cpp