Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ LFLAGS_DEBUG =

#CFLAGS_RELEASE = -O3 -DRELEASE -funroll-loops -ffast-math -g
#LFLAGS_RELEASE = -O3 -g
CFLAGS_RELEASE = -O3 -DRELEASE -funroll-loops -ffast-math -g
LFLAGS_RELEASE = -O3 -g
CFLAGS_RELEASE = -O3 -DRELEASE -ffast-math -g0
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why -funroll-loops was removed, we may want to restore it.

LFLAGS_RELEASE = -O3 -g0

SRC = Src/
BIN = Bin/Linux/
Expand Down Expand Up @@ -210,13 +210,13 @@ clean:
rm -rf $(RE_OBJECTS)
rm -rf $(PTD_OBJECTS)
rm -rf $(SN_OBJECTS)
cd PNG && make clean
cd PNG && $(MAKE) clean

make_dir:
$(MD) -p $(BIN)

$(BIN)$(PR_TARGET): $(PR_OBJECTS)
cd PNG && make COMPILER=$(COMPILER)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(PR_OBJECTS) -L$(BIN) $(LFLAGS) $(LFLAGS_IMG)

$(BIN)$(PRC_TARGET): $(PRC_OBJECTS)
Expand All @@ -226,11 +226,11 @@ $(BIN)$(PRS_TARGET): $(PRS_OBJECTS)
$(CXX) -pthread -o $@ $(PRS_OBJECTS) -L$(BIN) -lboost_system $(LFLAGS)

$(BIN)$(SR_TARGET): $(SR_OBJECTS)
cd PNG && make COMPILER=$(COMPILER)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(SR_OBJECTS) -L$(BIN) $(LFLAGS) $(LFLAGS_IMG)

$(BIN)$(PI_TARGET): $(PI_OBJECTS)
cd PNG && make COMPILER=$(COMPILER)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(PI_OBJECTS) -L$(BIN) $(LFLAGS) $(LFLAGS_IMG)

$(BIN)$(ST_TARGET): $(ST_OBJECTS)
Expand All @@ -240,15 +240,15 @@ $(BIN)$(EH_TARGET): $(EH_OBJECTS)
$(CXX) -pthread -o $@ $(EH_OBJECTS) $(LFLAGS)

$(BIN)$(IS_TARGET): $(IS_OBJECTS)
cd PNG && make COMPILER=$(COMPILER)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(IS_OBJECTS) -L$(BIN) $(LFLAGS) $(LFLAGS_IMG)

$(BIN)$(AV_TARGET): $(AV_OBJECTS)
cd PNG && make COMPILER=$(COMPILER)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(AV_OBJECTS) -L$(BIN) $(LFLAGS) $(LFLAGS_IMG)

$(BIN)$(CP_TARGET): $(CP_OBJECTS)
cd PNG && make COMPILER=$(COMPILER)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(CP_OBJECTS) -L$(BIN) $(LFLAGS) $(LFLAGS_IMG)

$(BIN)$(RE_TARGET): $(RE_OBJECTS)
Expand Down
173 changes: 173 additions & 0 deletions Makefile.macos
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
PR_TARGET=PoissonRecon
SR_TARGET=SSDRecon
PI_TARGET=PointInterpolant
ST_TARGET=SurfaceTrimmer
EH_TARGET=EDTInHeat
IS_TARGET=ImageStitching
AV_TARGET=AdaptiveTreeVisualization
CP_TARGET=ChunkPLY
PR_SOURCE=PoissonRecon.cpp
SR_SOURCE=SSDRecon.cpp
PI_SOURCE=PointInterpolant.cpp
ST_SOURCE=SurfaceTrimmer.cpp
EH_SOURCE=EDTInHeat.cpp
IS_SOURCE=ImageStitching.cpp
AV_SOURCE=AdaptiveTreeVisualization.cpp
CP_SOURCE=ChunkPLY.cpp

COMPILER ?= gcc
CFLAGS += -fopenmp -Wno-deprecated -std=c++14 -pthread -Wno-invalid-offsetof
LFLAGS += -lgomp -lstdc++ -lpthread -L/opt/homebrew/lib

