2012-10-22 20:57:57 -07:00
|
|
|
VERSION=2.1
|
2011-09-26 11:04:50 -07:00
|
|
|
|
2011-08-30 14:36:34 -07:00
|
|
|
CC=gcc
|
2012-12-05 09:30:29 -08:00
|
|
|
CFLAGS=-Wall -Wno-pointer-sign -g $(CLCFLAGS)
|
2011-09-22 20:59:10 -07:00
|
|
|
INSTALL=install
|
2011-10-27 09:04:29 -07:00
|
|
|
PKGCONFIG=pkg-config
|
|
|
|
XML2CONFIG=xml2-config
|
2011-11-05 12:39:17 +02:00
|
|
|
XSLCONFIG=xslt-config
|
2011-09-22 20:59:10 -07:00
|
|
|
|
2011-10-11 15:58:38 -07:00
|
|
|
# these locations seem to work for SuSE and Fedora
|
|
|
|
# prefix = $(HOME)
|
2011-10-17 15:53:59 +02:00
|
|
|
prefix = $(DESTDIR)/usr
|
|
|
|
BINDIR = $(prefix)/bin
|
2011-10-12 13:30:08 -07:00
|
|
|
DATADIR = $(prefix)/share
|
|
|
|
DESKTOPDIR = $(DATADIR)/applications
|
|
|
|
ICONPATH = $(DATADIR)/icons/hicolor
|
2011-10-11 15:58:38 -07:00
|
|
|
ICONDIR = $(ICONPATH)/scalable/apps
|
2011-10-12 13:30:08 -07:00
|
|
|
MANDIR = $(DATADIR)/man/man1
|
2011-11-05 12:39:17 +02:00
|
|
|
XSLTDIR = $(DATADIR)/subsurface/xslt
|
2011-10-11 15:58:38 -07:00
|
|
|
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(ICONPATH)
|
|
|
|
|
2011-09-27 18:43:53 +02:00
|
|
|
NAME = subsurface
|
2011-10-11 15:58:38 -07:00
|
|
|
ICONFILE = $(NAME).svg
|
|
|
|
DESKTOPFILE = $(NAME).desktop
|
2011-10-12 13:30:08 -07:00
|
|
|
MANFILES = $(NAME).1
|
2011-11-05 12:39:17 +02:00
|
|
|
XSLTFILES = xslt/*.xslt
|
2011-08-30 14:36:34 -07:00
|
|
|
|
2011-12-14 11:22:12 -08:00
|
|
|
UNAME := $(shell $(CC) -dumpmachine 2>&1 | grep -E -o "linux|darwin|win")
|
2011-10-16 23:16:36 +02:00
|
|
|
|
2011-10-27 09:04:29 -07:00
|
|
|
# find libdivecomputer
|
2011-12-14 11:22:12 -08:00
|
|
|
# First deal with the cross compile environment and with Mac.
|
2011-10-27 09:04:29 -07:00
|
|
|
# For the native case, Linus doesn't want to trust pkg-config given
|
|
|
|
# how young libdivecomputer still is - so we check the typical
|
|
|
|
# subdirectories of /usr/local and /usr and then we give up. You can
|
|
|
|
# override by simply setting it here
|
2011-10-10 17:53:59 -07:00
|
|
|
#
|
2011-10-27 09:04:29 -07:00
|
|
|
ifeq ($(CC), i686-w64-mingw32-gcc)
|
|
|
|
# ok, we are cross building for Windows
|
2012-01-03 20:18:04 +01:00
|
|
|
LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer)
|
|
|
|
LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
|
2011-10-29 09:14:15 -07:00
|
|
|
RESFILE = packaging/windows/subsurface.res
|
2011-10-29 10:27:49 -07:00
|
|
|
LDFLAGS += -Wl,-subsystem,windows
|
2011-12-14 11:22:12 -08:00
|
|
|
else ifeq ($(UNAME), darwin)
|
2012-01-03 20:18:04 +01:00
|
|
|
LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer)
|
|
|
|
LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
|
2011-10-27 09:04:29 -07:00
|
|
|
else
|
2011-10-24 04:12:44 -07:00
|
|
|
libdc-local := $(wildcard /usr/local/lib/libdivecomputer.a)
|
|
|
|
libdc-local64 := $(wildcard /usr/local/lib64/libdivecomputer.a)
|
|
|
|
libdc-usr := $(wildcard /usr/lib/libdivecomputer.a)
|
|
|
|
libdc-usr64 := $(wildcard /usr/lib64/libdivecomputer.a)
|
2011-10-10 17:53:59 -07:00
|
|
|
|
2012-11-19 16:26:16 -08:00
|
|
|
ifneq ($(LIBDCDEVEL),)
|
|
|
|
LIBDIVECOMPUTERDIR = ../libdivecomputer
|
|
|
|
LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
|
|
|
|
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/src/.libs/libdivecomputer.a
|
|
|
|
else ifneq ($(strip $(libdc-local)),)
|
2011-10-10 17:53:59 -07:00
|
|
|
LIBDIVECOMPUTERDIR = /usr/local
|
2012-07-10 12:33:44 -07:00
|
|
|
LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
|
2011-10-14 16:06:13 +12:00
|
|
|
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
|
2011-10-24 04:12:44 -07:00
|
|
|
else ifneq ($(strip $(libdc-local64)),)
|
|
|
|
LIBDIVECOMPUTERDIR = /usr/local
|
2012-07-10 12:33:44 -07:00
|
|
|
LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
|
2011-10-24 04:12:44 -07:00
|
|
|
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a
|
2011-10-10 17:53:59 -07:00
|
|
|
else ifneq ($(strip $(libdc-usr)),)
|
|
|
|
LIBDIVECOMPUTERDIR = /usr
|
2012-07-10 12:33:44 -07:00
|
|
|
LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
|
2011-10-14 16:06:13 +12:00
|
|
|
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
|
2011-10-24 04:12:44 -07:00
|
|
|
else ifneq ($(strip $(libdc-usr64)),)
|
|
|
|
LIBDIVECOMPUTERDIR = /usr
|
2012-07-10 12:33:44 -07:00
|
|
|
LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
|
2011-10-24 04:12:44 -07:00
|
|
|
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a
|
2011-10-10 17:53:59 -07:00
|
|
|
else
|
2011-10-11 21:09:46 -07:00
|
|
|
$(error Cannot find libdivecomputer - please edit Makefile)
|
2011-10-10 17:53:59 -07:00
|
|
|
endif
|
2011-10-27 09:04:29 -07:00
|
|
|
endif
|
2011-09-12 09:19:21 -07:00
|
|
|
|
2011-09-22 12:21:20 -07:00
|
|
|
# Libusb-1.0 is only required if libdivecomputer was built with it.
|
|
|
|
# And libdivecomputer is only built with it if libusb-1.0 is
|
|
|
|
# installed. So get libusb if it exists, but don't complain
|
|
|
|
# about it if it doesn't.
|
2011-10-27 09:04:29 -07:00
|
|
|
LIBUSB = $(shell $(PKGCONFIG) --libs libusb-1.0 2> /dev/null)
|
|
|
|
|
2011-11-24 22:32:10 -08:00
|
|
|
LIBGTK = $(shell $(PKGCONFIG) --libs gtk+-2.0 glib-2.0)
|
2011-10-27 09:04:29 -07:00
|
|
|
LIBDIVECOMPUTERCFLAGS = $(LIBDIVECOMPUTERINCLUDES)
|
2011-09-22 12:21:20 -07:00
|
|
|
LIBDIVECOMPUTER = $(LIBDIVECOMPUTERARCHIVE) $(LIBUSB)
|
|
|
|
|
2011-11-23 22:56:57 -08:00
|
|
|
LIBXML2 = $(shell $(XML2CONFIG) --libs)
|
|
|
|
LIBXSLT = $(shell $(XSLCONFIG) --libs)
|
|
|
|
XML2CFLAGS = $(shell $(XML2CONFIG) --cflags)
|
|
|
|
GLIB2CFLAGS = $(shell $(PKGCONFIG) --cflags glib-2.0)
|
|
|
|
GTK2CFLAGS = $(shell $(PKGCONFIG) --cflags gtk+-2.0)
|
|
|
|
CFLAGS += $(shell $(XSLCONFIG) --cflags)
|
2013-01-13 17:44:44 +01:00
|
|
|
OSMGPSMAPFLAGS += $(shell $(PKGCONFIG) --cflags osmgpsmap)
|
2013-01-17 10:59:43 -08:00
|
|
|
LIBOSMGPSMAP += $(shell $(PKGCONFIG) --libs osmgpsmap 2> /dev/null)
|
|
|
|
ifneq ($(strip $(LIBOSMGPSMAP)),)
|
|
|
|
GPSOBJ = gps.o
|
|
|
|
CFLAGS += -DHAVE_OSM_GPS_MAP
|
|
|
|
endif
|
2013-01-18 03:05:49 +02:00
|
|
|
LIBSOUPCFLAGS = $(shell $(PKGCONFIG) --cflags libsoup-2.4)
|
|
|
|
LIBSOUP = $(shell $(PKGCONFIG) --libs libsoup-2.4)
|
2011-11-23 22:56:57 -08:00
|
|
|
|
2012-01-26 17:43:33 -08:00
|
|
|
LIBZIP = $(shell $(PKGCONFIG) --libs libzip 2> /dev/null)
|
|
|
|
ifneq ($(strip $(LIBZIP)),)
|
|
|
|
ZIP = -DLIBZIP $(shell $(PKGCONFIG) --cflags libzip)
|
|
|
|
endif
|
|
|
|
|
2011-11-24 22:32:10 -08:00
|
|
|
ifeq ($(UNAME), linux)
|
|
|
|
LIBGCONF2 = $(shell $(PKGCONFIG) --libs gconf-2.0)
|
|
|
|
GCONF2CFLAGS = $(shell $(PKGCONFIG) --cflags gconf-2.0)
|
2011-11-23 22:56:57 -08:00
|
|
|
OSSUPPORT = linux
|
|
|
|
OSSUPPORT_CFLAGS = $(GTK2CFLAGS) $(GCONF2CFLAGS)
|
2011-11-24 22:32:10 -08:00
|
|
|
else ifeq ($(UNAME), darwin)
|
2011-11-23 22:56:57 -08:00
|
|
|
OSSUPPORT = macos
|
|
|
|
OSSUPPORT_CFLAGS = $(GTK2CFLAGS)
|
2011-12-14 11:22:12 -08:00
|
|
|
MACOSXINSTALL = /Applications/Subsurface.app
|
|
|
|
MACOSXFILES = packaging/macosx
|
2012-10-16 21:24:02 -07:00
|
|
|
MACOSXSTAGING = $(MACOSXFILES)/Subsurface.app
|
2012-01-03 20:18:04 +01:00
|
|
|
EXTRALIBS = $(shell $(PKGCONFIG) --libs gtk-mac-integration) -framework CoreFoundation
|
|
|
|
CFLAGS += $(shell $(PKGCONFIG) --cflags gtk-mac-integration)
|
2012-10-07 16:39:17 +02:00
|
|
|
LDFLAGS += -headerpad_max_install_names
|
2012-10-16 21:24:02 -07:00
|
|
|
GTK_MAC_BUNDLER = ~/.local/bin/gtk-mac-bundler
|
2011-11-23 22:56:57 -08:00
|
|
|
else
|
|
|
|
OSSUPPORT = windows
|
|
|
|
OSSUPPORT_CFLAGS = $(GTK2CFLAGS)
|
2012-10-16 04:04:37 -07:00
|
|
|
WINDOWSSTAGING = ./packaging/windows
|
2012-10-16 21:24:02 -07:00
|
|
|
WINMSGDIRS=$(addprefix share/locale/,$(shell ls po/*.po | sed -e 's/po\/\(..\)_.*/\1\/LC_MESSAGES/'))
|
2011-11-23 22:56:57 -08:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(strip $(LIBXSLT)),)
|
|
|
|
# We still need proper paths and install options for OSX and Windows
|
|
|
|
ifeq ($(shell sh -c 'uname -s 2>/dev/null || echo not'),Linux)
|
|
|
|
XSLT=-DXSLT='"$(XSLTDIR)"'
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-01-18 03:05:49 +02:00
|
|
|
LIBS = $(LIBXML2) $(LIBXSLT) $(LIBGTK) $(LIBGCONF2) $(LIBDIVECOMPUTER) $(EXTRALIBS) $(LIBZIP) -lpthread -lm -lssl -lcrypto $(LIBOSMGPSMAP) $(LIBSOUP)
|
2011-09-20 12:22:45 +02:00
|
|
|
|
2012-10-12 10:05:41 +02:00
|
|
|
MSGLANGS=$(notdir $(wildcard po/*po))
|
2012-10-16 21:24:02 -07:00
|
|
|
MSGOBJS=$(addprefix share/locale/,$(MSGLANGS:.po=.UTF-8/LC_MESSAGES/subsurface.mo))
|
2012-10-12 10:05:41 +02:00
|
|
|
|
2013-01-04 23:11:42 -08:00
|
|
|
OBJS = main.o dive.o time.o profile.o info.o equipment.o divelist.o deco.o planner.o \
|
2012-09-25 07:28:47 -07:00
|
|
|
parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o uemis-downloader.o \
|
2013-01-11 10:14:10 -08:00
|
|
|
gtk-gui.o statistics.o file.o cochran.o device.o download-dialog.o prefs.o \
|
2013-01-18 03:05:49 +02:00
|
|
|
webservice.o $(GPSOBJ) $(OSSUPPORT).o $(RESFILE)
|
2011-08-31 10:20:46 -07:00
|
|
|
|
2012-10-12 10:05:41 +02:00
|
|
|
$(NAME): $(OBJS) $(MSGOBJS)
|
2011-09-27 18:43:53 +02:00
|
|
|
$(CC) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS)
|
2011-08-30 18:40:25 -07:00
|
|
|
|
2011-09-27 18:43:53 +02:00
|
|
|
install: $(NAME)
|
2011-10-17 15:53:59 +02:00
|
|
|
$(INSTALL) -d -m 755 $(BINDIR)
|
|
|
|
$(INSTALL) $(NAME) $(BINDIR)
|
2011-10-11 15:58:38 -07:00
|
|
|
$(INSTALL) -d -m 755 $(DESKTOPDIR)
|
|
|
|
$(INSTALL) $(DESKTOPFILE) $(DESKTOPDIR)
|
|
|
|
$(INSTALL) -d -m 755 $(ICONDIR)
|
|
|
|
$(INSTALL) $(ICONFILE) $(ICONDIR)
|
2011-10-31 13:05:55 -07:00
|
|
|
@-if test -z "$(DESTDIR)"; then \
|
|
|
|
$(gtk_update_icon_cache); \
|
|
|
|
fi
|
2011-10-24 04:12:44 -07:00
|
|
|
$(INSTALL) -d -m 755 $(MANDIR)
|
|
|
|
$(INSTALL) -m 644 $(MANFILES) $(MANDIR)
|
2011-11-05 12:39:17 +02:00
|
|
|
@-if test ! -z "$(XSLT)"; then \
|
|
|
|
$(INSTALL) -d -m 755 $(DATADIR)/subsurface; \
|
|
|
|
$(INSTALL) -d -m 755 $(XSLTDIR); \
|
|
|
|
$(INSTALL) -m 644 $(XSLTFILES) $(XSLTDIR); \
|
|
|
|
fi
|
2012-10-17 08:46:59 +02:00
|
|
|
for LOC in $(wildcard share/locale/*/LC_MESSAGES); do \
|
|
|
|
$(INSTALL) -d -m 755 $(prefix)/$$LOC; \
|
|
|
|
$(INSTALL) $$LOC/subsurface.mo $(prefix)/$$LOC/subsurface.mo; \
|
|
|
|
done
|
|
|
|
|
2011-09-22 20:59:10 -07:00
|
|
|
|
2011-10-16 23:16:36 +02:00
|
|
|
install-macosx: $(NAME)
|
|
|
|
$(INSTALL) -d -m 755 $(MACOSXINSTALL)/Contents/Resources
|
|
|
|
$(INSTALL) -d -m 755 $(MACOSXINSTALL)/Contents/MacOS
|
2012-10-20 21:06:35 -07:00
|
|
|
$(INSTALL) $(NAME) $(MACOSXINSTALL)/Contents/MacOS/$(NAME)-bin
|
|
|
|
$(INSTALL) $(MACOSXFILES)/$(NAME).sh $(MACOSXINSTALL)/Contents/MacOS/$(NAME)
|
2011-10-30 22:27:33 +01:00
|
|
|
$(INSTALL) $(MACOSXFILES)/PkgInfo $(MACOSXINSTALL)/Contents/
|
|
|
|
$(INSTALL) $(MACOSXFILES)/Info.plist $(MACOSXINSTALL)/Contents/
|
|
|
|
$(INSTALL) $(ICONFILE) $(MACOSXINSTALL)/Contents/Resources/
|
|
|
|
$(INSTALL) $(MACOSXFILES)/Subsurface.icns $(MACOSXINSTALL)/Contents/Resources/
|
2012-10-16 21:24:02 -07:00
|
|
|
for LOC in $(wildcard share/locale/*/LC_MESSAGES); do \
|
|
|
|
$(INSTALL) -d -m 755 $(MACOSXINSTALL)/Contents/Resources/$$LOC; \
|
|
|
|
$(INSTALL) $$LOC/subsurface.mo $(MACOSXINSTALL)/Contents/Resources/$$LOC/subsurface.mo; \
|
2012-10-15 14:44:01 +02:00
|
|
|
done
|
2011-10-16 23:16:36 +02:00
|
|
|
|
2012-10-16 21:24:02 -07:00
|
|
|
create-macosx-bundle: $(NAME)
|
|
|
|
$(INSTALL) -d -m 755 $(MACOSXSTAGING)/Contents/Resources
|
|
|
|
$(INSTALL) -d -m 755 $(MACOSXSTAGING)/Contents/MacOS
|
|
|
|
$(INSTALL) $(NAME) $(MACOSXSTAGING)/Contents/MacOS/
|
|
|
|
$(INSTALL) $(MACOSXFILES)/PkgInfo $(MACOSXSTAGING)/Contents/
|
|
|
|
$(INSTALL) $(MACOSXFILES)/Info.plist $(MACOSXSTAGING)/Contents/
|
|
|
|
$(INSTALL) $(ICONFILE) $(MACOSXSTAGING)/Contents/Resources/
|
|
|
|
$(INSTALL) $(MACOSXFILES)/Subsurface.icns $(MACOSXSTAGING)/Contents/Resources/
|
|
|
|
for LOC in $(wildcard share/locale/*/LC_MESSAGES); do \
|
|
|
|
$(INSTALL) -d -m 755 $(MACOSXSTAGING)/Contents/Resources/$$LOC; \
|
|
|
|
$(INSTALL) $$LOC/subsurface.mo $(MACOSXSTAGING)/Contents/Resources/$$LOC/subsurface.mo; \
|
|
|
|
done
|
2012-10-16 23:55:35 -07:00
|
|
|
$(GTK_MAC_BUNDLER) packaging/macosx/subsurface.bundle
|
2012-10-16 21:24:02 -07:00
|
|
|
|
2012-10-16 04:04:37 -07:00
|
|
|
install-cross-windows: $(NAME)
|
|
|
|
$(INSTALL) -d -m 755 $(WINDOWSSTAGING)/share/locale
|
|
|
|
for MSG in $(WINMSGDIRS); do\
|
2012-10-16 21:24:02 -07:00
|
|
|
$(INSTALL) -d -m 755 $(WINDOWSSTAGING)/$$MSG;\
|
2012-10-16 23:55:35 -07:00
|
|
|
$(INSTALL) $(CROSS_PATH)/$$MSG/* $(WINDOWSSTAGING)/$$MSG;\
|
2012-10-16 04:04:37 -07:00
|
|
|
done
|
2012-10-17 08:46:59 +02:00
|
|
|
for LOC in $(wildcard share/locale/*/LC_MESSAGES); do \
|
|
|
|
$(INSTALL) -d -m 755 $(WINDOWSSTAGING)/$$LOC; \
|
|
|
|
$(INSTALL) $$LOC/subsurface.mo $(WINDOWSSTAGING)/$$LOC/subsurface.mo; \
|
2012-10-16 04:04:37 -07:00
|
|
|
done
|
|
|
|
|
2012-10-18 14:53:27 -07:00
|
|
|
update-po-files:
|
2012-10-19 09:50:14 +02:00
|
|
|
xgettext -o po/subsurface-new.pot -s -k_ -kN_ --keyword=C_:1c,2 --add-comments="++GETTEXT" *.c
|
2012-10-18 14:53:27 -07:00
|
|
|
for i in po/*.po; do \
|
2012-10-19 09:50:14 +02:00
|
|
|
msgmerge -s -U $$i po/subsurface-new.pot ; \
|
2012-10-18 14:53:27 -07:00
|
|
|
done
|
|
|
|
|
2012-01-27 12:43:40 -08:00
|
|
|
file.o: file.c dive.h file.h
|
2012-01-26 17:43:33 -08:00
|
|
|
$(CC) $(CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) $(XSLT) $(ZIP) -c file.c
|
2012-01-26 13:00:45 -08:00
|
|
|
|
2012-01-27 12:43:40 -08:00
|
|
|
cochran.o: cochran.c dive.h file.h
|
|
|
|
$(CC) $(CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) $(XSLT) $(ZIP) -c cochran.c
|
|
|
|
|
2011-09-01 10:09:53 -07:00
|
|
|
parse-xml.o: parse-xml.c dive.h
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) $(XSLT) -c parse-xml.c
|
2011-08-30 18:40:25 -07:00
|
|
|
|
2013-01-09 12:07:09 -08:00
|
|
|
save-xml.o: save-xml.c dive.h device.h
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) -c save-xml.c
|
2011-09-01 16:27:52 -07:00
|
|
|
|
2011-09-03 13:19:26 -07:00
|
|
|
dive.o: dive.c dive.h
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) -c dive.c
|
2011-09-03 13:19:26 -07:00
|
|
|
|
2012-09-19 17:35:52 -07:00
|
|
|
time.o: time.c dive.h
|
|
|
|
$(CC) $(CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) -c time.c
|
|
|
|
|
2011-09-05 21:12:58 +02:00
|
|
|
main.o: main.c dive.h display.h divelist.h
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GLIB2CFLAGS) $(GCONF2CFLAGS) $(XML2CFLAGS) -c main.c
|
2011-08-31 10:20:46 -07:00
|
|
|
|
2011-09-05 21:12:58 +02:00
|
|
|
profile.o: profile.c dive.h display.h divelist.h
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) -c profile.c
|
2011-08-31 10:27:58 -07:00
|
|
|
|
2011-09-20 12:40:34 -07:00
|
|
|
info.o: info.c dive.h display.h display-gtk.h divelist.h
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) -c info.c
|
2011-08-31 12:09:19 -07:00
|
|
|
|
2011-09-09 17:10:17 -07:00
|
|
|
equipment.o: equipment.c dive.h display.h divelist.h
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) -c equipment.c
|
2011-09-09 08:38:48 -07:00
|
|
|
|
2011-11-02 09:10:57 -07:00
|
|
|
statistics.o: statistics.c dive.h display.h divelist.h
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) -c statistics.c
|
2011-11-02 09:10:57 -07:00
|
|
|
|
2013-01-13 17:44:44 +01:00
|
|
|
gps.o: gps.c dive.h display.h divelist.h
|
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) $(OSMGPSMAPFLAGS) -c gps.c
|
|
|
|
|
2013-01-22 21:21:39 -08:00
|
|
|
# this should work but it doesn't preserve the transparancy - so I manually converted with gimp
|
|
|
|
# satellite.png: satellite.svg
|
|
|
|
# convert -resize 11x16 -depth 8 satellite.svg satellite.png
|
|
|
|
|
|
|
|
# satellite.h: satellite.png
|
2013-01-22 19:52:07 -08:00
|
|
|
# gdk-pixbuf-csource --struct satellite.png > satellite.h
|
|
|
|
|
|
|
|
divelist.o: divelist.c dive.h display.h divelist.h satellite.h
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) -c divelist.c
|
2011-09-12 09:19:21 -07:00
|
|
|
|
2011-09-20 12:40:34 -07:00
|
|
|
print.o: print.c dive.h display.h display-gtk.h
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) -c print.c
|
2011-09-13 16:02:42 -07:00
|
|
|
|
2013-01-02 21:21:36 -08:00
|
|
|
deco.o: deco.c dive.h
|
|
|
|
$(CC) $(CFLAGS) $(GLIB2CFLAGS) -c deco.c
|
|
|
|
|
2013-01-07 11:23:14 -08:00
|
|
|
planner.o: planner.c dive.h divelist.h display-gtk.h
|
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) -c planner.c
|
2013-01-04 23:11:42 -08:00
|
|
|
|
2013-01-11 13:24:15 +02:00
|
|
|
download-dialog.o: download-dialog.c dive.h divelist.h display-gtk.h callbacks-gtk.h
|
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) -c download-dialog.c
|
|
|
|
|
2013-01-09 12:07:09 -08:00
|
|
|
libdivecomputer.o: libdivecomputer.c dive.h display.h display-gtk.h libdivecomputer.h device.h
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) \
|
2011-10-17 15:54:01 +02:00
|
|
|
$(LIBDIVECOMPUTERCFLAGS) \
|
2011-09-12 09:19:21 -07:00
|
|
|
-c libdivecomputer.c
|
2011-09-14 21:00:49 -07:00
|
|
|
|
2013-01-11 13:24:15 +02:00
|
|
|
gtk-gui.o: gtk-gui.c dive.h display.h divelist.h display-gtk.h libdivecomputer.h device.h callbacks-gtk.h Makefile
|
2011-11-19 11:28:31 -06:00
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(GCONF2CFLAGS) $(XML2CFLAGS) \
|
2011-10-17 15:54:01 +02:00
|
|
|
$(LIBDIVECOMPUTERCFLAGS) \
|
2011-09-26 11:04:50 -07:00
|
|
|
-DVERSION_STRING='"v$(VERSION)"' \
|
2011-09-20 12:40:34 -07:00
|
|
|
-c gtk-gui.c
|
|
|
|
|
2011-11-19 11:28:31 -06:00
|
|
|
uemis.o: uemis.c dive.h uemis.h
|
2012-11-10 09:28:02 +01:00
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) $(LIBDIVECOMPUTERCFLAGS) -c uemis.c
|
2011-09-27 18:43:53 +02:00
|
|
|
|
2012-09-25 07:28:47 -07:00
|
|
|
uemis-downloader.o: uemis-downloader.c dive.h uemis.h
|
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) -c uemis-downloader.c
|
|
|
|
|
2013-01-09 12:07:09 -08:00
|
|
|
device.o: device.c device.h dive.h
|
|
|
|
$(CC) $(CFLAGS) $(GLIB2CFLAGS) -c device.c
|
|
|
|
|
2013-01-11 10:14:10 -08:00
|
|
|
prefs.o: prefs.c dive.h pref.h
|
|
|
|
$(CC) $(CFLAGS) $(GLIB2CFLAGS) -c prefs.c
|
|
|
|
|
2013-01-18 03:05:49 +02:00
|
|
|
webservice.o: webservice.c webservice.h dive.h display-gtk.h
|
2013-01-19 16:04:07 -08:00
|
|
|
$(CC) $(CFLAGS) $(GTK2CFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) $(LIBSOUPCFLAGS) -c webservice.c
|
2013-01-18 03:05:49 +02:00
|
|
|
|
2011-11-23 22:56:57 -08:00
|
|
|
$(OSSUPPORT).o: $(OSSUPPORT).c display-gtk.h
|
|
|
|
$(CC) $(CFLAGS) $(OSSUPPORT_CFLAGS) -c $(OSSUPPORT).c
|
|
|
|
|
2012-10-19 12:53:08 -07:00
|
|
|
share/locale/%.UTF-8/LC_MESSAGES/subsurface.mo: po/%.po po/%.aliases
|
2012-10-12 10:05:41 +02:00
|
|
|
mkdir -p $(dir $@)
|
|
|
|
msgfmt -c -o $@ po/$*.po
|
2012-10-16 21:21:11 +02:00
|
|
|
@-if test -s po/$*.aliases; then \
|
2012-10-16 15:09:34 +02:00
|
|
|
for ALIAS in `cat po/$*.aliases`; do \
|
2012-10-16 21:24:02 -07:00
|
|
|
mkdir -p share/locale/$$ALIAS/LC_MESSAGES; \
|
|
|
|
cp $@ share/locale/$$ALIAS/LC_MESSAGES; \
|
2012-10-16 15:09:34 +02:00
|
|
|
done; \
|
|
|
|
fi
|
2012-10-11 12:06:56 +02:00
|
|
|
|
First try at converting user-manual to AsciiDoc
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-01 15:12:28 -08:00
|
|
|
doc:
|
|
|
|
$(MAKE) -C Documentation doc
|
|
|
|
|
2011-09-27 18:43:53 +02:00
|
|
|
clean:
|
2012-10-19 09:50:14 +02:00
|
|
|
rm -f $(OBJS) *~ $(NAME) $(NAME).exe po/*~ po/subsurface-new.pot
|
2012-10-16 21:24:02 -07:00
|
|
|
rm -rf share
|