2013-05-12 22:10:11 +00:00
|
|
|
NAME = subsurface
|
|
|
|
CAPITALIZED_NAME = Subsurface
|
2013-05-14 10:15:35 +00:00
|
|
|
TARGET = $(NAME)
|
2013-05-12 22:10:11 +00:00
|
|
|
|
2013-04-13 06:42:14 +00:00
|
|
|
include Configure.mk
|
2013-05-13 22:33:57 +00:00
|
|
|
VERSION=3.1
|
2011-09-26 18:04:50 +00:00
|
|
|
|
2011-08-30 21:36:34 +00:00
|
|
|
CC=gcc
|
2013-01-27 21:40:54 +00:00
|
|
|
CFLAGS=-Wall -Wno-pointer-sign -g $(CLCFLAGS) -DGSEAL_ENABLE
|
2013-04-01 09:25:15 +00:00
|
|
|
CXX=g++
|
2013-05-18 16:44:54 +00:00
|
|
|
CXXFLAGS=-Wall -g $(CLCXXFLAGS) $(MARBLEFLAGS)
|
2011-09-23 03:59:10 +00:00
|
|
|
INSTALL=install
|
|
|
|
|
2011-10-11 22:58:38 +00:00
|
|
|
# these locations seem to work for SuSE and Fedora
|
|
|
|
# prefix = $(HOME)
|
2011-10-17 13:53:59 +00:00
|
|
|
prefix = $(DESTDIR)/usr
|
|
|
|
BINDIR = $(prefix)/bin
|
2011-10-12 20:30:08 +00:00
|
|
|
DATADIR = $(prefix)/share
|
2013-05-30 23:39:00 +00:00
|
|
|
DOCDIR = $(DATADIR)/doc/$(NAME)
|
2011-10-12 20:30:08 +00:00
|
|
|
DESKTOPDIR = $(DATADIR)/applications
|
|
|
|
ICONPATH = $(DATADIR)/icons/hicolor
|
2011-10-11 22:58:38 +00:00
|
|
|
ICONDIR = $(ICONPATH)/scalable/apps
|
2011-10-12 20:30:08 +00:00
|
|
|
MANDIR = $(DATADIR)/man/man1
|
2013-05-12 22:10:11 +00:00
|
|
|
XSLTDIR = $(DATADIR)/$(NAME)/xslt
|
2013-05-29 19:59:38 +00:00
|
|
|
MARBLEDIR = marbledata/maps/earth/googlesat
|
2011-10-11 22:58:38 +00:00
|
|
|
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(ICONPATH)
|
|
|
|
|
2013-02-02 11:19:28 +00:00
|
|
|
ICONFILE = $(NAME)-icon.svg
|
2011-10-11 22:58:38 +00:00
|
|
|
DESKTOPFILE = $(NAME).desktop
|
2011-10-12 20:30:08 +00:00
|
|
|
MANFILES = $(NAME).1
|
2013-05-08 19:49:57 +00:00
|
|
|
XSLTFILES = xslt/*.xslt xslt/*.xsl
|
2011-08-30 21:36:34 +00:00
|
|
|
|
2013-04-23 06:26:33 +00:00
|
|
|
EXTRA_FLAGS = $(QTCXXFLAGS) $(GTKCFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) \
|
|
|
|
$(LIBDIVECOMPUTERCFLAGS) \
|
|
|
|
$(LIBSOUPCFLAGS) $(GCONF2CFLAGS)
|
|
|
|
|
2013-04-13 16:19:03 +00:00
|
|
|
HEADERS = \
|
|
|
|
qt-ui/divelistview.h \
|
|
|
|
qt-ui/maintab.h \
|
|
|
|
qt-ui/mainwindow.h \
|
|
|
|
qt-ui/models.h \
|
|
|
|
qt-ui/plotareascene.h \
|
|
|
|
qt-ui/starwidget.h \
|
2013-04-27 15:27:27 +00:00
|
|
|
qt-ui/modeldelegates.h \
|
2013-05-04 19:12:43 +00:00
|
|
|
qt-ui/profilegraphics.h \
|
2013-05-18 00:58:49 +00:00
|
|
|
qt-ui/globe.h \
|
|
|
|
qt-ui/kmessagewidget.h \
|
2013-05-20 19:43:33 +00:00
|
|
|
qt-ui/downloadfromdivecomputer.h \
|
2013-05-24 18:19:48 +00:00
|
|
|
qt-ui/preferences.h \
|
2013-06-04 21:51:27 +00:00
|
|
|
qt-ui/simplewidgets.h \
|
2013-06-06 13:33:15 +00:00
|
|
|
qt-ui/subsurfacewebservices.h \
|
2013-06-07 14:43:45 +00:00
|
|
|
qt-ui/divecomputermanagementdialog.h \
|
2013-04-13 16:19:03 +00:00
|
|
|
|
|
|
|
|
2013-04-13 16:27:55 +00:00
|
|
|
SOURCES = \
|
|
|
|
deco.c \
|
|
|
|
device.c \
|
|
|
|
dive.c \
|
|
|
|
divelist.c \
|
|
|
|
equipment.c \
|
|
|
|
file.c \
|
|
|
|
info.c \
|
|
|
|
main.c \
|
|
|
|
parse-xml.c \
|
|
|
|
profile.c \
|
|
|
|
save-xml.c \
|
|
|
|
sha1.c \
|
2013-05-07 03:36:37 +00:00
|
|
|
statistics.c \
|
2013-04-13 16:27:55 +00:00
|
|
|
time.c \
|
2013-05-20 19:43:33 +00:00
|
|
|
libdivecomputer.c \
|
2013-04-13 16:27:55 +00:00
|
|
|
qt-gui.cpp \
|
|
|
|
qt-ui/divelistview.cpp \
|
|
|
|
qt-ui/maintab.cpp \
|
|
|
|
qt-ui/mainwindow.cpp \
|
|
|
|
qt-ui/models.cpp \
|
|
|
|
qt-ui/plotareascene.cpp \
|
|
|
|
qt-ui/starwidget.cpp \
|
2013-04-27 15:27:27 +00:00
|
|
|
qt-ui/modeldelegates.cpp \
|
2013-05-04 19:12:43 +00:00
|
|
|
qt-ui/profilegraphics.cpp \
|
2013-05-17 11:14:10 +00:00
|
|
|
qt-ui/globe.cpp \
|
2013-05-18 00:58:49 +00:00
|
|
|
qt-ui/kmessagewidget.cpp \
|
2013-05-20 19:43:33 +00:00
|
|
|
qt-ui/downloadfromdivecomputer.cpp \
|
2013-05-24 18:19:48 +00:00
|
|
|
qt-ui/preferences.cpp \
|
2013-06-04 21:51:27 +00:00
|
|
|
qt-ui/simplewidgets.cpp \
|
2013-06-06 13:33:15 +00:00
|
|
|
qt-ui/subsurfacewebservices.cpp \
|
2013-06-07 14:43:45 +00:00
|
|
|
qt-ui/divecomputermanagementdialog.cpp \
|
2013-04-13 16:27:55 +00:00
|
|
|
$(RESFILE)
|
2013-04-23 06:13:10 +00:00
|
|
|
|
2013-04-14 06:24:47 +00:00
|
|
|
|
Merge branch 'Qt'
After the 3.1 release it is time to shift the focus on the Qt effort - and
the best way to do this is to merge the changes in the Qt branch into
master.
Linus was extremely nice and did a merge for me. I decided to do my own
merge instead (which by accident actually based on a different version of
the Qt branch) and then used his merge to double check what I was doing.
I resolved a few things differently but overall what we did was very much
the same (and I say this with pride since Linus is a professional git
merger)
Here's his merge commit message:
This is a rough and tumble merge of the Qt branch into 'master',
trying to sort out the conflicts as best as I could.
There were two major kinds of conflicts:
- the Makefile changes, in particular the split of the single
Makefile into Rules.mk and Configure.mk, along with the obvious Qt
build changes themselves.
Those changes conflicted with some of the updates done in mainline
wrt "release" targets and some helper macros ($(NAME) etc).
Resolved by largely taking the Qt branch versions, and then editing
in the most obvious parts of the Makefile updates from mainline.
NOTE! The script/get_version shell script was made to just fail
silently on not finding a git repository, which avoided having to
take some particularly ugly Makefile changes.
- Various random updates in mainline to support things like dive tags.
The conflicts were mainly to the gtk GUI parts, which obviously
looked different afterwards. I fixed things up to look like the
newer code, but since the gtk files themselves are actually dead in
the Qt branch, this is largely irrelevant.
NOTE! This does *NOT* introduce the equivalent Qt functionality.
The fields are there in the code now, but there's no Qt UI for the
whole dive tag stuff etc.
This seems to compile for me (although I have to force
"QMAKE=qmake-qt4" on f19), and results in a Linux binary that seems to
work, but it is otherwise largely untested.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18 05:01:41 +00:00
|
|
|
RESOURCES = $(NAME).qrc
|
2013-04-14 06:24:47 +00:00
|
|
|
|
2013-04-23 06:26:33 +00:00
|
|
|
ifneq ($(SQLITE3FLAGS),)
|
|
|
|
EXTRA_FLAGS += -DSQLITE3 $(SQLITE3FLAGS)
|
2013-05-13 16:05:15 +00:00
|
|
|
endif
|
2013-04-23 06:26:33 +00:00
|
|
|
ifneq ($(ZIPFLAGS),)
|
|
|
|
EXTRA_FLAGS += -DLIBZIP $(ZIPFLAGS)
|
2011-10-11 00:53:59 +00:00
|
|
|
endif
|
2013-04-23 06:26:33 +00:00
|
|
|
ifneq ($(strip $(LIBXSLT)),)
|
|
|
|
EXTRA_FLAGS += -DXSLT='"$(XSLTDIR)"' $(XSLCFLAGS)
|
2011-10-27 16:04:29 +00:00
|
|
|
endif
|
2013-05-03 18:04:51 +00:00
|
|
|
ifeq ($(USE_GTK_UI),1)
|
2013-01-17 18:59:43 +00:00
|
|
|
ifneq ($(strip $(LIBOSMGPSMAP)),)
|
2013-04-13 16:27:55 +00:00
|
|
|
SOURCES += gps.c
|
2013-04-23 06:26:33 +00:00
|
|
|
EXTRA_FLAGS += -DHAVE_OSM_GPS_MAP $(OSMGPSMAPFLAGS)
|
2012-01-27 01:43:33 +00:00
|
|
|
endif
|
2013-03-05 05:10:39 +00:00
|
|
|
endif
|
|
|
|
|
2013-03-11 16:44:51 +00:00
|
|
|
ifneq (,$(filter $(UNAME),linux kfreebsd gnu))
|
2013-04-13 16:27:55 +00:00
|
|
|
SOURCES += linux.c
|
2011-11-25 06:32:10 +00:00
|
|
|
else ifeq ($(UNAME), darwin)
|
2013-04-13 16:27:55 +00:00
|
|
|
SOURCES += macos.c
|
2013-05-12 22:10:11 +00:00
|
|
|
MACOSXINSTALL = /Applications/$(CAPITALIZED_NAME).app
|
2011-12-14 19:22:12 +00:00
|
|
|
MACOSXFILES = packaging/macosx
|
2013-05-12 22:10:11 +00:00
|
|
|
MACOSXSTAGING = $(MACOSXFILES)/$(CAPITALIZED_NAME).app
|
2013-02-16 06:28:31 +00:00
|
|
|
INFOPLIST = $(MACOSXFILES)/Info.plist
|
|
|
|
INFOPLISTINPUT = $(INFOPLIST).in
|
2013-05-03 19:53:45 +00:00
|
|
|
LDFLAGS += -headerpad_max_install_names
|
2011-11-24 06:56:57 +00:00
|
|
|
else
|
2013-04-13 16:27:55 +00:00
|
|
|
SOURCES += windows.c
|
2012-10-16 11:04:37 +00:00
|
|
|
WINDOWSSTAGING = ./packaging/windows
|
2012-10-17 04:24:02 +00:00
|
|
|
WINMSGDIRS=$(addprefix share/locale/,$(shell ls po/*.po | sed -e 's/po\/\(..\)_.*/\1\/LC_MESSAGES/'))
|
2013-05-12 22:10:11 +00:00
|
|
|
NSIINPUTFILE = $(WINDOWSSTAGING)/$(NAME).nsi.in
|
|
|
|
NSIFILE = $(WINDOWSSTAGING)/$(NAME).nsi
|
2013-01-24 23:58:35 +00:00
|
|
|
MAKENSIS = makensis
|
2013-02-22 19:20:46 +00:00
|
|
|
XSLTDIR = .\\xslt
|
2011-11-24 06:56:57 +00:00
|
|
|
endif
|
|
|
|
|
2013-05-03 18:04:51 +00:00
|
|
|
LIBS = $(LIBQT) $(LIBXML2) $(LIBXSLT) $(LIBSQLITE3) $(LIBGCONF2) $(LIBDIVECOMPUTER) \
|
2013-05-18 18:40:53 +00:00
|
|
|
$(EXTRALIBS) $(LIBZIP) -lpthread -lm $(LIBOSMGPSMAP) $(LIBSOUP) $(LIBWINSOCK) $(MARBLELIBS)
|
2011-09-20 10:22:45 +00:00
|
|
|
|
2013-03-14 09:24:14 +00:00
|
|
|
MSGLANGS=$(notdir $(wildcard po/*.po))
|
2013-01-31 02:48:59 +00:00
|
|
|
|
2013-04-09 15:34:26 +00:00
|
|
|
# Add files to the following variables if the auto-detection based on the
|
|
|
|
# filename fails
|
|
|
|
OBJS_NEEDING_MOC =
|
|
|
|
OBJS_NEEDING_UIC =
|
|
|
|
HEADERS_NEEDING_MOC =
|
2013-05-08 22:55:44 +00:00
|
|
|
|
2013-04-13 06:42:14 +00:00
|
|
|
include Rules.mk
|