CFLAGS_DEBUG = -DDEBUG -g3
LFLAGS_DEBUG =

#CFLAGS_RELEASE = -O3 -DRELEASE -funroll-loops -ffast-math -g
#LFLAGS_RELEASE = -O3 -g
CFLAGS_RELEASE = -O3 -DRELEASE -ffast-math -g0
LFLAGS_RELEASE = -O3 -g0

SRC = Src/
BIN = Bin/Linux/
#INCLUDE = /usr/include/
INCLUDE = . -I/opt/homebrew/include

CC=gcc
CXX=$(COMPILER)


MD=mkdir

PR_OBJECTS=$(addprefix $(BIN), $(addsuffix .o, $(basename $(PR_SOURCE))))
SR_OBJECTS=$(addprefix $(BIN), $(addsuffix .o, $(basename $(SR_SOURCE))))
PI_OBJECTS=$(addprefix $(BIN), $(addsuffix .o, $(basename $(PI_SOURCE))))
ST_OBJECTS=$(addprefix $(BIN), $(addsuffix .o, $(basename $(ST_SOURCE))))
EH_OBJECTS=$(addprefix $(BIN), $(addsuffix .o, $(basename $(EH_SOURCE))))
IS_OBJECTS=$(addprefix $(BIN), $(addsuffix .o, $(basename $(IS_SOURCE))))
AV_OBJECTS=$(addprefix $(BIN), $(addsuffix .o, $(basename $(AV_SOURCE))))
CP_OBJECTS=$(addprefix $(BIN), $(addsuffix .o, $(basename $(CP_SOURCE))))


all: CFLAGS += $(CFLAGS_RELEASE)
all: LFLAGS += $(LFLAGS_RELEASE)
all: make_dir
all: $(BIN)$(PR_TARGET)
all: $(BIN)$(SR_TARGET)
all: $(BIN)$(PI_TARGET)
all: $(BIN)$(ST_TARGET)
all: $(BIN)$(EH_TARGET)
all: $(BIN)$(IS_TARGET)
all: $(BIN)$(AV_TARGET)
all: $(BIN)$(CP_TARGET)

debug: CFLAGS += $(CFLAGS_DEBUG)
debug: LFLAGS += $(LFLAGS_DEBUG)
debug: make_dir
debug: $(BIN)$(PR_TARGET)
debug: $(BIN)$(SR_TARGET)
debug: $(BIN)$(PI_TARGET)
debug: $(BIN)$(ST_TARGET)
debug: $(BIN)$(EH_TARGET)
debug: $(BIN)$(IS_TARGET)
debug: $(BIN)$(AV_TARGET)
debug: $(BIN)$(CP_TARGET)

poissonrecon: CFLAGS += $(CFLAGS_RELEASE)
poissonrecon: LFLAGS += $(LFLAGS_RELEASE)
poissonrecon: make_dir
poissonrecon: $(BIN)$(PR_TARGET)

ssdrecon: CFLAGS += $(CFLAGS_RELEASE)
ssdrecon: LFLAGS += $(LFLAGS_RELEASE)
ssdrecon: make_dir
ssdrecon: $(BIN)$(SR_TARGET)

pointinterpolant: CFLAGS += $(CFLAGS_RELEASE)
pointinterpolant: LFLAGS += $(LFLAGS_RELEASE)
pointinterpolant: make_dir
pointinterpolant: $(BIN)$(PI_TARGET)

surfacetrimmer: CFLAGS += $(CFLAGS_RELEASE)
surfacetrimmer: LFLAGS += $(LFLAGS_RELEASE)
surfacetrimmer: make_dir
surfacetrimmer: $(BIN)$(ST_TARGET)

edtinheat: CFLAGS += $(CFLAGS_RELEASE)
edtinheat: LFLAGS += $(LFLAGS_RELEASE)
edtinheat: make_dir
edtinheat: $(BIN)$(EH_TARGET)

imagestitching: CFLAGS += $(CFLAGS_RELEASE)
imagestitching: LFLAGS += $(LFLAGS_RELEASE)
imagestitching: make_dir
imagestitching: $(BIN)$(IS_TARGET)

