Binary that renders a triangle using Open GL, scans the resulting image to a PNG, and makes an occlusion query to determine the number of fragments shaded. To be used as reference when developing Turnip.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Makefile 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ifeq ($(target), cheza)
  2. CXX = /usr/bin/armv7a-cros-linux-gnueabihf-clang++
  3. CC = /usr/bin/armv7a-cros-linux-gnueabihf-clang
  4. SYSROOT = /build/cheza
  5. SSH_DUT = cheza
  6. else ifeq ($(target), atlas)
  7. CXX = /usr/bin/x86_64-cros-linux-gnu-clang++
  8. CC = /usr/bin/x86_64-cros-linux-gnu-clang
  9. SYSROOT = /build/atlas
  10. SSH_DUT = atlas
  11. else ifeq ($(target), local)
  12. CXX = clang++
  13. CC = clang
  14. else
  15. CXX = INVALID
  16. CC = INVALID
  17. endif
  18. NAME = occlusion
  19. CFLAGS = -std=c++17 --sysroot="$(SYSROOT)" -Wall
  20. LDFLAGS = -lEGL -lGLESv2 -lpng
  21. all: build deploy run
  22. build: check
  23. @echo Building...
  24. @$(CXX) $(CFLAGS) -o ${NAME} ${NAME}.cc $(LDFLAGS)
  25. deploy: check
  26. ifneq ($(target), local)
  27. @echo Deploying to $(SSH_DUT)...
  28. @scp ${NAME}.vert $(SSH_DUT):~/${NAME}.vert
  29. @scp ${NAME}.frag $(SSH_DUT):~/${NAME}.frag
  30. @scp ${NAME} $(SSH_DUT):~/
  31. endif
  32. run: check
  33. ifneq ($(target), local)
  34. @echo Running on $(SSH_DUT)...
  35. @ssh $(SSH_DUT) '~/${NAME}'
  36. @echo Copying artifacts back to local device...
  37. @scp $(SSH_DUT):~/${NAME}.png .
  38. else
  39. @echo Running locally...
  40. @./$(NAME)
  41. endif
  42. clean: check
  43. @rm -f ${NAME} ${NAME}.png ${NAME}.vert ${NAME}.frag
  44. ifneq ($(target), local)
  45. @ssh $(SSH_DUT) 'rm -f ~/${NAME} ~/${NAME}.png ~/${NAME}.vert ~/${NAME}.frag'
  46. endif
  47. check:
  48. ifeq ($(CXX), INVALID)
  49. $(error $$target must be one of [atlas, cheza, local] )
  50. endif