3 AM_JAVACFLAGS=-encoding UTF-8 -Xlint:deprecation
7 altoslibdir=$(libdir)/altos
9 CLASSPATH_ENV=mkdir -p $(JAVAROOT); CLASSPATH=".:classes:../altoslib/*:libaltos:$(FREETTS)/*:/usr/share/java/*"
15 AltosBTDeviceIterator.java \
22 AltosChannelMenu.java \
23 AltosCompanionInfo.java \
25 AltosConfigFreqUI.java \
27 AltosConfigureUI.java \
29 AltosConfigTDUI.java \
34 AltosDeviceDialog.java \
37 AltosDisplayThread.java \
38 AltosEepromDelete.java \
39 AltosEepromDownload.java \
40 AltosEepromList.java \
41 AltosEepromManage.java \
42 AltosEepromMonitor.java \
43 AltosEepromSelect.java \
46 AltosFlightDisplay.java \
47 AltosFlightInfoTableModel.java \
48 AltosFlightStats.java \
49 AltosFlightStatsTable.java \
50 AltosFlightStatus.java \
51 AltosFlightStatusUpdate.java \
53 AltosFontListener.java \
57 AltosIdleMonitorUI.java \
67 AltosUIPreferences.java \
69 AltosRomconfigUI.java \
72 AltosSerialInUseException.java \
74 AltosSiteMapPreload.java \
75 AltosSiteMapCache.java \
76 AltosSiteMapTile.java \
78 AltosUIListener.java \
82 AltosDataPointReader.java \
87 AltosDataChooser.java \
117 FATJAR=altosui-fat.jar
120 ICONDIR=$(top_srcdir)/icon
122 JAVA_ICON=$(ICONDIR)/altus-metrum-16x16.jpg
124 ICONS= $(ICONDIR)/redled.png $(ICONDIR)/redoff.png \
125 $(ICONDIR)/greenled.png $(ICONDIR)/greenoff.png \
126 $(ICONDIR)/grayled.png $(ICONDIR)/grayoff.png
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
134 WINDOWS_ICON=$(ICONDIR)/altus-metrum.ico
137 FIRMWARE_TD_0_2=$(top_srcdir)/src/teledongle-v0.2-$(VERSION).ihx
138 FIRMWARE_TD=$(FIRMWARE_TD_0_2)
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)
145 FIRMWARE_TELEMINI_1_0=$(top_srcdir)/src/telemini-v1.0-$(VERSION).ihx
146 FIRMWARE_TELEMINI=$(FIRMWARE_TELEMINI_1_0)
148 FIRMWARE=$(FIRMWARE_TM) $(FIRMWARE_TELEMINI) $(FIRMWARE_TD)
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
155 DOC=$(ALTUSMETRUM_DOC) $(ALTOS_DOC) $(TELEMETRY_DOC) $(TEMPLATE_DOC)
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
162 FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS)
164 LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC)
165 LINUX_EXTRA=altosui-fat
167 MACOSX_INFO_PLIST=Info.plist
168 MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST)
169 MACOSX_EXTRA=$(FIRMWARE)
171 WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(top_srcdir)/telemetrum.inf $(WINDOWS_ICON)
173 all-local: classes/altosui $(JAR) altosui altosui-test altosui-jdb
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
183 FATTARGET=$(FATDIR)/$(VERSION)
185 LINUX_DIST_TARGET=$(FATTARGET)/$(LINUX_DIST)
186 MACOSX_DIST_TARGET=$(FATTARGET)/$(MACOSX_DIST)
187 WINDOWS_DIST_TARGET=$(FATTARGET)/$(WINDOWS_DIST)
189 fat: $(LINUX_DIST_TARGET) $(MACOSX_DIST_TARGET) $(WINDOWS_DIST_TARGET)
191 $(LINUX_DIST_TARGET): $(LINUX_DIST)
192 mkdir -p $(FATTARGET)
195 $(MACOSX_DIST_TARGET): $(MACOSX_DIST)
196 mkdir -p $(FATTARGET)
199 $(WINDOWS_DIST_TARGET): $(WINDOWS_DIST)
200 mkdir -p $(FATTARGET)
204 fat: $(LINUX_DIST) $(MACOSX_DIST) $(WINDOWS_DIST)
208 altosuidir=$(datadir)/java
210 install-altosuiJAVA: altosui.jar
212 test -z "$(altosuidir)" || $(MKDIR_P) "$(DESTDIR)$(altosuidir)"
213 echo " $(INSTALL_DATA)" "$<" "'$(DESTDIR)$(altosuidir)/altosui.jar'"; \
214 $(INSTALL_DATA) "$<" "$(DESTDIR)$(altosuidir)"
217 mkdir -p classes/altosui
219 $(JAR): classaltosui.stamp Manifest.txt $(JAVA_ICON) $(ALTOSLIB_CLASS)
220 jar cfm $@ Manifest.txt \
223 -C libaltos libaltosJNI
225 $(FATJAR): classaltosui.stamp Manifest-fat.txt $(ALTOSLIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) $(LIBALTOS) $(JAVA_ICON)
226 jar cfm $@ Manifest-fat.txt \
229 -C libaltos libaltosJNI
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" >> $@
236 echo 'Main-Class: altosui.AltosUI' > $@
237 echo "Class-Path: AltosLib.jar freetts.jar jfreechart.jar jcommon.jar" >> $@
240 echo "#!/bin/sh" > $@
241 echo 'exec java -cp "$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="$(altoslibdir)" -jar "$(altosuidir)/altosui.jar" "$$@"' >> $@
244 altosui-test: Makefile
245 echo "#!/bin/sh" > $@
246 echo 'exec java -cp "./*:$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="libaltos/.libs" -jar altosui.jar "$$@"' >> $@
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 "$$@"' >> $@
254 libaltos.so: build-libaltos
256 $(LN_S) libaltos/.libs/"$@" .
260 $(LN_S) libaltos/"$@" .
262 altos.dll: libaltos/altos.dll
264 $(LN_S) libaltos/"$@" .
266 altos64.dll: libaltos/altos64.dll
268 $(LN_S) libaltos/"$@" .
270 libaltos/.libs/libaltos.so: build-libaltos
272 libaltos/altos.dll: build-altos-dll
274 libaltos/altos64.dll: build-altos64-dll
277 +cd libaltos && make libaltos.la
279 +cd libaltos && make altos.dll
282 +cd libaltos && make altos64.dll
286 $(LN_S) ../altoslib/"$@" .
290 $(LN_S) "$(FREETTS)"/"$@" .
294 $(LN_S) "$(JFREECHART)"/"$@" .
298 $(LN_S) "$(JCOMMON)"/"$@" .
300 $(LINUX_DIST): $(LINUX_FILES) $(LINUX_EXTRA)
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
309 $(MACOSX_DIST): $(MACOSX_FILES) $(MACOSX_EXTRA)
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
325 $(WINDOWS_DIST): $(WINDOWS_FILES) altos-windows.nsi
327 makensis -Oaltos-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" altos-windows.nsi
330 scp launch-sites.txt gag.com:public_html