12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- # Name of your C-Compiler
- CC = gcc
- INJAR = *.class LEDoff.png LEDon.png splash.png bg.png
- # Path to jni.h
- ifdef SystemRoot
- HEADERPATH = C:/Program\ Files/Java/jdk1.6.0_29/include
- RM = del
- INJAR += Serial.dll
- PLATFORM = Win
- else
- HEADERPATH = /System/Library/Frameworks/JavaVM.framework/Headers
- RM = rm -f
- INJAR += libSerial.jnilib
- PLATFORM = Mac
- endif
-
- # All java files to be compiled
- # List so it works as target
- JAVAFILES = HelperUtility.java AnimationUtility.java Animation.java AFrame.java cubeWorker.java layerEditFrame.java Led3D.java Frame.java
-
- # --------------------------------------
-
- all: CubeControl.jar clean
-
- doc: doc/index.html
-
- CubeControl.jar: HelperUtility.class manifest.txt libSerial
- jar -cmf manifest.txt "CubeControl$(PLATFORM).jar" $(INJAR)
-
- serialInterface.h: HelperUtility.class
- javah -o serialInterface.h HelperUtility
-
- HelperUtility.class: $(JAVAFILES)
- javac $(JAVAFILES)
-
- doc/index.html: $(JAVAFILES)
- javadoc -d doc $(JAVAFILES)
-
- ifdef SystemRoot
- libSerial: Serial.dll
- else
- libSerial: libSerial.jnilib
- endif
-
- Serial.dll: libSerial/serialHelper.c libSerial/winSerial.c
- make -C libSerial
- mv libSerial/Serial.dll Serial.dll
- make -C libSerial clean
-
- libSerial.jnilib: libSerial/serialHelper.c libSerial/unixSerial.c
- make -C libSerial
- mv libSerial/libSerial.jnilib libSerial.jnilib
- make -C libSerial clean
-
- # Delete intermediate files
- clean:
- $(RM) *.class
- $(RM) *.
- $(RM) *.o
- ifdef SystemRoot
- $(RM) *.dll
- else
- $(RM) *.jnilib
- endif
|