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.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. JAVAC = javac
  2. JAVADOC = javadoc
  3. JAVAH = javah
  4. DOCDIR = doc
  5. CC = gcc
  6. TARGET = unix
  7. #TARGET= cygwin
  8. #TARGET = win
  9. HEADERPATH = /System/Library/Frameworks/JavaVM.framework/Headers
  10. # Java files to be compiled
  11. # Needs to be a complete list so they work as target
  12. JAVAFILES = HelperUtility.java AnimationUtility.java Animation.java AFrame.java cubeWorker.java layerEditFrame.java Led3D.java Frame.java
  13. ifeq ($(TARGET),unix)
  14. INJAR = *.class *.png
  15. RM = rm -f
  16. else
  17. INJAR = *.class *.png
  18. RM = del
  19. endif
  20. # Cygwin needs the .exe file, but the rm command!
  21. # Don't add a space after the comma. You get 'missing separator'...
  22. # Also add a space after 'ifeq', else you get 'missing separator'...
  23. ifeq ($(TARGET),cygwin)
  24. RM = rm
  25. endif
  26. # Spit out jar file, documentation, delete intermediate files
  27. all: build
  28. # Generate Documentation
  29. doc: doc/index.html
  30. # Compile java files
  31. java: Frame.class
  32. # Spit out jar file, dont remove anything after that
  33. build: Frame.class libSerial
  34. jar -cmf manifest.txt "Cube Control.jar" $(INJAR)
  35. # Compile java files
  36. Frame.class: $(JAVAFILES)
  37. $(JAVAC) $(JAVAFILES)
  38. doc/index.html: $(JAVAFILES)
  39. $(JAVADOC) -d $(DOCDIR) $(JAVAFILES)
  40. # Compile serial Helper
  41. ifeq ($(TARGET),unix)
  42. libSerial: serialInterface.h serialHelper.c helper/unixSerial.c
  43. $(CC) -x c -I$(HEADERPATH) -c serialHelper.c -o serialHelper.o
  44. $(CC) -dynamiclib -o libSerial.jnilib serialHelper.o
  45. else
  46. libSerial: serialInterface.h serialHelper.c helper/winSerial.c
  47. $(CC) -x c -I$(HEADERPATH) -c serialHelper.c -o serialHelper.o -D winHelper
  48. $(CC) -dynamiclib -o libSerial.dll serialHelper.o
  49. endif
  50. serialInterface.h:
  51. $(JAVAC) HelperUtility.java
  52. $(JAVAH) -o serialInterface.h HelperUtility
  53. # Delete intermediate files
  54. clean:
  55. $(RM) *.class
  56. $(RM) *.h
  57. $(RM) *.o
  58. $(RM) *.jar
  59. ifeq ($(TARGET),unix)
  60. $(RM) *.jnilib
  61. else
  62. $(RM) *.dll
  63. endif