content.mak 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #--------------------------------------------------------------------------
  2. # Name : content.mak
  3. # Title : Makefile to build content files
  4. #
  5. # Copyright : Copyright (C) Imagination Technologies Limited.
  6. # : No part of this software, either material or conceptual
  7. # : may be copied or distributed, transmitted, transcribed,
  8. # : stored in a retrieval system or translated into any
  9. # : human or computer language in any form by any means,
  10. # : electronic, mechanical, manual or other-wise, or
  11. # : disclosed to third parties without the express written
  12. # : permission of VideoLogic Limited, Unit 8, HomePark
  13. # : Industrial Estate, King's Langley, Hertfordshire,
  14. # : WD4 8LZ, U.K.
  15. #
  16. # Description : Makefile to build content files for demos in the PowerVR SDK
  17. #
  18. # Platform :
  19. #
  20. #--------------------------------------------------------------------------
  21. #############################################################################
  22. ## Variables
  23. #############################################################################
  24. PVRTEXTOOL = ..\..\..\Utilities\PVRTexTool\PVRTexToolCL\Windows_x86_32\PVRTexTool.exe
  25. FILEWRAP = ..\..\..\Utilities\Filewrap\Windows_x86_32\Filewrap.exe
  26. PVRUNISCO = ..\..\..\Utilities\PVRUniSCo\OGLES\Windows_x86_32\PVRUniSCo_SGX53x.exe
  27. MEDIAPATH = ../Media
  28. CONTENTDIR = Content
  29. #############################################################################
  30. ## Instructions
  31. #############################################################################
  32. TEXTURES = \
  33. Image.pvr
  34. BIN_SHADERS = \
  35. FragShader.fsc \
  36. VertShader.vsc
  37. RESOURCES = \
  38. $(CONTENTDIR)/Image.cpp \
  39. $(CONTENTDIR)/FragShader.cpp \
  40. $(CONTENTDIR)/VertShader.cpp
  41. all: resources
  42. help:
  43. @echo Valid targets are:
  44. @echo resources, textures, binary_shaders, clean
  45. @echo PVRTEXTOOL, FILEWRAP and PVRUNISCO can be used to override the default paths to these utilities.
  46. clean:
  47. -rm $(RESOURCES)
  48. -rm $(BIN_SHADERS)
  49. -rm $(TEXTURES)
  50. resources: $(CONTENTDIR) $(RESOURCES)
  51. textures: $(TEXTURES)
  52. binary_shaders: $(BIN_SHADERS)
  53. $(CONTENTDIR):
  54. -mkdir $@
  55. Image.pvr: $(MEDIAPATH)/image.png
  56. $(PVRTEXTOOL) -m -fOGLPVRTC4 -i$(MEDIAPATH)/image.png -o$@
  57. $(CONTENTDIR)/Image.cpp: Image.pvr
  58. $(FILEWRAP) -o $@ Image.pvr
  59. $(CONTENTDIR)/FragShader.cpp: FragShader.fsh FragShader.fsc
  60. $(FILEWRAP) -s -o $@ FragShader.fsh
  61. $(FILEWRAP) -oa $@ FragShader.fsc
  62. $(CONTENTDIR)/VertShader.cpp: VertShader.vsh VertShader.vsc
  63. $(FILEWRAP) -s -o $@ VertShader.vsh
  64. $(FILEWRAP) -oa $@ VertShader.vsc
  65. FragShader.fsc: FragShader.fsh
  66. $(PVRUNISCO) FragShader.fsh $@ -f
  67. VertShader.vsc: VertShader.vsh
  68. $(PVRUNISCO) VertShader.vsh $@ -v
  69. ############################################################################
  70. # End of file (content.mak)
  71. ############################################################################