content.mak 3.6 KB

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