We have drawn a very cool triangle. It took 1443 lines of (very commented) code...

parent c2b4a2df
......@@ -29,6 +29,9 @@ GLFLAGS = -V
V_SHAD = $(SHADIR)/shader.vert
F_SHAD = $(SHADIR)/shader.frag
V_OUT = $(SHABIN)/vert.spv
F_OUT = $(SHABIN)/frag.spv
#Internal Vars
SOURCES := $(wildcard $(SRCDIR)/*.cpp)
......@@ -37,7 +40,7 @@ OBJECTS := $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
#Main Rules
$(BINDIR)/$(TARGET): $(OBJECTS) vertex-shader fragment-shader
$(BINDIR)/$(TARGET): $(OBJECTS) $(V_OUT) $(F_OUT)
@$(LINKER) $(OBJECTS) $(LFLAGS) -o $@
@echo "Successfully linked "$@" at "$(shell date)
......@@ -45,17 +48,20 @@ $(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.cpp
@echo $(OBJECTS)
@$(CXX) $(CXXFLAGS) -c $< -o $@
.PHONY: clean
#Shader Rules
$(V_OUT): dir-setup
@$(GL) $(GLFLAGS) $(V_SHAD) -o $@
$(F_OUT): dir-setup
@$(GL) $(GLFLAGS) $(F_SHAD) -o $@
.PHONY: clean shaders dir-setup
clean:
-rm -rf obj/* bin/*
vertex-shader:
-mkdir -p $(SHABIN)
@$(GL) $(GLFLAGS) $(V_SHAD) -o $(SHABIN)/vert.spv
fragment-shader:
shaders: $(V_OUT) $(F_OUT)
dir-setup:
-mkdir -p $(SHABIN)
@$(GL) $(GLFLAGS) $(F_SHAD) -o $(SHABIN)/frag.spv
install:
@echo "Not Yet Implemented"
File deleted
File deleted
This diff is collapsed.
File added
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