forked from potree/PotreeConverter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
45 lines (35 loc) · 1.21 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
.PHONY: default
default: build
# OLD
# [ -d $@ ] || git clone https://github.com/m-schuetz/LAStools.git
# # Patch it
# cp LAStools/LASlib/src/Makefile LAStools/LASlib/src/Makefile.old && \
# sed 's/COMPILER = g++$$/COMPILER = ${CXX}/g' < LAStools/LASlib/src/Makefile.old > LAStools/LASlib/src/Makefile
LASzip:
cd LAStools/LASzip && \
mkdir -p build && cd build && \
CC="$(CC)" CXX="$(CXX)" cmake -DCMAKE_BUILD_TYPE=Release .. \
-DCMAKE_C_COMPILER="$(CC)" -DCMAKE_CXX_COMPILER="$(CXX)" && \
make -j$(nproc)
.PHONY: LAStools
LAStools: LASzip
cd LAStools/LASlib/src && \
CC="$(CC)" CXX="$(CXX)" make && \
cd ../../src && \
LIBS="-llaszip -L../LASzip/build/src" CC="$(CC)" CXX="$(CXX)" make
HERE=$(realpath ./)
PotreeConverter: LASzip
mkdir -p build && cd build && \
CC="$(CC)" CXX="$(CXX)" cmake .. \
-DCMAKE_C_COMPILER="$(CC)" -DCMAKE_CXX_COMPILER="$(CXX)" \
-DCMAKE_BUILD_TYPE=Release \
-DLASZIP_INCLUDE_DIRS=$(HERE)/LAStools/LASzip/dll \
-DLASZIP_LIBRARY_DIR=$(HERE)/LAStools/LASzip/build/src/ && \
make -j$(nproc)
# -DLASZIP_LIBRARY=$(HERE)/LAStools/LASzip/build/src/liblaszip.dylib && \
.PHONY: build
build: PotreeConverter LAStools
.PHONY: clean
clean:
rm -rf build
cd LAStools && make clean