+# location of code signing key, et al
+
JAVAROOT=classes
-AM_JAVACFLAGS=-target 1.6 -encoding UTF-8 -Xlint:deprecation -Xlint:unchecked -source 6
+AM_JAVACFLAGS=$(JAVAC_VERSION_FLAGS) -encoding UTF-8 -Xlint:deprecation -Xlint:unchecked
man_MANS=telegps.1
TeleGPSStatus.java \
TeleGPSStatusUpdate.java \
TeleGPSInfo.java \
+ TeleGPSState.java \
TeleGPSConfig.java \
TeleGPSConfigUI.java \
TeleGPSPreferences.java \
- TeleGPSGraphUI.java
+ TeleGPSGraphUI.java \
+ TeleGPSDisplayThread.java
JFREECHART_CLASS= \
jfreechart.jar
FATJAR=telegps-fat.jar
+if MULTI_ARCH
+LIBALTOS_LINUX=libaltos_i686.so libaltos_amd64.so libaltos_aarch64.so libaltos_armel.so libaltos_armhf.so
+else
+LIBALTOS_LINUX=libaltos.so
+endif
+
LIBALTOS= \
- libaltos.so \
+ $(LIBALTOS_LINUX) \
libaltos.dylib \
altos64.dll \
altos.dll
ICONDIR=$(top_srcdir)/icon
JAVA_ICONS=\
- $(ICONDIR)/telegps-16.png \
- $(ICONDIR)/telegps-32.png \
- $(ICONDIR)/telegps-48.png \
- $(ICONDIR)/telegps-64.png \
- $(ICONDIR)/telegps-128.png \
- $(ICONDIR)/telegps-256.png
+ $(ICONDIR)/altusmetrum-telegps-16.png \
+ $(ICONDIR)/altusmetrum-telegps-32.png \
+ $(ICONDIR)/altusmetrum-telegps-48.png \
+ $(ICONDIR)/altusmetrum-telegps-64.png \
+ $(ICONDIR)/altusmetrum-telegps-128.png\
+ $(ICONDIR)/altusmetrum-telegps-256.png
# icon base names for jar
-ICONJAR= -C $(ICONDIR) telegps-16.png \
- -C $(ICONDIR) telegps-32.png \
- -C $(ICONDIR) telegps-48.png \
- -C $(ICONDIR) telegps-64.png \
- -C $(ICONDIR) telegps-128.png \
- -C $(ICONDIR) telegps-256.png
-
-WINDOWS_ICON=$(ICONDIR)/telegps.ico
+ICONJAR= \
+ -C $(ICONDIR) altusmetrum-telegps-16.png \
+ -C $(ICONDIR) altusmetrum-telegps-32.png \
+ -C $(ICONDIR) altusmetrum-telegps-48.png \
+ -C $(ICONDIR) altusmetrum-telegps-64.png \
+ -C $(ICONDIR) altusmetrum-telegps-128.png\
+ -C $(ICONDIR) altusmetrum-telegps-256.png
+
+WINDOWS_ICONS =\
+ ../icon/altusmetrum-telegps.ico \
+ ../icon/altusmetrum-telegps.exe
+ ../icon/application-vnd.altusmetrum.eeprom.ico \
+ ../icon/application-vnd.altusmetrum.eeprom.exe \
+ ../icon/application-vnd.altusmetrum.telemetry.ico \
+ ../icon/application-vnd.altusmetrum.telemetry.exe
+
+MACOSX_ICONS =\
+ ../icon/altusmetrum-telegps.icns \
+ ../icon/application-vnd.altusmetrum.eeprom.icns \
+ ../icon/application-vnd.altusmetrum.telemetry.icns
+
+LINUX_ICONS =\
+ $(ICONDIR)/altusmetrum-altosui.svg \
+ $(ICONDIR)/application-vnd.altusmetrum.eeprom.svg \
+ $(ICONDIR)/application-vnd.altusmetrum.telemetry.svg
+
+LINUX_MIMETYPE =\
+ $(ICONDIR)/org-altusmetrum-mimetypes.xml
# Firmware
-FIRMWARE_TD_0_2=$(top_srcdir)/src/teledongle-v0.2/teledongle-v0.2-$(VERSION).ihx
-FIRMWARE_TD=$(FIRMWARE_TD_0_2)
+FIRMWARE_TD_3_0=$(top_srcdir)/src/teledongle-v3.0/teledongle-v3.0-$(VERSION).ihx
+FIRMWARE_TD=$(FIRMWARE_TD_3_0)
-FIRMWARE_TBT_1_0=$(top_srcdir)/src/telebt-v1.0/telebt-v1.0-$(VERSION).ihx
-FIRMWARE_TBT=$(FIRMWARE_TBT_1_0)
+FIRMWARE_TBT_3_0=$(top_srcdir)/src/telebt-v3.0/telebt-v3.0-$(VERSION).ihx
+FIRMWARE_TBT_4_0=$(top_srcdir)/src/telebt-v4.0/telebt-v4.0-$(VERSION).ihx
+FIRMWARE_TBT=$(FIRMWARE_TBT_3_0) $(FIRMWARE_TBT_4_0)
-#FIRMWARE_TG_1_0=$(top_srcdir)/src/telegps-v1.0/telegps-v1.0-$(VERSION).ihx
-#FIRMWARE_TG=$(FIRMWARE_TG_1_0)
+FIRMWARE_TGPS_1_0=$(top_srcdir)/src/telegps-v1.0/telegps-v1.0-$(VERSION).ihx
+FIRMWARE_TGPS_2_0=$(top_srcdir)/src/telegps-v2.0/telegps-v2.0-$(VERSION).ihx
+FIRMWARE_TGPS_3_0=$(top_srcdir)/src/telegps-v3.0/telegps-v3.0-$(VERSION).ihx
+FIRMWARE_TGPS_4_0=$(top_srcdir)/src/telegps-v4.0/telegps-v4.0-$(VERSION).ihx
+FIRMWARE_TGPS=$(FIRMWARE_TGPS_1_0) $(FIRMWARE_TGPS_2_0) $(FIRMWARE_TGPS_3_0) $(FIRMWARE_TGPS_4_0)
-FIRMWARE=$(FIRMWARE_TG) $(FIRMWARE_TD) $(FIRMWARE_TBT)
+FIRMWARE=$(FIRMWARE_TGPS) $(FIRMWARE_TD) $(FIRMWARE_TBT)
desktopdir = $(datadir)/applications
-desktop_file = telegps.desktop
+desktop_file = altusmetrum-telegps.desktop
desktop_SCRIPTS = $(desktop_file)
-all-local: telegps-test telegps-jdb $(JAR)
+all-local: telegps-test telegps-jdb $(JAR) $(MDWN)
clean-local:
-rm -rf classes $(JAR) $(FATJAR) \
TeleGPS-Linux-*.tar.bz2 TeleGPS-Mac-*.dmg TeleGPS-Windows-*.exe \
- $(ALTOSLIB_CLASS) \
- $(ALTOSUILIB_CLASS) \
- $(JFREECHART_CLASS) $(JCOMMON_CLASS) $(LIBALTOS) Manifest.txt Manifest-fat.txt \
+ altoslib_*.jar altosuilib_*.jar \
+ $(JFREECHART_CLASS) $(JCOMMON_CLASS) $(FREETTS_CLASS) $(LIBALTOS) Manifest.txt Manifest-fat.txt \
telegps telegps-test telegps-jdb macosx linux windows telegps-windows.log \
- telegps-windows.nsi
+ telegps-windows.nsi *.desktop *.mdwn
EXTRA_DIST = $(desktop_file).in
$(desktop_file): $(desktop_file).in
- sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/telegps.desktop.in > $@
+ sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/$(desktop_file).in > $@
chmod +x $@
LINUX_DIST=TeleGPS-Linux-$(VERSION).tar.bz2
LINUX_SH=TeleGPS-Linux-$(VERSION).sh
MACOSX_DIST=TeleGPS-Mac-$(VERSION).dmg
WINDOWS_DIST=TeleGPS-Windows-$(VERSION_DASH).exe
+MDWN=$(VERSION).mdwn
+MDWNTMPL=mdwn.tmpl
TELEGPS_DOC=$(top_srcdir)/doc/telegps.pdf
FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS)
-LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) telegps.desktop.in ../icon/telegps.svg
-LINUX_EXTRA=telegps-fat telegps.desktop.in
+LINUX_FILES=$(FAT_FILES) $(LIBALTOS_LINUX) $(FIRMWARE) $(DOC) $(desktop_file).in $(LINUX_ICONS) $(LINUX_MIMETYPE)
+LINUX_EXTRA=telegps-fat $(desktop_file).in
MACOSX_INFO_PLIST=Info.plist
MACOSX_README=ReadMe-Mac.rtf
-MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(MACOSX_README) $(DOC)
+MACOSX_INSTALL=../altosui/install-macosx ../altosui/ask-pass
+MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(MACOSX_README) $(DOC) $(MACOSX_ICONS) $(MACOSX_INSTALL)
MACOSX_EXTRA=$(FIRMWARE)
-WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(top_srcdir)/telemetrum.inf $(DOC) $(WINDOWS_ICON)
+WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(top_srcdir)/altusmetrum.inf $(top_srcdir)/altusmetrum.cat $(DOC) $(WINDOWS_ICONS)
if FATINSTALL
-FATTARGET=$(FATDIR)/$(VERSION)
+FATTARGET=$(FATDIR)/TeleGPS/releases/$(VERSION)
-LINUX_DIST_TARGET=$(FATTARGET)/$(LINUX_DIST)
LINUX_SH_TARGET=$(FATTARGET)/$(LINUX_SH)
MACOSX_DIST_TARGET=$(FATTARGET)/$(MACOSX_DIST)
WINDOWS_DIST_TARGET=$(FATTARGET)/$(WINDOWS_DIST)
+MDWN_TARGET=$(FATDIR)/TeleGPS/releases/$(MDWN)
+RELNOTES=release-notes-$(VERSION).html
+RELNOTES_SRC=$(top_builddir)/doc/$(RELNOTES)
+RELNOTES_TARGET=$(FATTARGET)/$(RELNOTES)
-fat: $(LINUX_DIST_TARGET) $(LINUX_SH_TARGET) $(MACOSX_DIST_TARGET) $(WINDOWS_DIST_TARGET)
-
-$(LINUX_DIST_TARGET): $(LINUX_DIST)
- mkdir -p $(FATTARGET)
- cp -p $< $@
+fat-install: $(LINUX_SH_TARGET) $(MACOSX_DIST_TARGET) $(WINDOWS_DIST_TARGET) $(MDWN_TARGET) $(RELNOTES_TARGET)
$(LINUX_SH_TARGET): $(LINUX_SH)
mkdir -p $(FATTARGET)
mkdir -p $(FATTARGET)
cp -p $< $@
-else
-fat: $(LINUX_DIST) $(LINUX_SH) $(MACOSX_DIST) $(WINDOWS_DIST)
+$(MDWN_TARGET): $(MDWN)
+ mkdir -p $(FATTARGET)
+ cp -p $< $@
+
+$(RELNOTES_TARGET): $(RELNOTES_SRC)
+ mkdir -p $(FATTARGET)
+ sh $(top_srcdir)/doc/install-html -d $(FATTARGET) $(RELNOTES_SRC)
+
endif
+$(MDWN): $(MDWNTMPL)
+ sed -e 's/%version%/$(VERSION)/g' -e 's/%version_dash%/$(VERSION_DASH)/g' $(MDWNTMPL) > $@
+
+fat: $(LINUX_DIST) $(LINUX_SH) $(MACOSX_DIST) $(WINDOWS_DIST)
+
+
telegps: Makefile
echo "#!/bin/sh" > $@
echo 'exec java -Djava.library.path="$(altoslibdir)" -jar "$(telegpsdir)/telegps.jar" "$$@"' >> $@
$(ICONJAR) \
-C classes org \
-C ../libaltos libaltosJNI
+if STRIP_NONDETERMINISM
+ $(STRIP_NONDETERMINISM) $@
+endif
$(FATJAR): classtelegps.stamp Manifest-fat.txt $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) $(JAVA_ICONS)
jar cfm $@ Manifest-fat.txt \
$(ICONJAR) \
-C classes org \
-C ../libaltos libaltosJNI
-
-classaltosui.stamp: $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS)
+if STRIP_NONDETERMINISM
+ $(STRIP_NONDETERMINISM) $@
+endif
libaltos.so: build-libaltos
-rm -f "$@"
$(LN_S) ../libaltos/.libs/"$@" .
+libaltos_i686.so: build-libaltos
+ -rm -f "$@"
+ $(LN_S) ../libaltos/.libs/"$@" .
+
+libaltos_amd64.so: build-libaltos
+ -rm -f "$@"
+ $(LN_S) ../libaltos/.libs/"$@" .
+
+libaltos_aarch64.so: build-libaltos
+ -rm -f "$@"
+ $(LN_S) ../libaltos/.libs/"$@" .
+
+libaltos_armel.so: build-libaltos
+ -rm -f "$@"
+ $(LN_S) ../libaltos/.libs/"$@" .
+
+libaltos_armhf.so: build-libaltos
+ -rm -f "$@"
+ $(LN_S) ../libaltos/.libs/"$@" .
+
libaltos.dylib:
-rm -f "$@"
$(LN_S) ../libaltos/"$@" .
-altos.dll: ../libaltos/altos.dll
+altos.dll: build-libaltos
-rm -f "$@"
$(LN_S) ../libaltos/"$@" .
-altos64.dll: ../libaltos/altos64.dll
+altos64.dll: build-libaltos
-rm -f "$@"
$(LN_S) ../libaltos/"$@" .
-../libaltos/.libs/libaltos.so: build-libaltos
-
-../libaltos/altos.dll: build-altos-dll
-
-../libaltos/altos64.dll: build-altos64-dll
-
build-libaltos:
- +cd ../libaltos && make libaltos.la
-build-altos-dll:
- +cd ../libaltos && make altos.dll
-
-build-altos64-dll:
- +cd ../libaltos && make altos64.dll
+ +cd ../libaltos && make
$(ALTOSLIB_CLASS):
-rm -f "$@"
-rm -rf macosx
mkdir macosx
cp -a TeleGPS.app macosx/
- cp -a $(MACOSX_README) macosx/ReadMe.rtf
- cp -a $(DOC) macosx
+ cp -a $(MACOSX_README) macosx/ReadMe-TeleGPS.rtf
+ cp -a $(MACOSX_INSTALL) macosx
+ mkdir -p macosx/Doc
+ cp -a $(DOC) macosx/Doc
cp -p Info.plist macosx/TeleGPS.app/Contents
mkdir -p macosx/AltOS-$(VERSION) macosx/TeleGPS.app/Contents/Resources/Java
+ cp -p $(MACOSX_ICONS) macosx/TeleGPS.app/Contents/Resources
cp -p $(FATJAR) macosx/TeleGPS.app/Contents/Resources/Java/telegps.jar
cp -p libaltos.dylib macosx/TeleGPS.app/Contents/Resources/Java
cp -p $(ALTOSLIB_CLASS) macosx/TeleGPS.app/Contents/Resources/Java
$(WINDOWS_DIST): $(WINDOWS_FILES) telegps-windows.nsi
-rm -f $@
- makensis -Otelegps-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" telegps-windows.nsi
+ makensis -Otelegps-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" telegps-windows.nsi || (cat telegps-windows.log && exit 1)
+ if [ "$(HAVE_WINDOWS_KEY)" = "yes" ]; then \
+ jsign --keystore "$(WINDOWSKEYFILE)" --alias 1 \
+ --storetype PKCS12 --storepass `cat "$(WINDOWSKEYPASSFILE)"` \
+ --tsaurl http://ts.ssl.com --tsmode RFC3161 $@ ; \
+ fi
Manifest.txt: Makefile
echo 'Main-Class: org.altusmetrum.telegps.TeleGPS' > $@