content.mak 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. Basetex.pvr
  34. BIN_SHADERS = \
  35. FragShader.fsc \
  36. VertShader.vsc
  37. RESOURCES = \
  38. $(CONTENTDIR)/Basetex.cpp \
  39. $(CONTENTDIR)/FragShader.cpp \
  40. $(CONTENTDIR)/VertShader.cpp \
  41. $(CONTENTDIR)/Mask.cpp
  42. all: resources
  43. help:
  44. @echo Valid targets are:
  45. @echo resources, textures, binary_shaders, clean
  46. @echo PVRTEXTOOL, FILEWRAP and PVRUNISCO can be used to override the default paths to these utilities.
  47. clean:
  48. -rm $(RESOURCES)
  49. -rm $(BIN_SHADERS)
  50. -rm $(TEXTURES)
  51. resources: $(CONTENTDIR) $(RESOURCES)
  52. textures: $(TEXTURES)
  53. binary_shaders: $(BIN_SHADERS)
  54. $(CONTENTDIR):
  55. -mkdir $@
  56. Basetex.pvr: $(MEDIAPATH)/tex_base.png
  57. $(PVRTEXTOOL) -m -fOGLPVRTC4 -i$(MEDIAPATH)/tex_base.png -o$@
  58. $(CONTENTDIR)/Basetex.cpp: Basetex.pvr
  59. $(FILEWRAP) -o $@ Basetex.pvr
  60. $(CONTENTDIR)/FragShader.cpp: FragShader.fsh FragShader.fsc
  61. $(FILEWRAP) -s -o $@ FragShader.fsh
  62. $(FILEWRAP) -oa $@ FragShader.fsc
  63. $(CONTENTDIR)/VertShader.cpp: VertShader.vsh VertShader.vsc
  64. $(FILEWRAP) -s -o $@ VertShader.vsh
  65. $(FILEWRAP) -oa $@ VertShader.vsc
  66. $(CONTENTDIR)/Mask.cpp: Mask.pod
  67. $(FILEWRAP) -o $@ Mask.pod
  68. FragShader.fsc: FragShader.fsh
  69. $(PVRUNISCO) FragShader.fsh $@ -f
  70. VertShader.vsc: VertShader.vsh
  71. $(PVRUNISCO) VertShader.vsh $@ -v
  72. ############################################################################
  73. # End of file (content.mak)
  74. ############################################################################