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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Name of your C-Compiler
  2. CC = gcc
  3. # Path to jni.h
  4. ifdef SystemRoot
  5. HEADERPATH = C:/Program\ Files/Java/jdk1.6.0_29/include
  6. RM = del
  7. INJAR = *.class *.png Serial.dll
  8. PLATFORM = Win
  9. else
  10. HEADERPATH = /System/Library/Frameworks/JavaVM.framework/Headers
  11. RM = rm -f
  12. INJAR = *.class *.png libSerial.jnilib
  13. PLATFORM = Mac
  14. endif
  15. # All java files to be compiled
  16. # List so it works as target
  17. JAVAFILES = HelperUtility.java AnimationUtility.java Animation.java AFrame.java cubeWorker.java layerEditFrame.java Led3D.java Frame.java
  18. # --------------------------------------
  19. all: libSerial CubeControl.jar clean
  20. doc: doc/index.html
  21. CubeControl.jar: HelperUtility.class manifest.txt libSerial
  22. jar -cmf manifest.txt "CubeControl$(PLATFORM).jar" $(INJAR)
  23. serialInterface.h: HelperUtility.class
  24. javah -o serialInterface.h HelperUtility
  25. HelperUtility.class: $(JAVAFILES)
  26. javac $(JAVAFILES)
  27. libSerial.jnilib: serialHelper.c helper/unixSerial.c serialInterface.h
  28. $(CC) -x c -I$(HEADERPATH) -c serialHelper.c -o serialHelper.o
  29. $(CC) -dynamiclib -o libSerial.jnilib serialHelper.o
  30. Serial.dll: serialHelper.c helper/winSerial.c serialInterface.h
  31. $(CC) -x c -I$(HEADERPATH) -c serialHelper.c -o serialHelper.o -D winHelper
  32. $(CC) -shared -o Serial.dll serialHelper.o
  33. doc/index.html: $(JAVAFILES)
  34. javadoc -d doc $(JAVAFILES)
  35. # SystemRoot is only defined in Windows
  36. ifdef SystemRoot
  37. libSerial: Serial.dll
  38. else
  39. libSerial: libSerial.jnilib
  40. endif
  41. # Delete intermediate files
  42. clean:
  43. $(RM) *.class
  44. $(RM) *.h
  45. $(RM) *.o
  46. ifdef SystemRoot
  47. $(RM) *.dll
  48. else
  49. $(RM) *.jnilib
  50. endif