Commit 54f6e566 by John Kessenich

Set up infrastructure for installing an executable. Changes the standalone name…

Set up infrastructure for installing an executable. Changes the standalone name to glslangValidator. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22593 e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent 53f3cc97
...@@ -45,6 +45,12 @@ ...@@ -45,6 +45,12 @@
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StandAlone\UserM_Release\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StandAlone\UserM_Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetName>glslangValidator</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>glslangValidator</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
...@@ -77,8 +83,8 @@ ...@@ -77,8 +83,8 @@
<TypeLibraryName>UserM_Debug/StandAlone.tlb</TypeLibraryName> <TypeLibraryName>UserM_Debug/StandAlone.tlb</TypeLibraryName>
</Midl> </Midl>
<PostBuildEvent> <PostBuildEvent>
<Message>move exe</Message> <Message>copy glslangValidator</Message>
<Command>xcopy /y StandAlone\UserM_Debug\StandAlone.exe Test</Command> <Command>xcopy /y StandAlone\UserM_Debug\glslangValidator.exe Test</Command>
</PostBuildEvent> </PostBuildEvent>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
...@@ -131,8 +137,10 @@ ...@@ -131,8 +137,10 @@
<TypeLibraryName>UserM_Release/StandAlone.tlb</TypeLibraryName> <TypeLibraryName>UserM_Release/StandAlone.tlb</TypeLibraryName>
</Midl> </Midl>
<PostBuildEvent> <PostBuildEvent>
<Message>move exe</Message> <Message>copy glslangValidator</Message>
<Command>xcopy /y StandAlone\UserM_Release\StandAlone.exe test</Command> <Command>xcopy /y StandAlone\UserM_Release\glslangValidator.exe Test
xcopy /y StandAlone\UserM_Release\glslangValidator.exe Install\Windows
</Command>
</PostBuildEvent> </PostBuildEvent>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
......
...@@ -7,10 +7,12 @@ TARGETOBJECT=StandAlone.o ...@@ -7,10 +7,12 @@ TARGETOBJECT=StandAlone.o
default: all default: all
all: StandAlone all: glslangValidator
StandAlone: $(TARGETOBJECT) SHAREDOBJECT glslangValidator: $(TARGETOBJECT) SHAREDOBJECT
$(CC) -g -o $@ $(TARGETOBJECT) -L $(LIBPATH) -lglslang -lpthread -lm -lstdc++ $(CC) -g -o $@ $(TARGETOBJECT) -L $(LIBPATH) -lglslang -lpthread -lm -lstdc++
cp $@ ../Test
cp $@ ../Install/Linux
SHAREDOBJECT: SHAREDOBJECT:
cd $(OBJECTPATH); make all cd $(OBJECTPATH); make all
...@@ -23,7 +25,7 @@ SHAREDOBJECT: ...@@ -23,7 +25,7 @@ SHAREDOBJECT:
# #
.PHONY : clean .PHONY : clean
clean : clean :
$(RM) *.o StandAlone $(RM) *.o glslangValidator ../Install/Linux/glslangValidator
cd $(OBJECTPATH); make clean cd $(OBJECTPATH); make clean
depend: depend:
......
...@@ -138,13 +138,15 @@ bool ProcessArguments(int argc, char* argv[]) ...@@ -138,13 +138,15 @@ bool ProcessArguments(int argc, char* argv[])
DebugOptions |= EDebugOpTexturePrototypes; DebugOptions |= EDebugOpTexturePrototypes;
break; break;
default: default:
usage();
return false; return false;
} }
} else } else
Worklist.add(std::string(argv[0])); Worklist.add(std::string(argv[0]));
} }
if (Worklist.empty())
return false;
return true; return true;
} }
...@@ -187,8 +189,10 @@ int C_DECL main(int argc, char* argv[]) ...@@ -187,8 +189,10 @@ int C_DECL main(int argc, char* argv[])
// Init for for standalone // Init for for standalone
glslang::InitGlobalLock(); glslang::InitGlobalLock();
if (! ProcessArguments(argc, argv)) if (! ProcessArguments(argc, argv)) {
usage();
return EFailUsage; return EFailUsage;
}
// TODO: finish threading, allow external control over number of threads // TODO: finish threading, allow external control over number of threads
const int NumThreads = 1; const int NumThreads = 1;
......
...@@ -69,6 +69,11 @@ namespace glslang { ...@@ -69,6 +69,11 @@ namespace glslang {
return true; return true;
} }
bool empty()
{
return worklist.empty();
}
protected: protected:
std::list<std::string> worklist; std::list<std::string> worklist;
}; };
......
.\StandAlone.exe -i sample.vert > sample.vert.newout
diff sample.vert.out sample.vert.newout
.\StandAlone.exe -i sample.frag > sample.frag.newout
diff sample.frag.out sample.frag.newout
...@@ -10,10 +10,11 @@ Testing ...@@ -10,10 +10,11 @@ Testing
- thread safety - thread safety
Interfacing Interfacing
- Put glslang in a namespace - finish putting into a glslang namespace
Functionality Functionality to Implement/Finish
- "const" compile-time constant propagation in the front-end has to be complete, for all built-in functions ESSL 3.0
- "const" compile-time constant propagation in the front-end has to be complete, for all built-in functions
GLSL 1.2 GLSL 1.2
- Handle multiple compilation units per stage - Handle multiple compilation units per stage
- Allow initializers on uniform declarations. The value is set at link time. - Allow initializers on uniform declarations. The value is set at link time.
......
...@@ -27,6 +27,8 @@ all: $(SHAREDOBJECT) ...@@ -27,6 +27,8 @@ all: $(SHAREDOBJECT)
$(SHAREDOBJECT): gen_glslang_tab.o $(OBJECTS) \ $(SHAREDOBJECT): gen_glslang_tab.o $(OBJECTS) \
$(LIBPREPROCESSOR) $(LIBCODEGEN) $(LIBOSDEPENDENT) $(LIBINITIALISATION) $(LIBPREPROCESSOR) $(LIBCODEGEN) $(LIBOSDEPENDENT) $(LIBINITIALISATION)
$(CC) -fPIC -shared -o $@ -rdynamic -Wl,-whole-archive $(OBJECTS) $(LIBPREPROCESSOR) $(LIBCODEGEN) $(LIBOSDEPENDENT) $(LIBINITIALISATION) gen_glslang_tab.o -Wl,-no-whole-archive $(CC) -fPIC -shared -o $@ -rdynamic -Wl,-whole-archive $(OBJECTS) $(LIBPREPROCESSOR) $(LIBCODEGEN) $(LIBOSDEPENDENT) $(LIBINITIALISATION) gen_glslang_tab.o -Wl,-no-whole-archive
cp $@ ../../Test
cp $@ ../../Install/Linux
gen_glslang_tab.o : gen_glslang_tab.cpp gen_glslang_tab.o : gen_glslang_tab.cpp
$(CC) -fPIC -c $(INCLUDE) gen_glslang_tab.cpp -o $@ $(CC) -fPIC -c $(INCLUDE) gen_glslang_tab.cpp -o $@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment