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

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