Check in a much improved submitted set of makefiles for Linux builds. This eliminates dependencies on system headers, and generally simplifies the makefiles.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25408 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2014-02-19 01:00:58 +00:00
parent 2023368ce1
commit 8922da24a4
4 changed files with 52 additions and 243 deletions

View File

@@ -1,41 +1,32 @@
CC=g++
SRCS := StandAlone.cpp
OBJECTS := $(SRCS:.cpp=.o)
DEPS := $(addprefix ., $(SRCS:.cpp=.d))
OBJECTPATH=./../glslang/MachineIndependent
LIBPATH=./../glslang/MachineIndependent/lib
SRCS=StandAlone.cpp
TARGETOBJECT=StandAlone.o
default: all
CXXFLAGS += -fPIC -I../glslang/OSDependent/Linux
all: glslangValidator
glslangValidator: $(TARGETOBJECT) SHAREDOBJECT
$(CC) -g -o $@ $(TARGETOBJECT) -L $(LIBPATH) -lglslang -lpthread -lm -lstdc++
glslangValidator: $(OBJECTS) regenlib
$(CC) -g -o $@ $(OBJECTS) -L $(LIBPATH) -lglslang -lpthread -lm -lstdc++
cp $@ ../Test
cp $@ ../Install/Linux
SHAREDOBJECT:
cd $(OBJECTPATH); make all
-include $(DEPS)
%.o : %.cpp
$(CC) -g -c -I../glslang/OSDependent/Linux $<
$(CXX) $(CXXFLAGS) -MMD -MP -MF $(addprefix ., $(<:.cpp=.d)) -c -o $@ $<
regenlib:
$(MAKE) -C $(OBJECTPATH)
#
# Cleanup
#
.PHONY : clean
.PHONY : clean glslangValidator regenlib
clean :
$(RM) *.o glslangValidator ../Install/Linux/glslangValidator
cd $(OBJECTPATH); make clean
depend:
cd $(OBJECTPATH); make depend
makedepend -Y -- $(SRCS)
# DO NOT DELETE
StandAlone.o: ./../glslang/Include/ShHandle.h
StandAlone.o: ./../glslang/Public/ShaderLang.h
StandAlone.o: ./../glslang/Include/InfoSink.h ./../glslang/Include/Common.h
StandAlone.o: ./../glslang/Include/PoolAlloc.h
StandAlone.o: ./../glslang/Public/ShaderLang.h
StandAlone.o: Worklist.h
$(MAKE) -C $(OBJECTPATH) clean