chore: add checks to Makefile for FILAMENT_PATH
This commit is contained in:
9
Makefile
9
Makefile
@@ -22,6 +22,9 @@ bindings:
|
|||||||
# eg: FILAMENT_PATH=/path/to/filament/out/release/bin make materials
|
# eg: FILAMENT_PATH=/path/to/filament/out/release/bin make materials
|
||||||
#
|
#
|
||||||
materials: FORCE
|
materials: FORCE
|
||||||
|
ifndef FILAMENT_PATH
|
||||||
|
$(error FILAMENT_PATH is not set)
|
||||||
|
else
|
||||||
@echo "Using Filament build from ${FILAMENT_PATH}"
|
@echo "Using Filament build from ${FILAMENT_PATH}"
|
||||||
@for material in unlit image unlit_fixed_size grid; do \
|
@for material in unlit image unlit_fixed_size grid; do \
|
||||||
${FILAMENT_PATH}/matc -a opengl -a metal -o materials/$$material.filamat materials/$$material.mat; \
|
${FILAMENT_PATH}/matc -a opengl -a metal -o materials/$$material.filamat materials/$$material.mat; \
|
||||||
@@ -29,8 +32,6 @@ materials: FORCE
|
|||||||
echo '#include "'$$material'.h"' | cat - thermion_dart/native/include/material/$$material.c > thermion_dart/native/include/material/$$material.c.new; \
|
echo '#include "'$$material'.h"' | cat - thermion_dart/native/include/material/$$material.c > thermion_dart/native/include/material/$$material.c.new; \
|
||||||
mv thermion_dart/native/include/material/$$material.c.new thermion_dart/native/include/material/$$material.c; \
|
mv thermion_dart/native/include/material/$$material.c.new thermion_dart/native/include/material/$$material.c; \
|
||||||
done
|
done
|
||||||
|
endif
|
||||||
|
|
||||||
#rm materials/*.filamat
|
FORCE: ;
|
||||||
|
|
||||||
FORCE: ;
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user