]> git.gag.com Git - fw/altos/blob - altosui/Makefile.am
altoslib: add missing manufacturer parsing for AltosConfigData
[fw/altos] / altosui / Makefile.am
1 SUBDIRS=libaltos
2 JAVAROOT=classes
3 AM_JAVACFLAGS=-encoding UTF-8 -Xlint:deprecation
4
5 man_MANS=altosui.1
6
7 altoslibdir=$(libdir)/altos
8
9 CLASSPATH_ENV=mkdir -p $(JAVAROOT); CLASSPATH=".:classes:../altoslib/*:libaltos:$(FREETTS)/*:/usr/share/java/*"
10
11 bin_SCRIPTS=altosui
12
13 altosui_BT = \
14         AltosBTDevice.java \
15         AltosBTDeviceIterator.java \
16         AltosBTManage.java \
17         AltosBTKnown.java
18
19 altosui_JAVA = \
20         GrabNDrag.java \
21         AltosAscent.java \
22         AltosChannelMenu.java \
23         AltosCompanionInfo.java \
24         AltosConfig.java \
25         AltosConfigFreqUI.java \
26         AltosConfigUI.java \
27         AltosConfigureUI.java \
28         AltosConfigTD.java \
29         AltosConfigTDUI.java \
30         AltosCSV.java \
31         AltosCSVUI.java \
32         AltosDebug.java \
33         AltosDescent.java \
34         AltosDeviceDialog.java \
35         AltosDevice.java \
36         AltosUSBDevice.java \
37         AltosDisplayThread.java \
38         AltosEepromDelete.java \
39         AltosEepromDownload.java \
40         AltosEepromList.java \
41         AltosEepromManage.java \
42         AltosEepromMonitor.java \
43         AltosEepromSelect.java \
44         AltosFlash.java \
45         AltosFlashUI.java \
46         AltosFlightDisplay.java \
47         AltosFlightInfoTableModel.java \
48         AltosFlightStats.java \
49         AltosFlightStatsTable.java \
50         AltosFlightStatus.java \
51         AltosFlightStatusUpdate.java \
52         AltosFlightUI.java \
53         AltosFontListener.java \
54         AltosFreqList.java \
55         AltosHexfile.java \
56         Altos.java \
57         AltosIdleMonitorUI.java \
58         AltosIgniteUI.java \
59         AltosLaunch.java \
60         AltosLaunchUI.java \
61         AltosInfoTable.java \
62         AltosKML.java \
63         AltosLanded.java \
64         AltosLed.java \
65         AltosLights.java \
66         AltosPad.java \
67         AltosUIPreferences.java \
68         AltosRomconfig.java \
69         AltosRomconfigUI.java \
70         AltosScanUI.java \
71         AltosSerial.java \
72         AltosSerialInUseException.java \
73         AltosSiteMap.java \
74         AltosSiteMapPreload.java \
75         AltosSiteMapCache.java \
76         AltosSiteMapTile.java \
77         AltosUI.java \
78         AltosUIListener.java \
79         AltosFrame.java \
80         AltosDialog.java \
81         AltosWriter.java \
82         AltosDataPointReader.java \
83         AltosDataPoint.java \
84         AltosGraph.java \
85         AltosGraphTime.java \
86         AltosGraphUI.java \
87         AltosDataChooser.java \
88         AltosVersion.java \
89         AltosVoice.java \
90         $(altosui_BT)
91
92 JFREECHART_CLASS= \
93     jfreechart.jar
94
95 JCOMMON_CLASS=\
96     jcommon.jar
97
98 FREETTS_CLASS= \
99         cmudict04.jar \
100         cmulex.jar \
101         cmu_time_awb.jar \
102         cmutimelex.jar \
103         cmu_us_kal.jar \
104         en_us.jar \
105         freetts.jar
106
107 ALTOSLIB_CLASS=\
108         AltosLib.jar
109
110 LIBALTOS= \
111         libaltos.so \
112         libaltos.dylib \
113         altos.dll
114
115 JAR=altosui.jar
116
117 FATJAR=altosui-fat.jar
118
119 # Icons
120 ICONDIR=$(top_srcdir)/icon
121
122 JAVA_ICON=$(ICONDIR)/altus-metrum-16x16.jpg
123
124 ICONS=  $(ICONDIR)/redled.png $(ICONDIR)/redoff.png \
125         $(ICONDIR)/greenled.png $(ICONDIR)/greenoff.png \
126         $(ICONDIR)/grayled.png $(ICONDIR)/grayoff.png
127
128 # icon base names for jar
129 ICONJAR= -C $(ICONDIR) altus-metrum-16x16.jpg \
130         -C $(ICONDIR) redled.png -C $(ICONDIR) redoff.png \
131         -C $(ICONDIR) greenled.png -C $(ICONDIR) greenoff.png \
132         -C $(ICONDIR) grayon.png -C $(ICONDIR) grayled.png
133
134 WINDOWS_ICON=$(ICONDIR)/altus-metrum.ico
135
136 # Firmware
137 FIRMWARE_TD_0_2=$(top_srcdir)/src/teledongle-v0.2-$(VERSION).ihx
138 FIRMWARE_TD=$(FIRMWARE_TD_0_2)
139
140 FIRMWARE_TM_1_0=$(top_srcdir)/src/telemetrum-v1.0-$(VERSION).ihx
141 FIRMWARE_TM_1_1=$(top_srcdir)/src/telemetrum-v1.1-$(VERSION).ihx
142 FIRMWARE_TM_1_2=$(top_srcdir)/src/telemetrum-v1.2-$(VERSION).ihx
143 FIRMWARE_TM=$(FIRMWARE_TM_1_0) $(FIRMWARE_TM_1_1) $(FIRMWARE_TM_1_2)
144
145 FIRMWARE_TELEMINI_1_0=$(top_srcdir)/src/telemini-v1.0-$(VERSION).ihx
146 FIRMWARE_TELEMINI=$(FIRMWARE_TELEMINI_1_0)
147
148 FIRMWARE=$(FIRMWARE_TM) $(FIRMWARE_TELEMINI) $(FIRMWARE_TD) 
149
150 ALTUSMETRUM_DOC=$(top_srcdir)/doc/altusmetrum.pdf
151 ALTOS_DOC=$(top_srcdir)/doc/altos.pdf
152 TELEMETRY_DOC=$(top_srcdir)/doc/telemetry.pdf
153 TEMPLATE_DOC=$(top_srcdir)/doc/telemetrum-outline.pdf $(top_srcdir)/doc/megametrum-outline.pdf
154
155 DOC=$(ALTUSMETRUM_DOC) $(ALTOS_DOC) $(TELEMETRY_DOC) $(TEMPLATE_DOC)
156
157 # Distribution targets
158 LINUX_DIST=Altos-Linux-$(VERSION).tar.bz2
159 MACOSX_DIST=Altos-Mac-$(VERSION).zip
160 WINDOWS_DIST=Altos-Windows-$(VERSION_DASH).exe
161
162 FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS)
163
164 LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC)
165 LINUX_EXTRA=altosui-fat
166
167 MACOSX_INFO_PLIST=Info.plist
168 MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST)
169 MACOSX_EXTRA=$(FIRMWARE)
170
171 WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(top_srcdir)/telemetrum.inf $(WINDOWS_ICON)
172
173 all-local: classes/altosui $(JAR) altosui altosui-test altosui-jdb
174
175 clean-local:
176         -rm -rf classes $(JAR) $(FATJAR) \
177                 $(LINUX_DIST) $(MACOSX_DIST) windows $(WINDOWS_DIST) $(ALTOSLIB_CLASS) $(FREETTS_CLASS) \
178                 $(JFREECHART_CLASS) $(JCOMMON_CLASS) $(LIBALTOS) Manifest.txt Manifest-fat.txt altos-windows.log \
179                 altosui altosui-test altosui-jdb macosx linux
180
181 if FATINSTALL
182
183 FATTARGET=$(FATDIR)/$(VERSION)
184
185 LINUX_DIST_TARGET=$(FATTARGET)/$(LINUX_DIST)
186 MACOSX_DIST_TARGET=$(FATTARGET)/$(MACOSX_DIST)
187 WINDOWS_DIST_TARGET=$(FATTARGET)/$(WINDOWS_DIST)
188
189 fat: $(LINUX_DIST_TARGET) $(MACOSX_DIST_TARGET) $(WINDOWS_DIST_TARGET)
190
191 $(LINUX_DIST_TARGET): $(LINUX_DIST)
192         mkdir -p $(FATTARGET)
193         cp -p $< $@
194
195 $(MACOSX_DIST_TARGET): $(MACOSX_DIST)
196         mkdir -p $(FATTARGET)
197         cp -p $< $@
198
199 $(WINDOWS_DIST_TARGET): $(WINDOWS_DIST)
200         mkdir -p $(FATTARGET)
201         cp -p $< $@
202
203 else
204 fat: $(LINUX_DIST) $(MACOSX_DIST) $(WINDOWS_DIST)
205 endif
206
207
208 altosuidir=$(datadir)/java
209
210 install-altosuiJAVA: altosui.jar
211         @$(NORMAL_INSTALL)
212         test -z "$(altosuidir)" || $(MKDIR_P) "$(DESTDIR)$(altosuidir)"
213         echo " $(INSTALL_DATA)" "$<" "'$(DESTDIR)$(altosuidir)/altosui.jar'"; \
214         $(INSTALL_DATA) "$<" "$(DESTDIR)$(altosuidir)"
215
216 classes/altosui:
217         mkdir -p classes/altosui
218
219 $(JAR): classaltosui.stamp Manifest.txt $(JAVA_ICON) $(ALTOSLIB_CLASS)
220         jar cfm $@ Manifest.txt \
221                 $(ICONJAR) \
222                 -C classes altosui \
223                 -C libaltos libaltosJNI
224
225 $(FATJAR): classaltosui.stamp Manifest-fat.txt $(ALTOSLIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) $(LIBALTOS) $(JAVA_ICON)
226         jar cfm $@ Manifest-fat.txt \
227                 $(ICONJAR) \
228                 -C classes altosui \
229                 -C libaltos libaltosJNI
230
231 Manifest.txt: Makefile
232         echo 'Main-Class: altosui.AltosUI' > $@
233         echo "Class-Path: AltosLib.jar $(FREETTS)/freetts.jar $(JFREECHART)/jfreechart.jar $(JCOMMON)/jcommon.jar" >> $@
234
235 Manifest-fat.txt:
236         echo 'Main-Class: altosui.AltosUI' > $@
237         echo "Class-Path: AltosLib.jar freetts.jar jfreechart.jar jcommon.jar" >> $@
238
239 altosui: Makefile
240         echo "#!/bin/sh" > $@
241         echo 'exec java  -cp "$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="$(altoslibdir)" -jar "$(altosuidir)/altosui.jar" "$$@"' >> $@
242         chmod +x $@
243
244 altosui-test: Makefile
245         echo "#!/bin/sh" > $@
246         echo 'exec java -cp "./*:$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="libaltos/.libs" -jar altosui.jar "$$@"' >> $@
247         chmod +x $@
248
249 altosui-jdb: Makefile
250         echo "#!/bin/sh" > $@
251         echo 'exec jdb -classpath "classes:libaltos:$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="libaltos/.libs" altosui/AltosUI "$$@"' >> $@
252         chmod +x $@
253
254 libaltos.so: build-libaltos
255         -rm -f "$@"
256         $(LN_S) libaltos/.libs/"$@" .
257
258 libaltos.dylib:
259         -rm -f "$@"
260         $(LN_S) libaltos/"$@" .
261
262 altos.dll: libaltos/altos.dll
263         -rm -f "$@"
264         $(LN_S) libaltos/"$@" .
265
266 altos64.dll: libaltos/altos64.dll
267         -rm -f "$@"
268         $(LN_S) libaltos/"$@" .
269
270 libaltos/.libs/libaltos.so: build-libaltos
271
272 libaltos/altos.dll: build-altos-dll
273
274 libaltos/altos64.dll: build-altos64-dll
275
276 build-libaltos:
277         +cd libaltos && make libaltos.la
278 build-altos-dll:
279         +cd libaltos && make altos.dll
280
281 build-altos64-dll:
282         +cd libaltos && make altos64.dll
283
284 $(ALTOSLIB_CLASS):
285         -rm -f "$@"
286         $(LN_S) ../altoslib/"$@" .
287
288 $(FREETTS_CLASS):
289         -rm -f "$@"
290         $(LN_S) "$(FREETTS)"/"$@" .
291
292 $(JFREECHART_CLASS):
293         -rm -f "$@"
294         $(LN_S) "$(JFREECHART)"/"$@" .
295
296 $(JCOMMON_CLASS):
297         -rm -f "$@"
298         $(LN_S) "$(JCOMMON)"/"$@" .
299
300 $(LINUX_DIST): $(LINUX_FILES) $(LINUX_EXTRA)
301         -rm -f $@
302         -rm -rf linux
303         mkdir -p linux/AltOS
304         cp -p $(LINUX_FILES) linux/AltOS
305         cp -p altosui-fat linux/AltOS/altosui
306         chmod +x linux/AltOS/altosui
307         tar cjf $@ -C linux AltOS
308
309 $(MACOSX_DIST): $(MACOSX_FILES) $(MACOSX_EXTRA)
310         -rm -f $@
311         -rm -rf macosx
312         mkdir macosx
313         cp -a AltosUI.app macosx/
314         cp -p Info.plist macosx/AltosUI.app/Contents
315         mkdir -p macosx/AltOS macosx/AltosUI.app/Contents/Resources/Java
316         cp -p $(FATJAR) macosx/AltosUI.app/Contents/Resources/Java/altosui.jar
317         cp -p libaltos.dylib macosx/AltosUI.app/Contents/Resources/Java
318         cp -p $(ALTOSLIB_CLASS) macosx/AltosUI.app/Contents/Resources/Java
319         cp -p $(FREETTS_CLASS) macosx/AltosUI.app/Contents/Resources/Java
320         cp -p $(JFREECHART_CLASS) macosx/AltosUI.app/Contents/Resources/Java
321         cp -p $(JCOMMON_CLASS) macosx/AltosUI.app/Contents/Resources/Java
322         cp -p $(MACOSX_EXTRA) macosx/AltOS
323         cd macosx && zip -r ../$@ AltosUI.app AltOS
324
325 $(WINDOWS_DIST): $(WINDOWS_FILES) altos-windows.nsi
326         -rm -f $@
327         makensis -Oaltos-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" altos-windows.nsi
328
329 publish:
330         scp launch-sites.txt gag.com:public_html