remove visual studio files, reorganize source files, add gcc makefile
This commit is contained in:
parent
97b2835ae6
commit
f98e905450
|
@ -1,20 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AssimpToMesh", "AssimpToMesh\AssimpToMesh.vcxproj", "{1706D477-F8C1-4CD9-A9F6-06A9D903FD3C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1706D477-F8C1-4CD9-A9F6-06A9D903FD3C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1706D477-F8C1-4CD9-A9F6-06A9D903FD3C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1706D477-F8C1-4CD9-A9F6-06A9D903FD3C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1706D477-F8C1-4CD9-A9F6-06A9D903FD3C}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,107 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{1706D477-F8C1-4CD9-A9F6-06A9D903FD3C}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>AssimpToMesh</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>E:\assimp--2.0.863-sdk\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>E:\assimp--2.0.863-sdk\lib\assimp_debug-dll_win32;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>E:\assimp--2.0.863-sdk\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>E:\assimp--2.0.863-sdk\lib\assimp_release-dll_win32;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>assimp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>assimp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\assimputils\assimpgeometry.cpp" />
|
||||
<ClCompile Include="src\assimputils\assimpsceneinfo.cpp" />
|
||||
<ClCompile Include="src\convert\meshutils.cpp" />
|
||||
<ClCompile Include="src\convert\skeletalanimated.cpp" />
|
||||
<ClCompile Include="src\convert\static.cpp" />
|
||||
<ClCompile Include="src\main.cpp" />
|
||||
<ClCompile Include="src\nodetree\nodetree.cpp" />
|
||||
<ClCompile Include="src\utils\fileutils.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\assimputils\types.h" />
|
||||
<ClInclude Include="src\assimputils\utils.h" />
|
||||
<ClInclude Include="src\convert\convert.h" />
|
||||
<ClInclude Include="src\convert\mesh.h" />
|
||||
<ClInclude Include="src\convert\meshjoint.h" />
|
||||
<ClInclude Include="src\convert\meshmaterial.h" />
|
||||
<ClInclude Include="src\convert\meshtriangle.h" />
|
||||
<ClInclude Include="src\convert\submesh.h" />
|
||||
<ClInclude Include="src\nodetree\nodetree.h" />
|
||||
<ClInclude Include="src\utils\utils.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,75 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\utils\fileutils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\assimputils\assimpsceneinfo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\convert\static.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\convert\skeletalanimated.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\nodetree\nodetree.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\convert\meshutils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\assimputils\assimpgeometry.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\utils\utils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\assimputils\utils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\convert\convert.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\nodetree\nodetree.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\convert\mesh.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\assimputils\types.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\convert\meshmaterial.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\convert\meshtriangle.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\convert\submesh.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\convert\meshjoint.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
150
Makefile
Normal file
150
Makefile
Normal file
|
@ -0,0 +1,150 @@
|
|||
# this Makefile is based on the ones from devkitPro
|
||||
# TODO: probably should simplify it a bunch (mainly the rules at the bottom)
|
||||
|
||||
TARGET := assimptomesh
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# detect build configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
ifndef ("CFG")
|
||||
CFG=Debug
|
||||
endif
|
||||
|
||||
ifeq ("$(CFG)","Debug")
|
||||
BUILD := Debug
|
||||
endif
|
||||
ifeq ("$(CFG)","Release")
|
||||
BUILD := Release
|
||||
endif
|
||||
ifeq ("$(BUILD)", "")
|
||||
$(error invalid configuration specified via CFG argument)
|
||||
endif
|
||||
|
||||
$(info $(CFG) configuration selected)
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# set up platform specifics
|
||||
#-------------------------------------------------------------------------------
|
||||
UNAME := $(shell uname)
|
||||
|
||||
# default windows libraries and options
|
||||
PLATFORM := win32
|
||||
PLATFORM_LD_FLAGS := -static-libgcc -static-libstdc++
|
||||
|
||||
ifeq ($(UNAME), Linux)
|
||||
# it appears that we're running on linux
|
||||
PLATFORM := linux
|
||||
PLATFORM_LD_FLAGS :=
|
||||
endif
|
||||
|
||||
# TODO: other platform detection
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
ifeq ("$(BUILD)","Debug")
|
||||
DEFINES := -DDEBUG -DDEBUG_ASSERT_BREAK
|
||||
CFLAGS := $(DEFINES) -g -Wall -I/usr/include/assimp
|
||||
CXXFLAGS := $(CFLAGS)
|
||||
LDFLAGS := $(PLATFORM_LD_FLAGS)
|
||||
LIBS := -g -lassimp
|
||||
endif
|
||||
#-------------------------------------------------------------------------------
|
||||
ifeq ("$(BUILD)","Release")
|
||||
DEFINES :=
|
||||
CFLAGS := $(DEFINES) -O2 -Wall -I/usr/include/assimp
|
||||
CXXFLAGS := $(CFLAGS)
|
||||
LDFLAGS := -O2 $(PLATFORM_LD_FLAGS)
|
||||
LIBS := -lassimp
|
||||
endif
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# find sources, setup commands
|
||||
#-------------------------------------------------------------------------------
|
||||
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
SOURCES := ${shell find ./src -type d}
|
||||
export OUTPUT := $(TARGET)
|
||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir))
|
||||
|
||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||
|
||||
export CXX := g++
|
||||
export CC := g++
|
||||
export LD := g++
|
||||
export OFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
|
||||
|
||||
.PHONY: $(BUILD) clean
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
$(BUILD):
|
||||
$(info building ...)
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
clean:
|
||||
$(info clean ...)
|
||||
@rm -fr $(BUILD)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
else
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#-------------------------------------------------------------------------------
|
||||
$(OUTPUT): $(OFILES)
|
||||
$(info linking $(notdir $@))
|
||||
$(LD) -o $@ $(LDFLAGS) $(OFILES) $(LIBS)
|
||||
cp $(OUTPUT) ../../
|
||||
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# build rules by filetype
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
%.a:
|
||||
#-------------------------------------------------------------------------------
|
||||
$(info $(notdir $<))
|
||||
@rm -f $@
|
||||
@$(AR) -rc $@ $^
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
%.o: %.cpp
|
||||
$(info $(notdir $<))
|
||||
@$(CXX) -c $< -o $@ $(CXXFLAGS)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
%.o: %.c
|
||||
$(info $(notdir $<))
|
||||
@$(CC) -c $< -o $@ $(CFLAGS)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
%.o: %.s
|
||||
$(info $(notdir $<))
|
||||
@$(CC) -x assembler-with-cpp $(ASFLAGS) -c $< -o $@
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
%.o: %.S
|
||||
@echo $(notdir $<)
|
||||
@$(CC) -x assembler-with-cpp $(ASFLAGS) -c $< -o $@
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
endif
|
||||
#-------------------------------------------------------------------------------
|
||||
|
Reference in a new issue