octreevisualization: CFLAGS += $(CFLAGS_RELEASE)
octreevisualization: LFLAGS += $(LFLAGS_RELEASE)
octreevisualization: make_dir
octreevisualization: $(BIN)$(AV_TARGET)

chunkply: CFLAGS += $(CFLAGS_RELEASE)
chunkply: LFLAGS += $(LFLAGS_RELEASE)
chunkply: make_dir
chunkply: $(BIN)$(CP_TARGET)

clean:
rm -rf $(BIN)$(PR_TARGET)
rm -rf $(BIN)$(SR_TARGET)
rm -rf $(BIN)$(PI_TARGET)
rm -rf $(BIN)$(ST_TARGET)
rm -rf $(BIN)$(EH_TARGET)
rm -rf $(BIN)$(IS_TARGET)
rm -rf $(BIN)$(AV_TARGET)
rm -rf $(BIN)$(CP_TARGET)
rm -rf $(PR_OBJECTS)
rm -rf $(SR_OBJECTS)
rm -rf $(PI_OBJECTS)
rm -rf $(ST_OBJECTS)
rm -rf $(EH_OBJECTS)
rm -rf $(IS_OBJECTS)
rm -rf $(AV_OBJECTS)
rm -rf $(CP_OBJECTS)
cd PNG && $(MAKE) clean


make_dir:
$(MD) -p $(BIN)

$(BIN)$(PR_TARGET): $(PR_OBJECTS)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(PR_OBJECTS) -L$(BIN) $(LFLAGS) -ljpeg -lmypng -lz

$(BIN)$(SR_TARGET): $(SR_OBJECTS)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(SR_OBJECTS) -L$(BIN) $(LFLAGS) -ljpeg -lmypng -lz

$(BIN)$(PI_TARGET): $(PI_OBJECTS)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(PI_OBJECTS) -L$(BIN) $(LFLAGS) -ljpeg -lmypng -lz

$(BIN)$(ST_TARGET): $(ST_OBJECTS)
$(CXX) -pthread -o $@ $(ST_OBJECTS) $(LFLAGS)

$(BIN)$(EH_TARGET): $(EH_OBJECTS)
$(CXX) -pthread -o $@ $(EH_OBJECTS) $(LFLAGS)

$(BIN)$(IS_TARGET): $(IS_OBJECTS)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(IS_OBJECTS) -L$(BIN) $(LFLAGS) -ljpeg -lmypng -lz

$(BIN)$(AV_TARGET): $(AV_OBJECTS)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(AV_OBJECTS) -L$(BIN) $(LFLAGS) -ljpeg -lmypng -lz

$(BIN)$(CP_TARGET): $(CP_OBJECTS)
cd PNG && $(MAKE) COMPILER=$(COMPILER)
$(CXX) -pthread -o $@ $(CP_OBJECTS) -L$(BIN) $(LFLAGS) -ljpeg -lmypng -lz

$(BIN)%.o: $(SRC)%.c
$(CC) -c -o $@ -I$(INCLUDE) $<

$(BIN)%.o: $(SRC)%.cpp
$(CXX) -c -o $@ $(CFLAGS) -I$(INCLUDE) $<

15 changes: 10 additions & 5 deletions PoissonRecon.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NOMINMAX;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
Expand All @@ -107,7 +107,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NOMINMAX;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
Expand All @@ -127,14 +127,14 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NOMINMAX;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OpenMPSupport>true</OpenMPSupport>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand Down Expand Up @@ -164,7 +164,7 @@
<FloatingPointModel>Precise</FloatingPointModel>
<OpenMPSupport>true</OpenMPSupport>
<IntrinsicFunctions>false</IntrinsicFunctions>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the implications of this are, we may want to restore the previous version.

<AdditionalOptions>
</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
Expand All @@ -189,6 +189,11 @@
<ItemGroup>
<ClCompile Include="Src\PoissonRecon.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="ZLIB.vcxproj" />
<ProjectReference Include="PNG.vcxproj" />
<ProjectReference Include="JPEG.vcxproj" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down