2013-04-13 06:42:14 +00:00
|
|
|
include Configure.mk
|
2013-03-04 07:47:58 +00:00
|
|
|
VERSION=3.0.2
|
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-04-14 07:30:25 +00:00
|
|
|
CXXFLAGS=-Wall -g $(CLCXXFLAGS) -DQT_NO_KEYWORDS
|
2011-09-23 03:59:10 +00:00
|
|
|
INSTALL=install
|
2013-04-23 06:26:33 +00:00
|
|
|
|
|
|
|
# these locations seem to work for SuSE and Fedora
|
|
|
|
# prefix = $(HOME)
|
|
|
|
prefix = $(DESTDIR)/usr
|
|
|
|
BINDIR = $(prefix)/bin
|
|
|
|
DATADIR = $(prefix)/share
|
|
|
|
DESKTOPDIR = $(DATADIR)/applications
|
|
|
|
ICONPATH = $(DATADIR)/icons/hicolor
|
|
|
|
ICONDIR = $(ICONPATH)/scalable/apps
|
|
|
|
MANDIR = $(DATADIR)/man/man1
|
|
|
|
XSLTDIR = $(DATADIR)/subsurface/xslt
|
|
|
|
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(ICONPATH)
|
|
|
|
|
|
|
|
NAME = subsurface
|
|
|
|
ICONFILE = $(NAME)-icon.svg
|
|
|
|
DESKTOPFILE = $(NAME).desktop
|
|
|
|
MANFILES = $(NAME).1
|
|
|
|
XSLTFILES = xslt/*.xslt
|
|
|
|
|
|
|
|
EXTRA_FLAGS = $(QTCXXFLAGS) $(GTKCFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) \
|
|
|
|
$(LIBDIVECOMPUTERCFLAGS) \
|
|
|
|
$(LIBSOUPCFLAGS) $(GCONF2CFLAGS)
|
|
|
|
|
2013-04-13 16:19:03 +00:00
|
|
|
HEADERS = \
|
|
|
|
qt-ui/addcylinderdialog.h \
|
2013-05-01 22:37:41 +00:00
|
|
|
qt-ui/addweightsystemdialog.h \
|
2013-04-13 16:19:03 +00:00
|
|
|
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-04-13 16:19:03 +00:00
|
|
|
|
|
|
|
|
2013-04-13 16:27:55 +00:00
|
|
|
SOURCES = \
|
|
|
|
deco.c \
|
|
|
|
device.c \
|
|
|
|
dive.c \
|
|
|
|
divelist.c \
|
|
|
|
download-dialog.c \
|
|
|
|
equipment.c \
|
|
|
|
file.c \
|
|
|
|
info.c \
|
|
|
|
main.c \
|
|
|
|
parse-xml.c \
|
|
|
|
prefs.c \
|
|
|
|
profile.c \
|
|
|
|
save-xml.c \
|
|
|
|
sha1.c \
|
|
|
|
time.c \
|
|
|
|
qt-gui.cpp \
|
|
|
|
qt-ui/addcylinderdialog.cpp \
|
2013-05-01 22:37:41 +00:00
|
|
|
qt-ui/addweightsystemdialog.cpp \
|
2013-04-13 16:27:55 +00:00
|
|
|
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-04-13 16:27:55 +00:00
|
|
|
$(RESFILE)
|
2013-04-23 06:13:10 +00:00
|
|
|
|
2013-04-14 06:24:47 +00:00
|
|
|
|
|
|
|
RESOURCES = subsurface.qrc
|
|
|
|
|
2013-04-23 06:26:33 +00:00
|
|
|
ifneq ($(SQLITE3FLAGS),)
|
|
|
|
EXTRA_FLAGS += -DSQLITE3 $(SQLITE3FLAGS)
|
|
|
|
endif
|
|
|
|
ifneq ($(ZIPFLAGS),)
|
|
|
|
EXTRA_FLAGS += -DLIBZIP $(ZIPFLAGS)
|
|
|
|
endif
|
|
|
|
ifneq ($(strip $(LIBXSLT)),)
|
|
|
|
EXTRA_FLAGS += -DXSLT='"$(XSLTDIR)"' $(XSLCFLAGS)
|
|
|
|
endif
|
2013-05-03 18:04:51 +00:00
|
|
|
ifeq ($(USE_GTK_UI),1)
|
2013-04-23 06:26:33 +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)
|
|
|
|
endif
|
2013-05-03 18:04:51 +00:00
|
|
|
endif
|
2013-04-23 06:26:33 +00:00
|
|
|
|
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
|
2011-12-14 19:22:12 +00:00
|
|
|
MACOSXINSTALL = /Applications/Subsurface.app
|
|
|
|
MACOSXFILES = packaging/macosx
|
2012-10-17 04:24:02 +00:00
|
|
|
MACOSXSTAGING = $(MACOSXFILES)/Subsurface.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-01-24 23:58:35 +00:00
|
|
|
NSIINPUTFILE = $(WINDOWSSTAGING)/subsurface.nsi.in
|
|
|
|
NSIFILE = $(WINDOWSSTAGING)/subsurface.nsi
|
|
|
|
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-04-13 13:17:59 +00:00
|
|
|
$(EXTRALIBS) $(LIBZIP) -lpthread -lm $(LIBOSMGPSMAP) $(LIBSOUP) $(LIBWINSOCK)
|
2011-09-20 10:22:45 +00:00
|
|
|
|
2013-03-14 09:24:14 +00:00
|
|
|
MSGLANGS=$(notdir $(wildcard po/*.po))
|
2013-04-07 22:20:43 +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-04-13 06:42:14 +00:00
|
|
|
include Rules.mk
|