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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user