aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorvimene <vincent.menegaux@gmail.com>2026-02-05 10:31:47 +0100
committervimene <vincent.menegaux@gmail.com>2026-02-05 10:31:47 +0100
commitccf086c39f734a000aa3a2fac034f0620021fbdf (patch)
treec49547742909adb671b1e5a43cd042c02509b4b6 /src/Makefile.am
parentcbf7d23623b5bb2d2092cb6c86bc965138b4ea75 (diff)
downloadengine-ccf086c39f734a000aa3a2fac034f0620021fbdf.tar.gz
added back windows cross-compilation
Makefile.am is too ugly, but I don't have a better solution right now. - fused Makefile.am and src/Makefile.am - adding back windows cross-compilation - improved README.md a lot - added configure option to enable debug, which greatly simplifies development when writing shaders - removed dependency on LunarG's Vulkan SDK by having dependency only on Vulkan headers, library and slangc - removed print C++ header because I have an old MinGW which doesn't support it. It will be restored in the future - make every assets path relative to be able to build anywhere and run elsewhere - moved stb_image.h inside source directory instead of making it a dependency, which is more aligned with stb philosophy - moved assets inside source code to make it easy to compile and run the engine - improved configure.ac by checking Vulkan headers version directly in the configure script instead of within C code, which allows us to also do theses checks when cross-compiling
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index 8515e67..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,55 +0,0 @@
-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 \
- vulkan_utils.hpp \
- stb_image.cpp \
- fb/fb.hpp \
- fb/chfb.hpp fb/chfb.cpp \
- fb/pixfb.hpp fb/pixfb.cpp \
- math/utils.hpp \
- math/vector.hpp \
- math/mat4.hpp \
- math/quat.hpp \
- math/tform.hpp \
- o3d/mesh.hpp o3d/mesh.cpp \
- o3d/obj3d.hpp \
- o3d/vertex.hpp \
- o3d/deriv_vertex.hpp \
- o3d/tri.hpp \
- o3d/tri_deriv.hpp \
- o3d/polygon.hpp \
- o3d/camera.hpp \
- o3d/scene.hpp \
- ctrl/keyboard.hpp \
- ctrl/mouse.hpp \
- shaders/shaders.hpp \
- shaders/simple_shaders.hpp shaders/simple_shaders.cpp
-
-# TODO: we should somehow pass assetsdir and texturesdir from ../Makefile.am to this Makefile.am.
-# We assume that they will always be relative to datadir, which might not be true if they are
-# configured differently
-engine_CPPFLAGS = -std=gnu++23 -Wall -Wextra \
- -DDATADIR='"$(datadir)"' -DSHADERSDIR='"$(shadersdir)"' \
- $(GLFW3_CFLAGS) $(STB_CFLAGS) $(VULKAN_CFLAGS)
-engine_LDFLAGS = -std=gnu++23 -Wall -Wextra -fconcepts-diagnostics-depth=10
-engine_LDADD = $(GLFW3_LIBS) $(STB_LIBS) $(VULKAN_LIBS)
-
-if HAVE_NCURSES
-engine_CPPFLAGS += $(NCURSES_CFLAGS)
-engine_LDADD += $(NCURSES_LIBS)
-endif
-
-engine-stb_image.$(OBJEXT): CXXFLAGS += -Wno-unused-but-set-variable
-
-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 $@ $<