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