-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
158 lines (134 loc) · 5.22 KB
/
Makefile
File metadata and controls
158 lines (134 loc) · 5.22 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#----------------------------------------------------------------------------------------
# This section in Makefile defines version variables for various libraries used in the
# project. These variables specify the versions of external dependencies used during the
# build process.
#----------------------------------------------------------------------------------------
# Define the version of CGAL library
CGAL_VERSION=5.6
# Define the version of IGL library
LIBIGL_VERSION=2.5.0
# Define the version of CORK library
CORK_VERSION=master
# Define the version of MCUT library
MCUT_VERSION=1.2.0
# Define the version of IRMB library
IRMB_VERSION=main
# Define commands to download library source code archives
CGAL_DOWNLOAD = wget -c https://github.com/CGAL/cgal/archive/refs/tags/v$(CGAL_VERSION).tar.gz -O ./cgal/cgal-$(CGAL_VERSION).tar.gz
LIBIGL_DOWNLOAD = wget -c https://github.com/libigl/libigl/archive/refs/tags/v$(LIBIGL_VERSION).tar.gz -O ./libigl/libigl-$(LIBIGL_VERSION).tar.gz
CORK_DOWNLOAD = wget -c https://github.com/gilbo/cork/archive/refs/heads/$(CORK_VERSION).tar.gz -O ./cork/cork-$(CORK_VERSION).tar.gz
MCUT_DOWNLOAD = wget -c https://github.com/cutdigital/mcut/archive/refs/tags/v$(MCUT_VERSION).tar.gz -O ./mcut/mcut-$(MCUT_VERSION).tar.gz
IRMB_DOWNLOAD = wget -c https://github.com/gcherchi/InteractiveAndRobustMeshBooleans/archive/refs/heads/$(IRMB_VERSION).tar.gz -O ./irmb/irmb-$(IRMB_VERSION).tar.gz
# List of targets to be executed
LIST_MAKE_EXECUTE = \
download-dependencies \
cgal-build \
libigl-build \
cork-build \
mcut-build \
irmb-build
# Target to download the required source code for libraries and dependencies
download-dependencies:
@if [ ! -f ./cgal/cgal-$(CGAL_VERSION).tar.gz ]; then \
$(CGAL_DOWNLOAD); \
fi
@if [ ! -f ./libigl/libigl-$(LIBIGL_VERSION).tar.gz ]; then \
$(LIBIGL_DOWNLOAD); \
fi
@if [ ! -f ./cork/cork-$(CORK_VERSION).tar.gz ]; then \
$(CORK_DOWNLOAD); \
fi
@if [ ! -f ./mcut/mcut-$(MCUT_VERSION).tar.gz ]; then \
$(MCUT_DOWNLOAD); \
fi
@if [ ! -f ./irmb/irmb-$(IRMB_VERSION).tar.gz ]; then \
$(IRMB_DOWNLOAD); \
fi
cgal-build:
@echo ""
@echo "*============================================================*"
@echo " Now compiling CGAL for you, please be patient:"
@echo "*============================================================*"
@echo ""
@echo "*---------------------------------*"
@echo " Untarring cgal-$(CGAL_VERSION).tar.gz"
@echo "*---------------------------------*"
if [ ! -d "cgal/cgal" ]; then \
cd cgal && \
tar -xf cgal-$(CGAL_VERSION).tar.gz && \
mv cgal-$(CGAL_VERSION) cgal; \
else \
echo "CGAL directory already exists, skipping untar operation."; \
fi
libigl-build:
@echo ""
@echo "*============================================================*"
@echo " Now compiling libigl for you be patient:"
@echo "*============================================================*"
@echo ""
@echo "*---------------------------------*"
@echo " untaring libigl-$(LIBIGL_VERSION).tar.gz"
@echo "*---------------------------------*"
if [ ! -d "libigl/libigl" ]; then \
cd libigl && \
[ ! -d "libigl" ] && tar -xf libigl-$(LIBIGL_VERSION).tar.gz && \
mv libigl-$(LIBIGL_VERSION) libigl ; \
else \
echo "libigl directory already exists, skipping untar operation."; \
fi
cork-build:
@echo ""
@echo "*============================================================*"
@echo " Now compiling cork for you be patient:"
@echo "*============================================================*"
@echo ""
@echo "*---------------------------------*"
@echo " untaring cork-$(CORK_VERSION).tar.gz"
@echo "*---------------------------------*"
if [ ! -d "cork/cork" ]; then \
cd cork && \
[ ! -d "cork" ] && tar -xf cork-$(CORK_VERSION).tar.gz && \
mv cork-$(CORK_VERSION) cork ; \
else \
echo "cork directory already exists, skipping untar operation."; \
fi
mcut-build:
@echo ""
@echo "*============================================================*"
@echo " Now compiling mcut for you be patient:"
@echo "*============================================================*"
@echo ""
@echo "*---------------------------------*"
@echo " untaring mcut-$(MCUT_VERSION).tar.gz"
@echo "*---------------------------------*"
if [ ! -d "mcut/mcut" ]; then \
cd mcut && \
[ ! -d "mcut" ] && tar -xf mcut-$(MCUT_VERSION).tar.gz && \
mv mcut-$(MCUT_VERSION) mcut ; \
else \
echo "mcut directory already exists, skipping untar operation."; \
fi
irmb-build:
@echo ""
@echo "*============================================================*"
@echo " Now compiling irmb for you be patient:"
@echo "*============================================================*"
@echo ""
@echo "*---------------------------------*"
@echo " untaring irmb-$(IRMB_VERSION).tar.gz"
@echo "*---------------------------------*"
if [ ! -d "irmb/irmb" ]; then \
cd irmb && \
[ ! -d "irmb" ] && tar -xf irmb-$(IRMB_VERSION).tar.gz && \
mv InteractiveAndRobustMeshBooleans-$(IRMB_VERSION) irmb ; \
else \
echo "irmb directory already exists, skipping untar operation."; \
fi
UI_FILES := $(wildcard *.ui)
PY_FILES := $(UI_FILES:.ui=_ui.py)
all: $(PY_FILES) $(LIST_MAKE_EXECUTE)
%_ui.py: %.ui
pyuic5 $< -o $@
clean:
rm -f $(PY_FILES)
.PHONY: all clean