Simple single-color 8x8x8 LED Cube with AVRs
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.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. INJAR = *.class *.png
  2. # Path to jni.h
  3. ifdef SystemRoot
  4. RM = del
  5. INJAR += Serial.dll
  6. PLATFORM = Win
  7. else
  8. ifdef SYSTEMROOT
  9. # Looks like cygwin or mingw shell
  10. RM = rm -rf
  11. INJAR += Serial.dll
  12. PLATFORM = Win
  13. else
  14. RM = rm -f
  15. UNAME := $(shell uname -s)
  16. ifeq ($(UNAME),Darwin)
  17. INJAR += libSerial.jnilib
  18. PLATFORM = Mac
  19. else
  20. INJAR += libSerial.so
  21. PLATFORM = Linux
  22. endif
  23. endif
  24. endif
  25. # All java files to be compiled
  26. # List so it works as target
  27. JAVAFILES = HelperUtility.java AnimationUtility.java Animation.java AFrame.java cubeWorker.java layerEditFrame.java Led3D.java Frame.java SerialReadThread.java SerialWriteThread.java SerialHelper.java
  28. # --------------------------------------
  29. all: CubeControl.jar
  30. doc: doc/index.html
  31. CubeControl.jar: HelperUtility.class manifest.txt libSerial
  32. jar -cmf manifest.txt "CubeControl$(PLATFORM).jar" $(INJAR)
  33. serialInterface.h: HelperUtility.class
  34. javah -o serialInterface.h HelperUtility
  35. HelperUtility.class: $(JAVAFILES)
  36. javac -g $(JAVAFILES)
  37. doc/index.html: $(JAVAFILES)
  38. javadoc -d doc $(JAVAFILES)
  39. ifdef SystemRoot
  40. libSerial: Serial.dll
  41. else
  42. ifdef SYSTEMROOT
  43. libSerial: Serial.dll
  44. else
  45. ifeq ($(UNAME),Darwin)
  46. libSerial: libSerial.jnilib
  47. else
  48. libSerial: libSerial.so
  49. endif
  50. endif
  51. endif
  52. Serial.dll: libSerial/serialHelper.c libSerial/winSerial.c
  53. make -C libSerial
  54. mv libSerial/Serial.dll Serial.dll
  55. libSerial.jnilib: libSerial/serialHelper.c libSerial/unixSerial.c
  56. make -C libSerial
  57. mv libSerial/libSerial.jnilib libSerial.jnilib
  58. libSerial.so: libSerial/serialHelper.c libSerial/unixSerial.c
  59. make -C libSerial
  60. mv libSerial/libSerial.so libSerial.so
  61. # Delete intermediate files
  62. clean:
  63. make -C libSerial clean
  64. $(RM) *.class
  65. $(RM) *.o
  66. ifdef SystemRoot
  67. $(RM) *.dll
  68. $(RM) CubeControlWin.jar
  69. else
  70. ifdef SYSTEMROOT
  71. $(RM) *.dll
  72. $(RM) CubeControlWin.jar
  73. else
  74. ifeq ($(UNAME),Darwin)
  75. $(RM) *.jnilib
  76. $(RM) CubeControlMac.jar
  77. else
  78. $(RM) *.so
  79. $(RM) CubeControlLinux.jar
  80. endif
  81. endif
  82. endif