diff options
Diffstat (limited to 'src/Makefile.am')
| -rw-r--r-- | src/Makefile.am | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index fd8f7fd..f7b34f3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,29 +1,33 @@ +shadersdir = $(datarootdir)/shaders +SLANGC = slangc + bin_PROGRAMS = engine +shaders_PROGRAMS = shader.spv engine_SOURCES = \ - engine.cpp \ - renderer.hpp renderer.cpp \ - obj_parser.hpp obj_parser.cpp \ - fb/chfb.hpp fb/chfb.cpp fb/pixfb.hpp fb/pixfb.cpp \ - math/vector.hpp \ - math/mat4.hpp \ - math/quat.hpp \ - math/tform.hpp \ - o3d/mesh.hpp o3d/mesh.cpp \ - o3d/obj3d.hpp \ - o3d/vertex_data.hpp \ - o3d/vertex.hpp \ - o3d/deriv_vertex.hpp \ - o3d/tri.hpp \ - o3d/tri_deriv.hpp o3d/tri_deriv.cpp \ - o3d/camera.hpp \ - o3d/scene.hpp \ - ctrl/keyboard.hpp \ - ctrl/mouse.hpp + engine.cpp \ + renderer.hpp renderer.cpp \ + obj_parser.hpp obj_parser.cpp \ + fb/chfb.hpp fb/chfb.cpp fb/pixfb.hpp fb/pixfb.cpp \ + math/vector.hpp \ + math/mat4.hpp \ + math/quat.hpp \ + math/tform.hpp \ + o3d/mesh.hpp o3d/mesh.cpp \ + o3d/obj3d.hpp \ + o3d/vertex_data.hpp \ + o3d/vertex.hpp \ + o3d/deriv_vertex.hpp \ + o3d/tri.hpp \ + o3d/tri_deriv.hpp o3d/tri_deriv.cpp \ + o3d/camera.hpp \ + o3d/scene.hpp \ + ctrl/keyboard.hpp \ + ctrl/mouse.hpp engine_CPPFLAGS = -std=gnu++23 -Wall -Wextra engine_LDFLAGS = -std=gnu++23 -Wall -Wextra -engine_CPPFLAGS += -DDATADIR='"$(datadir)"' +engine_CPPFLAGS += -DDATADIR='"$(datadir)"' -DSHADERSDIR='"$(shadersdir)"' # Not sure why they are needed engine_LDADD =# -ldl -lpthread -lX11 -lXxf86vm -lXrandr -lXi @@ -36,3 +40,9 @@ if HAVE_NCURSES engine_CPPFLAGS += $(NCURSES_CFLAGS) engine_LDADD += $(NCURSES_LIBS) endif + +shader_spv_SOURCES = shaders/shader.slang +shader_spv_SPVFLAGS = -target spirv -profile spirv_1_4 -emit-spirv-directly -fvk-use-entrypoint-name -entry vert_main -entry frag_main + +shader.spv$(EXEEXT): shaders/shader.slang + $(SLANGC) $(shader_spv_SPVFLAGS) -o $@ $< |
