forked from mkazhdan/PoissonRecon
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (61 loc) · 1.78 KB
/
Makefile
File metadata and controls
79 lines (61 loc) · 1.78 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
PR_TARGET=PoissonRecon
SR_TARGET=SSDRecon
ST_TARGET=SurfaceTrimmer
PR_SOURCE=CmdLineParser.cpp Factor.cpp Geometry.cpp MarchingCubes.cpp PlyFile.cpp PoissonRecon.cpp
SR_SOURCE=CmdLineParser.cpp Factor.cpp Geometry.cpp MarchingCubes.cpp PlyFile.cpp SSDRecon.cpp
ST_SOURCE=CmdLineParser.cpp Factor.cpp Geometry.cpp MarchingCubes.cpp PlyFile.cpp SurfaceTrimmer.cpp
CFLAGS += -Wno-deprecated -Wno-write-strings -std=c++11
LFLAGS += -lstdc++
#
# OpenMP
#
ifndef NO_OPENMP
CFLAGS += -fopenmp
LFLAGS += -lgomp
endif
CFLAGS_DEBUG = -DDEBUG -g3
LFLAGS_DEBUG =
CFLAGS_RELEASE = -O3 -DRELEASE -funroll-loops -ffast-math
LFLAGS_RELEASE = -O3
SRC = Src/
BIN = Bin/Linux/
INCLUDE = /usr/include/
CC=gcc
CXX=g++
MD=mkdir
PR_OBJECTS=$(addprefix $(BIN), $(addsuffix .o, $(basename $(PR_SOURCE))))
SR_OBJECTS=$(addprefix $(BIN), $(addsuffix .o, $(basename $(SR_SOURCE))))
ST_OBJECTS=$(addprefix $(BIN), $(addsuffix .o, $(basename $(ST_SOURCE))))
all: CFLAGS += $(CFLAGS_DEBUG)
all: LFLAGS += $(LFLAGS_DEBUG)
all: $(BIN)
all: $(BIN)$(PR_TARGET)
all: $(BIN)$(SR_TARGET)
all: $(BIN)$(ST_TARGET)
release: CFLAGS += $(CFLAGS_RELEASE)
release: LFLAGS += $(LFLAGS_RELEASE)
release: $(BIN)
release: $(BIN)$(PR_TARGET)
release: $(BIN)$(SR_TARGET)
release: $(BIN)$(ST_TARGET)
clean:
rm -f $(BIN)$(PR_TARGET)
rm -f $(BIN)$(SR_TARGET)
rm -f $(BIN)$(ST_TARGET)
rm -f $(PR_OBJECTS)
rm -f $(SR_OBJECTS)
rm -f $(ST_OBJECTS)
$(BIN):
$(MD) -p $(BIN)
$(BIN)$(PR_TARGET): $(PR_OBJECTS)
$(CXX) -o $@ $(PR_OBJECTS) $(LFLAGS)
$(BIN)$(SR_TARGET): $(SR_OBJECTS)
$(CXX) -o $@ $(SR_OBJECTS) $(LFLAGS)
$(BIN)$(ST_TARGET): $(ST_OBJECTS)
$(CXX) -o $@ $(ST_OBJECTS) $(LFLAGS)
$(BIN)%.o: $(SRC)%.c
mkdir -p $(BIN)
$(CC) -c -o $@ $(CFLAGS) -I$(INCLUDE) $<
$(BIN)%.o: $(SRC)%.cpp
mkdir -p $(BIN)
$(CXX) -c -o $@ $(CFLAGS) -I$(INCLUDE) $<