3 AM_JAVACFLAGS=-target 1.6 -encoding UTF-8 -Xlint:deprecation -Xlint:unchecked -source 6
7 altoslibdir=$(libdir)/altos
9 CLASSPATH_ENV=mkdir -p $(JAVAROOT); CLASSPATH="$(JAVAROOT):../altoslib/*:../altosuilib/*:../libaltos:$(JCOMMON)/jcommon.jar:$(JFREECHART)/jfreechart.jar:$(FREETTS)/freetts.jar"
15 AltosChannelMenu.java \
16 AltosCompanionInfo.java \
19 AltosConfigPyroUI.java \
20 AltosConfigureUI.java \
22 AltosConfigTDUI.java \
24 AltosFlightStatus.java \
25 AltosFlightStatusUpdate.java \
28 AltosIdleMonitorUI.java \
54 altoslib_$(ALTOSLIB_VERSION).jar
57 altosuilib_$(ALTOSUILIB_VERSION).jar
60 LIBALTOS_LINUX=libaltos32.so libaltos64.so
62 LIBALTOS_LINUX=libaltos.so
71 desktopdir = $(datadir)/applications
72 desktop_file = altusmetrum-altosui.desktop
73 desktop_SCRIPTS = $(desktop_file)
77 FATJAR=altosui-fat.jar
83 $(ICONDIR)/altusmetrum-altosui-16.png \
84 $(ICONDIR)/altusmetrum-altosui-32.png \
85 $(ICONDIR)/altusmetrum-altosui-48.png \
86 $(ICONDIR)/altusmetrum-altosui-64.png \
87 $(ICONDIR)/altusmetrum-altosui-128.png\
88 $(ICONDIR)/altusmetrum-altosui-256.png
90 # icon base names for jar
92 -C $(ICONDIR) altusmetrum-altosui-16.png \
93 -C $(ICONDIR) altusmetrum-altosui-32.png \
94 -C $(ICONDIR) altusmetrum-altosui-48.png \
95 -C $(ICONDIR) altusmetrum-altosui-64.png \
96 -C $(ICONDIR) altusmetrum-altosui-128.png\
97 -C $(ICONDIR) altusmetrum-altosui-256.png
100 $(ICONDIR)/altusmetrum-altosui.ico \
101 $(ICONDIR)/altusmetrum-altosui.exe
102 $(ICONDIR)/application-vnd.altusmetrum.eeprom.ico \
103 $(ICONDIR)/application-vnd.altusmetrum.eeprom.exe \
104 $(ICONDIR)/application-vnd.altusmetrum.telemetry.ico \
105 $(ICONDIR)/application-vnd.altusmetrum.telemetry.exe
108 $(ICONDIR)/altusmetrum-altosui.icns \
109 $(ICONDIR)/application-vnd.altusmetrum.eeprom.icns \
110 $(ICONDIR)/application-vnd.altusmetrum.telemetry.icns
113 $(ICONDIR)/altusmetrum-altosui.svg \
114 $(ICONDIR)/application-vnd.altusmetrum.eeprom.svg \
115 $(ICONDIR)/application-vnd.altusmetrum.telemetry.svg
118 $(ICONDIR)/org-altusmetrum-mimetypes.xml
121 FIRMWARE_TD_0_2=$(top_srcdir)/src/teledongle-v0.2/teledongle-v0.2-$(VERSION).ihx
122 FIRMWARE_TD_3_0=$(top_srcdir)/src/teledongle-v3.0/teledongle-v3.0-$(VERSION).ihx
123 FIRMWARE_TD=$(FIRMWARE_TD_0_2) $(FIRMWARE_TD_3_0)
125 FIRMWARE_TM_1_0=$(top_srcdir)/src/telemetrum-v1.0/telemetrum-v1.0-$(VERSION).ihx
126 FIRMWARE_TM_1_1=$(top_srcdir)/src/telemetrum-v1.1/telemetrum-v1.1-$(VERSION).ihx
127 FIRMWARE_TM_1_2=$(top_srcdir)/src/telemetrum-v1.2/telemetrum-v1.2-$(VERSION).ihx
128 FIRMWARE_TM_2_0=$(top_srcdir)/src/telemetrum-v2.0/telemetrum-v2.0-$(VERSION).ihx
129 #FIRMWARE_TM_3_0=$(top_srcdir)/src/telemetrum-v3.0/telemetrum-v3.0-$(VERSION).ihx
130 #FIRMWARE_TM=$(FIRMWARE_TM_1_0) $(FIRMWARE_TM_1_1) $(FIRMWARE_TM_1_2) $(FIRMWARE_TM_2_0) $(FIRMWARE_TM_3_0)
131 FIRMWARE_TM=$(FIRMWARE_TM_1_0) $(FIRMWARE_TM_1_1) $(FIRMWARE_TM_1_2) $(FIRMWARE_TM_2_0)
133 FIRMWARE_TELEMINI_1_0=$(top_srcdir)/src/telemini-v1.0/telemini-v1.0-$(VERSION).ihx
134 FIRMWARE_TELEMINI=$(FIRMWARE_TELEMINI_1_0)
136 FIRMWARE_TBT_1_0=$(top_srcdir)/src/telebt-v1.0/telebt-v1.0-$(VERSION).ihx
137 FIRMWARE_TBT_3_0=$(top_srcdir)/src/telebt-v3.0/telebt-v3.0-$(VERSION).ihx
138 FIRMWARE_TBT=$(FIRMWARE_TBT_1_0) $(FIRMWARE_TBT_3_0)
140 FIRMWARE_TMEGA_1_0=$(top_srcdir)/src/telemega-v1.0/telemega-v1.0-$(VERSION).ihx
141 FIRMWARE_TMEGA_2_0=$(top_srcdir)/src/telemega-v2.0/telemega-v2.0-$(VERSION).ihx
142 FIRMWARE_TMEGA=$(FIRMWARE_TMEGA_1_0) $(FIRMWARE_TMEGA_2_0)
144 FIRMWARE_EMINI_1_0=$(top_srcdir)/src/easymini-v1.0/easymini-v1.0-$(VERSION).ihx
145 FIRMWARE_EMINI=$(FIRMWARE_EMINI_1_0)
147 FIRMWARE_EMEGA_1_0=$(top_srcdir)/src/easymega-v1.0/easymega-v1.0-$(VERSION).ihx
148 FIRMWARE_EMEGA=$(FIRMWARE_EMEGA_1_0)
150 FIRMWARE_TGPS_1_0=$(top_srcdir)/src/telegps-v1.0/telegps-v1.0-$(VERSION).ihx
151 FIRMWARE_TGPS=$(FIRMWARE_TGPS_1_0)
153 FIRMWARE=$(FIRMWARE_TM) $(FIRMWARE_TELEMINI) $(FIRMWARE_TD) $(FIRMWARE_TBT) $(FIRMWARE_TMEGA) $(FIRMWARE_EMINI) $(FIRMWARE_TGPS) $(FIRMWARE_EMEGA)
155 ALTUSMETRUM_DOC=$(top_srcdir)/doc/altusmetrum.pdf
156 ALTOS_DOC=$(top_srcdir)/doc/altos.pdf
157 TELEMETRY_DOC=$(top_srcdir)/doc/telemetry.pdf
159 $(top_srcdir)/doc/telemetrum-outline.pdf \
160 $(top_srcdir)/doc/easymini-outline.pdf \
161 $(top_srcdir)/doc/telemega-outline.pdf \
162 $(top_srcdir)/doc/telemini-outline.pdf
164 DOC=$(ALTUSMETRUM_DOC) $(ALTOS_DOC) $(TELEMETRY_DOC) $(TEMPLATE_DOC)
166 # Distribution targets
167 LINUX_DIST=Altos-Linux-$(VERSION).tar.bz2
168 LINUX_SH=Altos-Linux-$(VERSION).sh
169 MACOSX_DIST=Altos-Mac-$(VERSION).dmg
170 WINDOWS_DIST=Altos-Windows-$(VERSION_DASH).exe
172 FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS)
174 LINUX_LIBS=$(LIBALTOS_LINUX)
176 LINUX_FILES=$(FAT_FILES) $(LINUX_LIBS) $(FIRMWARE) $(DOC) $(desktop_file).in $(LINUX_ICONS) $(LINUX_MIMETYPE)
177 LINUX_EXTRA=altosui-fat
179 MACOSX_INFO_PLIST=Info.plist
180 MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(DOC) ReadMe-Mac.rtf $(MACOSX_ICONS)
181 MACOSX_EXTRA=$(FIRMWARE)
183 WINDOWS_FILES=$(FAT_FILES) $(FIRMWARE) altos.dll altos64.dll $(top_srcdir)/altusmetrum.inf $(top_srcdir)/altusmetrum.cat $(WINDOWS_ICONS)
185 all-local: classes/altosui $(JAR) altosui altosui-test altosui-jdb
188 -rm -rf classes $(JAR) $(FATJAR) \
189 Altos-Linux-*.tar.bz2 Altos-Linux-*.sh Altos-Mac-*.dmg Altos-Windows-*.exe \
190 windows altoslib_*.jar altosuilib_*.jar $(FREETTS_CLASS) \
191 $(JFREECHART_CLASS) $(JCOMMON_CLASS) $(LIBALTOS) Manifest.txt Manifest-fat.txt altos-windows.log altos-windows.nsi \
192 altosui altosui-test altosui-jdb macosx linux *.desktop
194 EXTRA_DIST = $(desktop_file).in
196 $(desktop_file): $(desktop_file).in
197 sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/$(desktop_file).in > $@
202 FATTARGET=$(FATDIR)/$(VERSION)
204 LINUX_DIST_TARGET=$(FATTARGET)/$(LINUX_DIST)
205 LINUX_SH_TARGET=$(FATTARGET)/$(LINUX_SH)
206 MACOSX_DIST_TARGET=$(FATTARGET)/$(MACOSX_DIST)
207 WINDOWS_DIST_TARGET=$(FATTARGET)/$(WINDOWS_DIST)
209 fat: $(LINUX_DIST_TARGET) $(LINUX_SH_TARGET) $(MACOSX_DIST_TARGET) $(WINDOWS_DIST_TARGET)
211 $(LINUX_DIST_TARGET): $(LINUX_DIST)
212 mkdir -p $(FATTARGET)
215 $(LINUX_SH_TARGET): $(LINUX_SH)
216 mkdir -p $(FATTARGET)
219 $(MACOSX_DIST_TARGET): $(MACOSX_DIST)
220 mkdir -p $(FATTARGET)
223 $(WINDOWS_DIST_TARGET): $(WINDOWS_DIST)
224 mkdir -p $(FATTARGET)
228 fat: $(LINUX_DIST) $(LINUX_SH) $(MACOSX_DIST) $(WINDOWS_DIST)
231 altosuidir=$(datadir)/java
233 install-altosuiJAVA: altosui.jar
235 test -z "$(altosuidir)" || $(MKDIR_P) "$(DESTDIR)$(altosuidir)"
236 echo " $(INSTALL_DATA)" "$<" "'$(DESTDIR)$(altosuidir)/altosui.jar'"; \
237 $(INSTALL_DATA) "$<" "$(DESTDIR)$(altosuidir)"
240 mkdir -p classes/altosui
242 $(JAR): classaltosui.stamp Manifest.txt $(JAVA_ICONS) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS)
243 jar cfm $@ Manifest.txt \
246 -C ../libaltos libaltosJNI
248 $(FATJAR): classaltosui.stamp Manifest-fat.txt $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) $(LIBALTOS) $(JAVA_ICONS)
249 jar cfm $@ Manifest-fat.txt \
252 -C ../libaltos libaltosJNI
254 Manifest.txt: Makefile
255 echo 'Main-Class: altosui.AltosUI' > $@
256 echo "Class-Path: $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS)/freetts.jar $(JCOMMON)/jcommon.jar $(JFREECHART)/jfreechart.jar" >> $@
259 echo 'Main-Class: altosui.AltosUI' > $@
260 echo "Class-Path: $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) freetts.jar jcommon.jar jfreechart.jar" >> $@
263 echo "#!/bin/sh" > $@
264 echo 'exec java -Djava.library.path="$(altoslibdir)" -jar "$(altosuidir)/altosui.jar" "$$@"' >> $@
267 altosui-test: Makefile
268 echo '#!/bin/sh' > $@
269 echo 'dir="$$(dirname $$0)"' >> $@
270 echo 'cd "$$dir"' >> $@
271 echo 'altosui="$$(pwd -P)"' >> $@
272 echo 'altos="$$(dirname $$altosui)"' >> $@
273 echo 'exec java -Djava.library.path="$$altos/libaltos/.libs" -jar "$$altosui/altosui.jar" "$$@"' >> $@
276 altosui-jdb: Makefile
277 echo "#!/bin/sh" > $@
278 echo 'exec jdb -classpath "classes:./*:../libaltos:$(FREETTS)/freetts.jar:$(JCOMMON)/jcommon.jar:$(JFREECHART)/jfreechart.jar" -Djava.library.path="../libaltos/.libs" altosui/AltosUI "$$@"' >> $@
281 libaltos.so: build-libaltos
283 $(LN_S) ../libaltos/.libs/"$@" .
285 libaltos32.so: build-libaltos
287 $(LN_S) ../libaltos/.libs/"$@" .
289 libaltos64.so: build-libaltos
291 $(LN_S) ../libaltos/.libs/"$@" .
295 $(LN_S) ../libaltos/"$@" .
297 altos.dll: ../libaltos/altos.dll
299 $(LN_S) ../libaltos/"$@" .
301 altos64.dll: ../libaltos/altos64.dll
303 $(LN_S) ../libaltos/"$@" .
305 ../libaltos/.libs/libaltos64.so: ../libaltos/.libs/libaltos32.so
307 ../libaltos/.libs/libaltos32.so: build-libaltos
309 ../libaltos/.libs/libaltos.so: build-libaltos
311 ../libaltos/altos.dll: build-altos-dll
313 ../libaltos/altos64.dll: build-altos64-dll
316 +cd ../libaltos && make libaltos.la
318 +cd ../libaltos && make altos.dll
321 +cd ../libaltos && make altos64.dll
325 $(LN_S) ../altoslib/"$@" .
329 $(LN_S) ../altosuilib/"$@" .
333 $(LN_S) "$(FREETTS)"/"$@" .
337 $(LN_S) "$(JFREECHART)"/"$@" .
341 $(LN_S) "$(JCOMMON)"/"$@" .
343 $(LINUX_DIST): $(LINUX_FILES) $(LINUX_EXTRA)
347 cp -p $(LINUX_FILES) linux/AltOS
348 cp -p altosui-fat linux/AltOS/altosui
349 chmod +x linux/AltOS/altosui
350 tar cjf $@ -C linux AltOS
352 $(LINUX_SH): $(LINUX_DIST) linux-install.sh
353 cat linux-install.sh $(LINUX_DIST) > $@
356 $(MACOSX_DIST): $(MACOSX_FILES) $(MACOSX_EXTRA) Makefile
360 cp -a AltosUI.app macosx/
361 cp -a ReadMe-Mac.rtf macosx/ReadMe.rtf
363 cp -a $(DOC) macosx/Doc
364 cp -p Info.plist macosx/AltosUI.app/Contents
365 mkdir -p macosx/AltOS-$(VERSION) macosx/AltosUI.app/Contents/Resources/Java
366 cp -p $(MACOSX_ICONS) macosx/AltosUI.app/Contents/Resources
367 cp -p $(FATJAR) macosx/AltosUI.app/Contents/Resources/Java/altosui.jar
368 cp -p libaltos.dylib macosx/AltosUI.app/Contents/Resources/Java
369 cp -p $(ALTOSLIB_CLASS) macosx/AltosUI.app/Contents/Resources/Java
370 cp -p $(ALTOSUILIB_CLASS) macosx/AltosUI.app/Contents/Resources/Java
371 cp -p $(FREETTS_CLASS) macosx/AltosUI.app/Contents/Resources/Java
372 cp -p $(JFREECHART_CLASS) macosx/AltosUI.app/Contents/Resources/Java
373 cp -p $(JCOMMON_CLASS) macosx/AltosUI.app/Contents/Resources/Java
374 cp -p $(MACOSX_EXTRA) macosx/AltOS-$(VERSION)
375 genisoimage -D -V AltOS-$(VERSION) -no-pad -r -apple -o $@ macosx
377 $(WINDOWS_DIST): $(WINDOWS_FILES) altos-windows.nsi Instdrv/NSIS/Includes/java.nsh
379 makensis -Oaltos-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" altos-windows.nsi || (cat altos-windows.log && exit 1)