content.mak 3.3 KB

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