RetroArch/Makefile.shaders

52 lines
1.3 KiB
Makefile
Raw Normal View History

2013-01-04 21:07:55 +00:00
DOWNLOAD_SHADERS = 1
SHADER_DIR := media/shaders
SHADER_GLSL_DIR := media/shaders_glsl
2013-01-04 21:07:55 +00:00
SHADER_DEST_PS3_DIR := ps3/pkg/USRDIR/cores/shaders
# system platform
system_platform = unix
ifeq ($(shell uname -a),)
EXE_EXT = .exe
system_platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
system_platform = osx
else ifneq ($(findstring MINGW,$(shell uname -a)),)
system_platform = win
endif
ifeq ($(shell uname), Linux)
PYTHON2 = python2
PYTHON3 = python
GIT = git
else
PYTHON2 = python2.exe
PYTHON3 = python.exe
GIT = git.exe
endif
checkout-shaders:
ifeq ($(DOWNLOAD_SHADERS),1)
@if test -d $(SHADER_DIR); then \
echo "[SHADER CHECKOUT::] Git pulling common-shaders..."; \
cd $(SHADER_DIR); \
$(GIT) pull; \
cd ../../../../..; \
else \
echo "[SHADER CHECKOUT::] Git cloning common-shaders first..."; \
$(GIT) clone git://github.com/libretro/common-shaders.git $(SHADER_DIR); \
fi
endif
convert-xml:
$(PYTHON) tools/cg2glsl.py $(SHADER_DIR) $(SHADER_GLSL_DIR)
2013-01-04 21:07:55 +00:00
deploy-ps3: checkout-shaders
@if test -d $(SHADER_DEST_PS3_DIR); then \
cp -r $(SHADER_DIR)/* $(SHADER_DEST_PS3_DIR); \
else \
echo "[DEPLOY PS3::] Creating PS3 shader directory first..."; \
mkdir -p $(SHADER_DEST_PS3_DIR) || bin/true; \
fi
@echo "[DEPLOY PS3::] Copied shaders to PS3 shaders directory."