Add Makefile.shaders

This commit is contained in:
twinaphex 2013-01-04 22:07:55 +01:00
parent 0b95bc88f2
commit 92ad26d6c5
2 changed files with 52 additions and 12 deletions

View File

@ -8,8 +8,6 @@ CELL_PSGL_VERSION = ultra-opt
DEBUG = 0
DOWNLOAD_SHADERS = 1
SHADER_PKG_DIR := ps3/pkg/USRDIR/cores/shaders
SHADER_DIR := media/shaders
RMENU_IMG_DIR := media/rmenu
STRIPPING_ENABLE = 0
HAVE_RGL = 1
@ -150,18 +148,9 @@ create-salamander:
copy-media-files:
@cp $(RMENU_IMG_DIR)/main-menu_1080p.png ps3/pkg/USRDIR/cores/borders/Menu/main-menu.png
@cp -r $(SHADER_DIR) $(SHADER_PKG_DIR)
create-shaders:
ifeq ($(DOWNLOAD_SHADERS),1)
@if test -d $(SHADER_DIR); then \
cd $(SHADER_DIR); \
$(GIT) pull; \
cd ../../../../..; \
else \
$(GIT) clone git://github.com/libretro/common-shaders.git $(SHADER_DIR); \
fi
endif
make -f Makefile.shaders deploy-ps3
pkg: $(PPU_TARGET) create-shaders copy-media-files create-npdrm-salamander create-npdrm-core
$(MAKE_PACKAGE_NPDRM) ps3/pkg/package.conf ps3/pkg

51
Makefile.shaders Normal file
View File

@ -0,0 +1,51 @@
DOWNLOAD_SHADERS = 1
SHADER_DIR := media/shaders
SHADER_XML_DIR := media/shaders_xml
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/cg2xml.py $(SHADER_DIR) $(SHADER_XML_DIR)
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."