Simple single-color 8x8x8 LED Cube with AVRs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

makefile 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. CC = gcc
  2. # Path to jni.h
  3. ifdef SystemRoot
  4. HEADERPATH = C:/Program\ Files/Java/jdk1.6.0_29/include
  5. RM = del
  6. else
  7. ifdef SYSTEMROOT
  8. # Looks like Cygwin or Mingw shell
  9. HEADERPATH = C:\Programme\Java\jdk1.6.0_31\include
  10. HEADERPATH += -IC:\Programme\Java\jdk1.6.0_31\include\win32
  11. RM = rm -rf
  12. else
  13. RM = rm -f
  14. UNAME := $(shell uname -s)
  15. ifeq ($(UNAME),Darwin)
  16. HEADERPATH = /System/Library/Frameworks/JavaVM.framework/Headers
  17. else
  18. HEADERPATH = /usr/lib/jvm/java-6-openjdk/include
  19. endif
  20. endif
  21. endif
  22. # --------------------------------------
  23. all: libSerial
  24. doc: doc/index.html
  25. serialInterface.h: HelperUtility.class
  26. javah -o serialInterface.h HelperUtility
  27. HelperUtility.class: ../HelperUtility.java
  28. javac ../HelperUtility.java
  29. cp ../HelperUtility.class HelperUtility.class
  30. # SystemRoot is only defined in Windows
  31. ifdef SystemRoot
  32. libSerial: Serial.dll
  33. else
  34. ifdef SYSTEMROOT
  35. libSerial: Serial.dll
  36. else
  37. ifeq ($(UNAME),Darwin)
  38. libSerial: libSerial.jnilib
  39. else
  40. libSerial: libSerial.so
  41. endif
  42. endif
  43. endif
  44. libSerial.jnilib: serialHelper.c unixSerial.c serialInterface.h
  45. $(CC) -x c -I$(HEADERPATH) -c serialHelper.c -o serialHelper.o
  46. $(CC) -dynamiclib -o libSerial.jnilib serialHelper.o
  47. libSerial.so: serialHelper.c unixSerial.c serialInterface.h
  48. $(CC) -x c -I$(HEADERPATH) -c serialHelper.c -o serialHelper.o
  49. $(CC) -dynamiclib -o libSerial.so serialHelper.o
  50. Serial.dll: serialHelper.c winSerial.c serialInterface.h
  51. $(CC) -x c -I$(HEADERPATH) -c serialHelper.c -o serialHelper.o -D winHelper
  52. $(CC) -shared -o Serial.dll serialHelper.o
  53. # Delete intermediate files
  54. clean:
  55. $(RM) *.class
  56. $(RM) *.h
  57. $(RM) *.o
  58. ifdef SystemRoot
  59. $(RM) *.dll
  60. else
  61. ifdef SYSTEMROOT
  62. $(RM) *.dll
  63. else
  64. ifeq ($(UNAME),Darwin)
  65. $(RM) *.jnilib
  66. else
  67. $(RM) *.so
  68. endif
  69. endif
  70. endif