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 @@
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StandAlone\UserM_Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
</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'">
<ClCompile>
<Optimization>Disabled</Optimization>
......@@ -77,8 +83,8 @@
<TypeLibraryName>UserM_Debug/StandAlone.tlb</TypeLibraryName>
</Midl>
<PostBuildEvent>
<Message>move exe</Message>
<Command>xcopy /y StandAlone\UserM_Debug\StandAlone.exe Test</Command>
<Message>copy glslangValidator</Message>
<Command>xcopy /y StandAlone\UserM_Debug\glslangValidator.exe Test</Command>
</PostBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
......@@ -131,8 +137,10 @@
<TypeLibraryName>UserM_Release/StandAlone.tlb</TypeLibraryName>
</Midl>
<PostBuildEvent>
<Message>move exe</Message>
<Command>xcopy /y StandAlone\UserM_Release\StandAlone.exe test</Command>
<Message>copy glslangValidator</Message>
<Command>xcopy /y StandAlone\UserM_Release\glslangValidator.exe Test
xcopy /y StandAlone\UserM_Release\glslangValidator.exe Install\Windows
</Command>
</PostBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
......
......@@ -7,10 +7,12 @@ TARGETOBJECT=StandAlone.o
default: all
all: StandAlone
all: glslangValidator
StandAlone: $(TARGETOBJECT) SHAREDOBJECT
$(CC) -g -o $@ $(TARGETOBJECT) -L $(LIBPATH) -lglslang -lpthread -lm -lstdc++
glslangValidator: $(TARGETOBJECT) SHAREDOBJECT
$(CC) -g -o $@ $(TARGETOBJECT) -L $(LIBPATH) -lglslang -lpthread -lm -lstdc++
cp $@ ../Test
cp $@ ../Install/Linux
SHAREDOBJECT:
cd $(OBJECTPATH); make all
......@@ -23,7 +25,7 @@ SHAREDOBJECT:
#
.PHONY : clean
clean :
$(RM) *.o StandAlone
$(RM) *.o glslangValidator ../Install/Linux/glslangValidator
cd $(OBJECTPATH); make clean
depend:
......
......@@ -138,13 +138,15 @@ bool ProcessArguments(int argc, char* argv[])
DebugOptions |= EDebugOpTexturePrototypes;
break;
default:
usage();
return false;
}
} else
Worklist.add(std::string(argv[0]));
}
if (Worklist.empty())
return false;
return true;
}
......@@ -187,8 +189,10 @@ int C_DECL main(int argc, char* argv[])
// Init for for standalone
glslang::InitGlobalLock();
if (! ProcessArguments(argc, argv))
if (! ProcessArguments(argc, argv)) {
usage();
return EFailUsage;
}
// TODO: finish threading, allow external control over number of threads
const int NumThreads = 1;
......
......@@ -69,6 +69,11 @@ namespace glslang {
return true;
}
bool empty()
{
return worklist.empty();
}
protected:
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
- thread safety
Interfacing
- Put glslang in a namespace
- finish putting into a glslang namespace
Functionality
- "const" compile-time constant propagation in the front-end has to be complete, for all built-in functions
Functionality to Implement/Finish
ESSL 3.0
- "const" compile-time constant propagation in the front-end has to be complete, for all built-in functions
GLSL 1.2
- Handle multiple compilation units per stage
- Allow initializers on uniform declarations. The value is set at link time.
......
......@@ -27,6 +27,8 @@ all: $(SHAREDOBJECT)
$(SHAREDOBJECT): gen_glslang_tab.o $(OBJECTS) \
$(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
cp $@ ../../Test
cp $@ ../../Install/Linux
gen_glslang_tab.o : gen_glslang_tab.cpp
$(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