summaryrefslogtreecommitdiffstats
path: root/Makefile
AgeCommit message (Collapse)Author
2012-10-17Install all .mo files on all targetsGravatar Henrik Brautaset Aronsen
Linux didn't have a locale install target, and Windows didn't install aliased locale files. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-16Fix typo and make variable name more logicalGravatar Dirk Hohndel
[the macos/macosx typo was also found and a patch submitted by Henrik Brautaset Aronsen <subsurface@henrik.synth.no>] Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-16Redoing the Mac bundlingGravatar Dirk Hohndel
With the right tools in place you can now create a bundle from the Makefile by calling "make create-macos-bundle" In the process of this I also moved the locale directory where we stage our .mo files to share/locale (which is much more logical). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-16Adjust locale path for install-macosx targetGravatar Henrik Brautaset Aronsen
gtk-mac-bundler uses Contents/Resources/share/locale, and the install-macosx target should do the same. Also quiet down the make process a bit Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-16Update version to 2.1-rc1Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-16Support for language aliases.Gravatar Henrik Brautaset Aronsen
Some languages have identifiers that gettext can't determine automatically in all OS'es. An example is Norwegian (no_NO, deprecated) with its Bokmål (nb_NO) and Nynorsk (nn_NO) form. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-16Improved packaging for WindowsGravatar Dirk Hohndel
This commit adds an install-cross-windows target to the Makefile that creates a staging directory for us under packaging/windows that contains the required .mo files. This currently fails for the Norwegian translation because of the no_NO.UTF-8 vs nb issue - right now we just use the first component of our own localization filename to find the matching Windows localization and that fails. The subsurface.nsi file is updated accordingly and this now appears to create working installers with sane paths for the localization files. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-15Merge branch 'gettext'Gravatar Dirk Hohndel
Bring all the localization changes into master in preparation for Subsurface 2.1
2012-10-15Support for gettext in MacOSX application bundleGravatar Henrik Brautaset Aronsen
The MacOSX applications bundle needs to be told where to bind the text domain from. Also copy the gettext .mo files in the install-macosx target. [Dirk Hohndel: minor change in main(): move the path declaration to the beginning of the function] Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-12Better gettext buildGravatar Henrik Brautaset Aronsen
My previous take at adding gettext to the Makefile wasn't very good, since it always relinked the subsurface executable. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-11Basic gettext support when buildingGravatar Henrik Brautaset Aronsen
Added basic support for building gettext locales in the Makefile. The po file name should match the target locale. [Dirk Hohndel: Used git mv to rename the German .po file] Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-11More gtk-mac-bundler improvementsGravatar Henrik Brautaset Aronsen
Without "-headerpad_max_install_names", gtk-mac-bundler would complain with "changing install names or rpaths can't be redone for: /Applications/.subsurface.app/Contents/MacOS/subsurface-bin (for architecture x86_64) because larger updated load commands do not fit" Also, libdivecomputer needs to be configured with --with-prefix=/opt/local Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-07Bump version to 2.0.1v2.0.1Gravatar Dirk Hohndel
That crash is far too easy to hit for people just trying out subsurface. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-26Getting ready for the 2.0 releaseGravatar Dirk Hohndel
Changing the version to 2.0-rc1 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-26First implementation of native Uemis downloaderGravatar Dirk Hohndel
This includes one major hack that uses a private data structure from libdivecomputer to allow us to show the Uemis Zurich as one computer the user can import from. Once the user has chosen the Uemis we don't use libdivecomputer but our own downloader. Just like in the libdicecomputer case this runs in its own thread and updates the import dialog with progress information. The code also keeps track of the last dive that has been downloaded from a Uemis computer so we only import new dives on subsequent downloads. And since the Uemis Zurich gives us its device id, we make this a "per divecomputer" property for people who dive with multiple Uemis Zurich computers. This uses the debugfile infrastructure to allow easily collecting debugging output - especially on Windows where by default console output is lost. Known limitations: when the Uemis runs out of space (it uses its filesystem for communication with the host computer) we have no graceful way to reset things. This is why the code doesn't try to download ALL dives on the computer but instead download them in increments of ten dives. This clearly needs to be addressed once I understand how to reset the device. The Cancel button of the import dialog isn't correctly hooked up, yet. I still need to figure out how to gracefully shut down a download without potentially hanging the device. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-19Use a 64-bit 'timestamp_t' for all timestamps, rather than 'time_t'Gravatar Linus Torvalds
This makes the time type unambiguous, and we can use G_TYPE_INT64 for it in the divelist too. It also implements a portable (and thread-safe) "utc_mkdate()" function that acts kind of like gmtime_r(), but using the 64-bit timestamp_t. It matches our original "utc_mktime()". Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-09-13make clean should remove subsurface.exe as wellGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-07-10Update for libdivecomputer pkg-config include file changesGravatar Linus Torvalds
Subsurface doesn't compile on OS X any more, because libdivecomputer changed the way the header inclusion works: the include path from pkg-config no longer includes the final "libdivecomputer" component, and instead of doing #include <header.h> for libdivecomputer headers, we're now supposed to do #include <libdivecomputer/header.h> instead. Which is cleaner anyway. The reason this only bit us on OS X is that I never trusted pkg-config that much for non-system libraries on Linux (maybe it works, maybe it doesn't, I've seen it go both ways), so on Linux we just used our own version of the include path, and thus weren't affected by the libdivecomputer config change. Clean up the includes while at it - we no longer need (or want) the device-specific header files, since we just use the generic functions. Reported-by: Grischa Toedt <toedt@embl.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-27Add some initial cochran CAN file parsingGravatar Linus Torvalds
It's broken, and currently only writes out a debug output file per dive. I'm not sure I'll ever really be able to decode the mess that is the Cochran ANalyst stuff, but I have a few test files, along with separate depth info from a couple of the dives in question, so in case this ever works I can at least validate it to some degree. The file format is definitely very intentionally obscured, though. Annoying. It's not like the Cochran software is actually all that good (it's really quite a horribly nasty Windows-only app, I'm told). Cochran Analyst is very much not the reason why people would buy those computers. So Cochran making their computers harder to use with other software is just stupid. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-26Add "native" Suunto SDE zip file readingGravatar Linus Torvalds
You need to have libzip-devel installed, and pkg-config needs to know about it for the build to pick up on it. On at least Fedora, a simple "yum install libzip-devel" will make things work, although you may need to force a rebuild of subsurface too (the "file.o" file in particular - the Makefile doesn't track system dependencies). Then, you can just do subsurface my-dives.SDE to read the data directly from the SDE file. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-26Split up file reading from 'parse-xml.c' into 'file.c'Gravatar Linus Torvalds
We're going to eventually import non-xml files too, so let's begin splitting the logic up. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-15Link with libm for 'pow()'Gravatar Cristian Ionescu-Idbohrn
Solves suddenly revealed linking error: divelist.c:400: error: undefined reference to 'pow' Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-03More Mac improvementsGravatar Henrik Brautaset Aronsen
The startup shell script workaround isn't needed anymore. The preferences hotkey didn't work. Remove left-over menu separators. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
2012-01-01First try at converting user-manual to AsciiDocGravatar Linus Torvalds
You can do "make doc" in the main directory to create the html version, and if you want to play around with it, do "make show" in the Documentation subdirectory to start firefox on the end result. It's by no means perfect, but it gives somewhat reasonable results, and this is enough initial work for people to play around with, I think. NOTE! You need "asciidoc" installed to do this: it's a python program, so it should be pretty easy even on non-Linux platforms. And on Linux, most distributions package it, so you just have to do something like yum install asciidoc to get it (replace with apt-get/zypper/whatever). Asciidoc can generate other output too (man-pages, LaTeX, etc), maybe people want to play with that part too. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-01Turn subsurface into a real Mac applicationGravatar Dirk Hohndel
To do this a few things needed to move into the os specific files, but the overall change is fairly small and the difference on the Mac is amazing. Subsurface now becomes a Mac app with Mac toolbar and useful default fonts. Changed the CFBundleIdentifier to be the reverse DNS of the subsurface site (sadly, 'torvalds' is not yet a TLD). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-12-14Improve Makefile for MacOSGravatar Dirk Hohndel
Some macs appear to need "-framework CoreFoundation" added to the linking step, others (which appear to have the exact same OS and tools installed), don't. But as it doesn't appeart to hurt, I unconditionally add this. Switched to using pkgconfig to find libdivecomputer on the Mac. Tried to clean up the Makefile a bit Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Acked-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
2011-12-08Subsurface 1.2v1.2Gravatar Linus Torvalds
With the whole UI change (three-paned window and different look with new colors), let's just make a new release, as Dirk points out. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-27makefile: use dumpmachine instead of grep for TargetGravatar Martin Gysel
grep for Target doesn't work on non english platforms -dumpmachine is (hopefully) supposed to always return the target machine tuple Signed-off-by: Martin Gysel <me@bearsh.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-24Improve cross compile support and fix windows.cGravatar Dirk Hohndel
This should make the Makefile much more robust when cross compiling. The windows.c code is now compile tested but not functionally tested. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-24Split reading/writing preferences into OS specific filesGravatar Dirk Hohndel
This adds tested code for Linux and Mac OS, implementing the api that Linus suggested. The Windows code was moved into its own file, but hasn't even been compile tested, yet. In order to have just one interface to set or get a preference value we encode TRUE as (void *) 1 and FALSE as NULL. This works consistently on all platforms and regardless of whether we have 32 or 64 bit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-19Fix the Makefile '-c' location, add XML2CFLAGSGravatar Terrance Stanfield
I was getting the following error: dive.h:8:25: fatal error: libxml/tree.h: No such file or directory compilation terminated. So I updated the Makefile to fix that error and follow the standard in the file. Signed-off-by: Terrance Stanfield <t@hollowcranium.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-05Use XSLT file to open JDiveLog logsGravatar Miika Turkia
Open JDiveLog files by translating them to subsurface format using XSLT. These files are identified by the name of the first element (JDiveLog) and transform is applied to only these. The XSLT feature is compiled in only if libxslt is installed. The transformation files are installed globally in Linux under /usr/share/subsurface/xslt. Windows and OSX still need appropriate Makefile changes and testing. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-02Add Info & Stats page to the notebookGravatar Dirk Hohndel
This provides the relevant information for the currently selected dive plus a bunch of statistics over all dives in the dive_table. The visual design has lots of room for improvement - right now the different fields change size - it might be nice to have a more modern look for the entries - the O2/He field is odd - for most divers the He value will always be 0, so maybe we should only show He if there's at least one dive that uses He? Also, we simply do a comma separated list of gases for all the tanks used Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-10-31Merge branch 'macosx-app-bundle-1' of git://github.com/henrik242/subsurfaceGravatar Linus Torvalds
* 'macosx-app-bundle-1' of git://github.com/henrik242/subsurface: Use the new packaging directory for MacOSX specific files, and provide shell script workaround to make the svg icon reachable. Ignore process serial number argument when run as native MacOSX app Add basic MacOSX app bundle install target
2011-10-31Don't run gtk-update-icon-cache if DESTDIR is setGravatar Roland Dreier
We don't want to run gtk-update-icon-cache during a package build, when we're installing into a staging directory just to create a tree that will be packaged up and really installed later. The standard heuristic seems to be to skip gtk-update-icon-cache if DESTDIR is set (ie we're installing to a different location than we're configured to run from). Signed-off-by: Roland Dreier <roland@digitalvampire.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-31Use the new packaging directory for MacOSX specific files, and provide shell ↵Gravatar Henrik Brautaset Aronsen
script workaround to make the svg icon reachable. - Make use of the new packaging directory. - Set a current directory for subsurface to find the svg icon. There might be a pretter solution to this. - Somehow subsurface doesn't behave properly in the Dock. Running it in the background without Dock integration until we figure out why. Signed-Off-By: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
2011-10-31Add basic MacOSX app bundle install targetGravatar Henrik Brautaset Aronsen
Native MacOSX app bundles are installed in /Applications. We want a separate install target for this, since some would probably prefer the regular unixy way. Signed-Off-By: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
2011-10-29Get rid of the terminal window that is displayed under WindowsGravatar Dirk Hohndel
Thanks to Michael Wiedmann I now know the magic incantation to get MinGW to create a Windows executable that doesn't open two windows, a text console and the actual gtk window. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-10-29Get icons working correctly under WindowsGravatar Dirk Hohndel
With this we are able to include both a separate .ico file that the program can load at runtime and a .res file (that is created from the .rc file, both in the packaging/windows directory) that is linked into the executable and makes the Windows Explorer show the correct icon for subsurface. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-10-27Cleanup Makefile and make it work for cross compiling with MinGWGravatar Dirk Hohndel
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-10-24Annotate Makefile with hints about building under WindowsGravatar Dirk Hohndel
You can build subsurface with MinGW. It requires installing lots of random packages, plus some things still don't work. One is that xml2-config appears to be missing. So this annotates the Makefile to tell a person building under Windows how to work around this. But we can't make this platform conditional as this workaround is hardcoding the install path. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-10-24Merge branch 'bugfixes' of git://github.com/dirkhh/subsurfaceGravatar Linus Torvalds
* 'bugfixes' of git://github.com/dirkhh/subsurface: Updated changes file Create packaging directory and add spec and changes file Makefile fixes
2011-10-24Makefile fixesGravatar Dirk Hohndel
The stupid lib vs lib64 problem. I'm sure there's a more portable way to handle this, but this at least seems to work. Also fix the install target. Seriously, you create a directory with mode 644 and claim that this ever worked? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-10-24Subsurface 1.1v1.1Gravatar Linus Torvalds
We've added a fair amount of features since 1.0 (like multi-tank) and we've made things a lot prettier and supports editing much more information. So let's make a new release. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-17declare a var for libdivecomputer's cflagsGravatar Martin Gysel
This allows us the specifiy libdivecomputer's cflags (and also the library, static or dynamic) outside of the Makefile Signed-off-by: Martin Gysel <me@bearsh.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-17create man dir before installing files in itGravatar Martin Gysel
Signed-off-by: Martin Gysel <me@bearsh.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-17use DESTDIR according to my understanding of GNU standardsGravatar Martin Gysel
make DESRDIR a prefix of everything according my understanding of the GNU standards. This is also useful(/needed) for installing in Gentoo. Declare BINDIR for bin/program directory. Signed-off-by: Martin Gysel <me@bearsh.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-14Don't use dynamic linking for libdivecomputerGravatar Linus Torvalds
Commit bd8948386d55 ("Since we don't want configure, use gnumake to find libdivecomputer") was totally broken. Sure, using GNU make features is fine. But then hiding in that commit is the fact that it also changed it to use "-ldivecomputer" instead of just linking with the static libdivecomputer archive. And that's just a really bad idea. Dynamic linking is useful for things like libc, where it allows sharing of the code pages across all the programs using it. For something like libdivecomputer it's just a *bad* idea, and doesn't even work. The libdivecomputer interfaces aren't stable enough to make it a good idea even if it *did* work, and the libdivecomputer "make install" phase doesn't do the proper ldconfig etc setup anyway. Static linking is just simpler and better. It also means that the binary will work even if you move it around to another machine - since libdivecomputer isn't exactly a "standard library".. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-12Install manpageGravatar Dirk Hohndel
(and fix two white space issues) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-10-11Fix Makefile syntax errorGravatar Dirk Hohndel
it looks prettier, but we can't have a tab in front of the $(error) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>