-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
122 lines (105 loc) · 4.61 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
SRCFILES = src/com/kreative/*/*/*.java src/com/kreative/*/*/*/*.java
all: clean bin osxclean RainbowStudio.jar RainbowStudio.app RainbowStudio.exe RainbowStudio-Win32 RainbowStudio-Linux32 RainbowStudio-Linux64 RainbowStudio-MacOSX.zip RainbowStudio-Win32.zip RainbowStudio-Linux32.zip RainbowStudio-Linux64.zip
eclipseall: eclipseclean osxclean RainbowStudio.jar RainbowStudio.app RainbowStudio.exe RainbowStudio-Win32 RainbowStudio-Linux32 RainbowStudio-Linux64 RainbowStudio-MacOSX.zip RainbowStudio-Win32.zip RainbowStudio-Linux32.zip RainbowStudio-Linux64.zip
clean:
rm -rf bin
rm -rf RainbowStudio.jar
rm -rf RainbowStudio.app
rm -rf RainbowStudio.exe
rm -rf RainbowStudio-Win32
rm -rf RainbowStudio-Linux32
rm -rf RainbowStudio-Linux64
rm -rf RainbowStudio*.zip
eclipseclean:
rm -rf RainbowStudio.jar
rm -rf RainbowStudio.app
rm -rf RainbowStudio.exe
rm -rf RainbowStudio-Win32
rm -rf RainbowStudio-Linux32
rm -rf RainbowStudio-Linux64
rm -rf RainbowStudio*.zip
bin:
mkdir -p bin
javac -target 1.5 -sourcepath src $(SRCFILES) -d bin
cp src/com/kreative/rainbowstudio/firmware/*.hex bin/com/kreative/rainbowstudio/firmware/
cp src/com/kreative/rainbowstudio/resources/*.png bin/com/kreative/rainbowstudio/resources/
cp src/com/kreative/rainbowstudio/resources/*.ttf bin/com/kreative/rainbowstudio/resources/
osxclean:
export COPYFILE_DISABLE=true
rm -f src/.DS_Store
rm -f src/*/.DS_Store
rm -f src/*/*/.DS_Store
rm -f src/*/*/*/.DS_Store
rm -f src/*/*/*/*/.DS_Store
rm -f src/*/*/*/*/*/.DS_Store
rm -f src/*/*/*/*/*/*/.DS_Store
rm -f src/*/*/*/*/*/*/*/.DS_Store
rm -f src/*/*/*/*/*/*/*/*/.DS_Store
rm -f bin/.DS_Store
rm -f bin/*/.DS_Store
rm -f bin/*/*/.DS_Store
rm -f bin/*/*/*/.DS_Store
rm -f bin/*/*/*/*/.DS_Store
rm -f bin/*/*/*/*/*/.DS_Store
rm -f bin/*/*/*/*/*/*/.DS_Store
rm -f bin/*/*/*/*/*/*/*/.DS_Store
rm -f bin/*/*/*/*/*/*/*/*/.DS_Store
RainbowStudio.jar: osxclean
jar cmf dep/MANIFEST.MF RainbowStudio.jar -C bin com/kreative/rainbowstudio
RainbowStudio.app: RainbowStudio.jar
mkdir -p RainbowStudio.app/Contents/MacOS
mkdir -p RainbowStudio.app/Contents/Resources/Java
mkdir -p RainbowStudio.app/Contents/Resources/Examples
cp dep/JavaApplicationStub RainbowStudio.app/Contents/MacOS/RainbowStudio
cp RainbowStudio.jar RainbowStudio.app/Contents/Resources/Java
cp dep/rxtx/*.jar RainbowStudio.app/Contents/Resources/Java
cp dep/rxtx/*.jnilib RainbowStudio.app/Contents/Resources/Java
cp dep/avr-mac/* RainbowStudio.app/Contents/Resources
cp dep/icons/*.icns RainbowStudio.app/Contents/Resources
cp dep/Info.plist RainbowStudio.app/Contents
cp dep/PkgInfo RainbowStudio.app/Contents
cp rbd/*.rbd RainbowStudio.app/Contents/Resources/Examples/
RainbowStudio.exe: RainbowStudio.jar
ifeq ($(LAUNCH4J_HOME),)
echo 'Please set $$LAUNCH4J_HOME environment variable to compile exe.'
else
cd "$(LAUNCH4J_HOME)" ; java -Dlaunch4j.tmpdir=/tmp/ -jar "$(LAUNCH4J_HOME)/launch4j.jar" "$(PWD)/dep/RainbowStudio.xml"
endif
RainbowStudio-Win32: RainbowStudio.exe
mkdir -p RainbowStudio-Win32/Examples
cp RainbowStudio.exe RainbowStudio-Win32
cp RainbowStudio.jar RainbowStudio-Win32
cp dep/rxtx/*.jar RainbowStudio-Win32
cp dep/rxtx/*.dll RainbowStudio-Win32
cp dep/avr-win/* RainbowStudio-Win32
cp dep/icons/*.ico RainbowStudio-Win32
cp rbd/*.rbd RainbowStudio-Win32/Examples/
RainbowStudio-Linux32: RainbowStudio.jar
mkdir -p RainbowStudio-Linux32/Examples
cp RainbowStudio.jar RainbowStudio-Linux32
cp dep/rxtx/*.jar RainbowStudio-Linux32
cp dep/rxtx/*.so RainbowStudio-Linux32
cp dep/avr-lin/* RainbowStudio-Linux32
cp dep/icons/*.png RainbowStudio-Linux32
cp dep/icons/*.svg RainbowStudio-Linux32
cp rbd/*.rbd RainbowStudio-Linux32/Examples/
RainbowStudio-Linux64: RainbowStudio.jar
mkdir -p RainbowStudio-Linux64/Examples
cp RainbowStudio.jar RainbowStudio-Linux64
cp dep/rxtx/*.jar RainbowStudio-Linux64
cp dep/rxtx/*.so RainbowStudio-Linux64
cp dep/avr-lin/* RainbowStudio-Linux64
cp dep/icons/*.png RainbowStudio-Linux64
cp dep/icons/*.svg RainbowStudio-Linux64
cp RainbowStudio-Linux64/librxtxSerial64.so RainbowStudio-Linux64/librxtxSerial.so
cp RainbowStudio-Linux64/avrdude64 RainbowStudio-Linux64/avrdude
cp rbd/*.rbd RainbowStudio-Linux64/Examples/
RainbowStudio-MacOSX.zip: RainbowStudio.app
zip -r RainbowStudio-MacOSX.zip RainbowStudio.app
RainbowStudio-Win32.zip: RainbowStudio-Win32
zip -r RainbowStudio-Win32.zip RainbowStudio-Win32
RainbowStudio-Linux32.zip: RainbowStudio-Linux32
zip -r RainbowStudio-Linux32.zip RainbowStudio-Linux32
RainbowStudio-Linux64.zip: RainbowStudio-Linux64
zip -r RainbowStudio-Linux64.zip RainbowStudio-Linux64
.PHONY: all eclipseall clean eclipseclean osxclean