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 01:11:57 +00:00
|
|
|
CXXFLAGS=-Wall -g $(CLCFLAGS) -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-23 06:13:10 +00:00
|
|
|
QTOBJS = qt-ui/maintab.o qt-ui/mainwindow.o qt-ui/plotareascene.o qt-ui/divelistview.o \
|
|
|
|
qt-ui/addcylinderdialog.o qt-ui/models.o qt-ui/starwidget.o
|
|
|
|
|
|
|
|
GTKOBJS = info-gtk.o divelist-gtk.o planner-gtk.o statistics-gtk.o
|
|
|
|
|
|
|
|
OBJS = main.o dive.o time.o profile.o info.o equipment.o divelist.o divelist-gtk.o deco.o \
|
|
|
|
planner.o planner-gtk.o \
|
|
|
|
parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o uemis-downloader.o \
|
|
|
|
qt-gui.o statistics.o file.o cochran.o device.o download-dialog.o prefs.o \
|
|
|
|
webservice.o sha1.o $(RESFILE) $(QTOBJS) $(GTKOBJS)
|
|
|
|
|
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
|
|
|
|
ifneq ($(strip $(LIBOSMGPSMAP)),)
|
|
|
|
OBJS += gps.o
|
|
|
|
EXTRA_FLAGS += -DHAVE_OSM_GPS_MAP $(OSMGPSMAPFLAGS)
|
|
|
|
endif
|
|
|
|
|
2013-03-11 16:44:51 +00:00
|
|
|
ifneq (,$(filter $(UNAME),linux kfreebsd gnu))
|
2013-04-23 06:13:10 +00:00
|
|
|
OBJS += linux.o
|
2011-11-25 06:32:10 +00:00
|
|
|
else ifeq ($(UNAME), darwin)
|
2013-04-23 06:13:10 +00:00
|
|
|
OBJS += macos.o
|
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
|
|
|
|
LDFLAGS += -headerpad_max_install_names -sectcreate __TEXT __info_plist $(INFOPLIST)
|
2011-11-24 06:56:57 +00:00
|
|
|
else
|
2013-04-23 06:13:10 +00:00
|
|
|
OBSJ += windows.o
|
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-04-13 13:17:59 +00:00
|
|
|
LIBS = $(LIBQT) $(LIBXML2) $(LIBXSLT) $(LIBSQLITE3) $(LIBGTK) $(LIBGCONF2) $(LIBDIVECOMPUTER) \
|
|
|
|
$(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
|