diff options
| author | quou <quou@disroot.org> | 2024-12-28 18:27:30 +1100 | 
|---|---|---|
| committer | quou <quou@disroot.org> | 2024-12-28 18:27:30 +1100 | 
| commit | e31535abfff4c3335dd465e3745a69d3102253a6 (patch) | |
| tree | 48ff456b34ea295e3ea45c54cb0c97820f0290ec /Makefile | |
| parent | 86810460eed75c19beb9f524e75c193edfa9ddfd (diff) | |
converting, loading and rendering GLTF models
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 20 | 
1 files changed, 17 insertions, 3 deletions
| @@ -2,11 +2,12 @@  target = c2  data_dir = data -shaders = $(data_dir)/triangle.csh $(data_dir)/ui.csh +shaders = $(data_dir)/triangle.csh $(data_dir)/ui.csh $(data_dir)/surface.csh  textures = $(data_dir)/22.tex $(data_dir)/kita.tex -packed_files = $(shaders) $(textures) +models = $(data_dir)/monkey.mdl +packed_files = $(shaders) $(textures) $(models)  tools = qstd cfg sc -objects = app.o c2.o video.o pipeline.o asset.o ui.o maths.o +objects = app.o c2.o video.o pipeline.o asset.o ui.o maths.o model.o  includes = -Iqstd  defines = -Dplat_x86 -Dplat_posix -Dplat_x11 -Dallocation_default_alignment=8  cflags = -MMD -MF $(basename $@).d $(includes) $(defines) $(DEBUG_COMPILE_FLAG) @@ -31,6 +32,9 @@ packer: packer.c | qstd  convtexture: convtexture.c | qstd  	$(CC) $(cflags) convtexture.c $(lflags) -Lqstd -lqstd -o convtexture +convmodel: convmodel.c | qstd +	$(CC) $(cflags) convmodel.c $(lflags) -Lqstd -lqstd -o convmodel +  pack: $(packed_files) packer  	./packer pack $(data_dir) $(notdir $(packed_files)) @@ -40,12 +44,18 @@ data/triangle.csh: intermediate/triangle.glsl | $(data_dir) sc  data/ui.csh: intermediate/ui.glsl | $(data_dir) sc  	./sc/sc intermediate/ui.glsl $(data_dir)/ui.csh +data/surface.csh: intermediate/surface.glsl | $(data_dir) sc +	./sc/sc intermediate/surface.glsl $(data_dir)/surface.csh +  data/22.tex: intermediate/22.bmp | $(data_dir) convtexture  	./convtexture intermediate/22.bmp $(data_dir)/22.tex bc1  data/kita.tex: intermediate/kita.bmp | $(data_dir) convtexture  	./convtexture intermediate/kita.bmp $(data_dir)/kita.tex bc1 +data/monkey.mdl: intermediate/monkey.glb $(shaders) | $(data_dir) convmodel +	./convmodel $(data_dir) intermediate/monkey.glb $(data_dir)/monkey.mdl +  app.o:  	$(CXX) -c $(cflags) app.cpp -o app.o @@ -64,6 +74,9 @@ ui.o:  maths.o:  	$(CXX) -c $(cflags) maths.cpp -o maths.o +model.o: +	$(CXX) -c $(cflags) model.cpp -o model.o +  c2.o:  	$(CXX) -c $(cflags) c2.cpp -o c2.o @@ -81,6 +94,7 @@ clean:  	rm -f $(objects)  	rm -f $(targets)  	rm -f convtexture +	rm -f convmodel  	rm -f packer  	make -C qstd clean  	make -C cfg clean |