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.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Makefile 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. SUBDIR = "occlusion-gl/"
  19. NAME = occlusion
  20. CFLAGS = -std=c++17 --sysroot="$(SYSROOT)" -Wall
  21. LDFLAGS = -lEGL -lGLESv2 -lpng
  22. all: build deploy run
  23. build: check
  24. @echo Building...
  25. @$(CXX) $(CFLAGS) -o ${NAME} ${NAME}.cc $(LDFLAGS)
  26. deploy: check
  27. ifneq ($(target), local)
  28. @echo Deploying to $(SSH_DUT)...
  29. @scp ${NAME}.vert $(SSH_DUT):~/${SUBDIR}${NAME}.vert
  30. @scp ${NAME}.frag $(SSH_DUT):~/${SUBDIR}${NAME}.frag
  31. @scp ${NAME} $(SSH_DUT):~/${SUBDIR}
  32. endif
  33. run: check
  34. ifneq ($(target), local)
  35. @echo Running on $(SSH_DUT)...
  36. @ssh $(SSH_DUT) 'cd ~/${SUBDIR} && ./${NAME}'
  37. @echo Copying artifacts back to local device...
  38. @scp $(SSH_DUT):~/${SUBDIR}${NAME}.png .
  39. else
  40. @echo Running locally...
  41. @./$(NAME)
  42. endif
  43. clean: check
  44. @rm -f ${NAME} ${NAME}.png
  45. ifneq ($(target), local)
  46. @ssh $(SSH_DUT) 'rm -f ~/${SUBDIR}${NAME} ~/${SUBDIR}${NAME}.png \
  47. ~/${SUBDIR}${NAME}.vert ~/${SUBDIR}${NAME}.frag'
  48. endif
  49. check:
  50. ifeq ($(CXX), INVALID)
  51. $(error $$target must be one of [atlas, cheza, local] )
  52. endif