2012-10-23 03:57:57 +00:00
|
|
|
VERSION=2.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
|
2011-09-23 03:59:10 +00:00
|
|
|
INSTALL=install
|
2011-10-27 16:04:29 +00:00
|
|
|
PKGCONFIG=pkg-config
|
|
|
|
XML2CONFIG=xml2-config
|
2011-11-05 10:39:17 +00:00
|
|
|
XSLCONFIG=xslt-config
|
2011-09-23 03:59:10 +00:00
|
|
|
|
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
|
|
|
|
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
|
2011-11-05 10:39:17 +00:00
|
|
|
XSLTDIR = $(DATADIR)/subsurface/xslt
|
2011-10-11 22:58:38 +00:00
|
|
|
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(ICONPATH)
|
|
|
|
|
2011-09-27 16:43:53 +00:00
|
|
|
NAME = subsurface
|
2011-10-11 22:58:38 +00:00
|
|
|
ICONFILE = $(NAME).svg
|
|
|
|
DESKTOPFILE = $(NAME).desktop
|
2011-10-12 20:30:08 +00:00
|
|
|
MANFILES = $(NAME).1
|
2011-11-05 10:39:17 +00:00
|
|
|
XSLTFILES = xslt/*.xslt
|
2011-08-30 21:36:34 +00:00
|
|
|
|
2011-12-14 19:22:12 +00:00
|
|
|
UNAME := $(shell $(CC) -dumpmachine 2>&1 | grep -E -o "linux|darwin|win")
|
2013-01-24 22:02:33 +00:00
|
|
|
VERSION_STRING := $(shell git describe --tags --abbrev=12 || echo "v$(VERSION)")
|
2013-01-24 23:58:35 +00:00
|
|
|
PRODVERSION_STRING := $(shell git describe --tags --abbrev=12 | sed 's/v\([0-9]*\)\.\([0-9]*\)-\([0-9]*\)-.*/\1.\2.\3.0/' || echo "$(VERSION).0.0")
|
2011-10-16 21:16:36 +00:00
|
|
|
|
2011-10-27 16:04:29 +00:00
|
|
|
# find libdivecomputer
|
2011-12-14 19:22:12 +00:00
|
|
|
# First deal with the cross compile environment and with Mac.
|
2011-10-27 16:04:29 +00: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-11 00:53:59 +00:00
|
|
|
#
|
2011-10-27 16:04:29 +00:00
|
|
|
ifeq ($(CC), i686-w64-mingw32-gcc)
|
|
|
|
# ok, we are cross building for Windows
|
2012-01-03 19:18:04 +00:00
|
|
|
LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer)
|
|
|
|
LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
|
2011-10-29 16:14:15 +00:00
|
|
|
RESFILE = packaging/windows/subsurface.res
|
2011-10-29 17:27:49 +00:00
|
|
|
LDFLAGS += -Wl,-subsystem,windows
|
2011-12-14 19:22:12 +00:00
|
|
|
else ifeq ($(UNAME), darwin)
|
2012-01-03 19:18:04 +00:00
|
|
|
LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer)
|
|
|
|
LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
|
2011-10-27 16:04:29 +00:00
|
|
|
else
|
2011-10-24 11:12:44 +00: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-11 00:53:59 +00:00
|
|
|
|
2012-11-20 00:26:16 +00:00
|
|
|
ifneq ($(LIBDCDEVEL),)
|
|
|
|
LIBDIVECOMPUTERDIR = ../libdivecomputer
|
|
|
|
LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
|
|
|
|
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/src/.libs/libdivecomputer.a
|
|
|
|
else ifneq ($(strip $(libdc-local)),)
|
2011-10-11 00:53:59 +00:00
|
|
|
LIBDIVECOMPUTERDIR = /usr/local
|
2012-07-10 19:33:44 +00:00
|
|
|
LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
|
2011-10-14 04:06:13 +00:00
|
|
|
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
|
2011-10-24 11:12:44 +00:00
|
|
|
else ifneq ($(strip $(libdc-local64)),)
|
|
|
|
LIBDIVECOMPUTERDIR = /usr/local
|
2012-07-10 19:33:44 +00:00
|
|
|
LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
|
2011-10-24 11:12:44 +00:00
|
|
|
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a
|
2011-10-11 00:53:59 +00:00
|
|
|
else ifneq ($(strip $(libdc-usr)),)
|
|
|
|
LIBDIVECOMPUTERDIR = /usr
|
2012-07-10 19:33:44 +00:00
|
|
|
LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
|
2011-10-14 04:06:13 +00:00
|
|
|
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
|
2011-10-24 11:12:44 +00:00
|
|
|
else ifneq ($(strip $(libdc-usr64)),)
|
|
|
|
LIBDIVECOMPUTERDIR = /usr
|
2012-07-10 19:33:44 +00:00
|
|
|
LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include
|
2011-10-24 11:12:44 +00:00
|
|
|
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a
|
2011-10-11 00:53:59 +00:00
|
|
|
else
|
2011-10-12 04:09:46 +00:00
|
|
|
$(error Cannot find libdivecomputer - please edit Makefile)
|
2011-10-11 00:53:59 +00:00
|
|
|
endif
|
2011-10-27 16:04:29 +00:00
|
|
|
endif
|
2011-09-12 16:19:21 +00:00
|
|
|
|
2011-09-22 19:21:20 +00: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 16:04:29 +00:00
|
|
|
LIBUSB = $(shell $(PKGCONFIG) --libs libusb-1.0 2> /dev/null)
|
|
|
|
|
2011-11-25 06:32:10 +00:00
|
|
|
LIBGTK = $(shell $(PKGCONFIG) --libs gtk+-2.0 glib-2.0)
|
2011-10-27 16:04:29 +00:00
|
|
|
LIBDIVECOMPUTERCFLAGS = $(LIBDIVECOMPUTERINCLUDES)
|
2011-09-22 19:21:20 +00:00
|
|
|
LIBDIVECOMPUTER = $(LIBDIVECOMPUTERARCHIVE) $(LIBUSB)
|
|
|
|
|
2011-11-24 06:56:57 +00:00
|
|
|
LIBXML2 = $(shell $(XML2CONFIG) --libs)
|
|
|
|
LIBXSLT = $(shell $(XSLCONFIG) --libs)
|
|
|
|
XML2CFLAGS = $(shell $(XML2CONFIG) --cflags)
|
|
|
|
GLIB2CFLAGS = $(shell $(PKGCONFIG) --cflags glib-2.0)
|
2013-01-27 21:52:42 +00:00
|
|
|
GTKCFLAGS = $(shell $(PKGCONFIG) --cflags gtk+-2.0)
|
2011-11-24 06:56:57 +00:00
|
|
|
CFLAGS += $(shell $(XSLCONFIG) --cflags)
|
2013-01-13 16:44:44 +00:00
|
|
|
OSMGPSMAPFLAGS += $(shell $(PKGCONFIG) --cflags osmgpsmap)
|
2013-01-17 18:59:43 +00:00
|
|
|
LIBOSMGPSMAP += $(shell $(PKGCONFIG) --libs osmgpsmap 2> /dev/null)
|
|
|
|
ifneq ($(strip $(LIBOSMGPSMAP)),)
|
|
|
|
GPSOBJ = gps.o
|
|
|
|
CFLAGS += -DHAVE_OSM_GPS_MAP
|
|
|
|
endif
|
2013-01-18 01:05:49 +00:00
|
|
|
LIBSOUPCFLAGS = $(shell $(PKGCONFIG) --cflags libsoup-2.4)
|
|
|
|
LIBSOUP = $(shell $(PKGCONFIG) --libs libsoup-2.4)
|
2011-11-24 06:56:57 +00:00
|
|
|
|
2012-01-27 01:43:33 +00:00
|
|
|
LIBZIP = $(shell $(PKGCONFIG) --libs libzip 2> /dev/null)
|
|
|
|
ifneq ($(strip $(LIBZIP)),)
|
|
|
|
ZIP = -DLIBZIP $(shell $(PKGCONFIG) --cflags libzip)
|
|
|
|
endif
|
|
|
|
|
2011-11-25 06:32:10 +00:00
|
|
|
ifeq ($(UNAME), linux)
|
|
|
|
LIBGCONF2 = $(shell $(PKGCONFIG) --libs gconf-2.0)
|
|
|
|
GCONF2CFLAGS = $(shell $(PKGCONFIG) --cflags gconf-2.0)
|
2011-11-24 06:56:57 +00:00
|
|
|
OSSUPPORT = linux
|
2013-01-27 21:52:42 +00:00
|
|
|
OSSUPPORT_CFLAGS = $(GTKCFLAGS) $(GCONF2CFLAGS)
|
2011-11-25 06:32:10 +00:00
|
|
|
else ifeq ($(UNAME), darwin)
|
2011-11-24 06:56:57 +00:00
|
|
|
OSSUPPORT = macos
|
2013-01-27 21:52:42 +00:00
|
|
|
OSSUPPORT_CFLAGS = $(GTKCFLAGS)
|
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
|
2012-01-03 19:18:04 +00:00
|
|
|
EXTRALIBS = $(shell $(PKGCONFIG) --libs gtk-mac-integration) -framework CoreFoundation
|
|
|
|
CFLAGS += $(shell $(PKGCONFIG) --cflags gtk-mac-integration)
|
2012-10-07 14:39:17 +00:00
|
|
|
LDFLAGS += -headerpad_max_install_names
|
2012-10-17 04:24:02 +00:00
|
|
|
GTK_MAC_BUNDLER = ~/.local/bin/gtk-mac-bundler
|
2011-11-24 06:56:57 +00:00
|
|
|
else
|
|
|
|
OSSUPPORT = windows
|
2013-01-27 21:52:42 +00:00
|
|
|
OSSUPPORT_CFLAGS = $(GTKCFLAGS)
|
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
|
|
|
|
|
2011-11-24 06:56:57 +00: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 01:05:49 +00:00
|
|
|
LIBS = $(LIBXML2) $(LIBXSLT) $(LIBGTK) $(LIBGCONF2) $(LIBDIVECOMPUTER) $(EXTRALIBS) $(LIBZIP) -lpthread -lm -lssl -lcrypto $(LIBOSMGPSMAP) $(LIBSOUP)
|
2011-09-20 10:22:45 +00:00
|
|
|
|
2012-10-12 08:05:41 +00:00
|
|
|
MSGLANGS=$(notdir $(wildcard po/*po))
|
2012-10-17 04:24:02 +00:00
|
|
|
MSGOBJS=$(addprefix share/locale/,$(MSGLANGS:.po=.UTF-8/LC_MESSAGES/subsurface.mo))
|
2012-10-12 08:05:41 +00:00
|
|
|
|
2013-01-05 07:11:42 +00:00
|
|
|
OBJS = main.o dive.o time.o profile.o info.o equipment.o divelist.o deco.o planner.o \
|
2012-09-25 14:28:47 +00:00
|
|
|
parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o uemis-downloader.o \
|
2013-01-11 18:14:10 +00:00
|
|
|
gtk-gui.o statistics.o file.o cochran.o device.o download-dialog.o prefs.o \
|
2013-01-18 01:05:49 +00:00
|
|
|
webservice.o $(GPSOBJ) $(OSSUPPORT).o $(RESFILE)
|
2011-08-31 17:20:46 +00:00
|
|
|
|
2013-01-31 02:48:59 +00:00
|
|
|
DEPS = $(wildcard .dep/*.dep)
|
|
|
|
|
2012-10-12 08:05:41 +00:00
|
|
|
$(NAME): $(OBJS) $(MSGOBJS)
|
2011-09-27 16:43:53 +00:00
|
|
|
$(CC) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS)
|
2011-08-31 01:40:25 +00:00
|
|
|
|
2011-09-27 16:43:53 +00:00
|
|
|
install: $(NAME)
|
2011-10-17 13:53:59 +00:00
|
|
|
$(INSTALL) -d -m 755 $(BINDIR)
|
|
|
|
$(INSTALL) $(NAME) $(BINDIR)
|
2011-10-11 22:58:38 +00:00
|
|
|
$(INSTALL) -d -m 755 $(DESKTOPDIR)
|
|
|
|
$(INSTALL) $(DESKTOPFILE) $(DESKTOPDIR)
|
|
|
|
$(INSTALL) -d -m 755 $(ICONDIR)
|
|
|
|
$(INSTALL) $(ICONFILE) $(ICONDIR)
|
2011-10-31 20:05:55 +00:00
|
|
|
@-if test -z "$(DESTDIR)"; then \
|
|
|
|
$(gtk_update_icon_cache); \
|
|
|
|
fi
|
2011-10-24 11:12:44 +00:00
|
|
|
$(INSTALL) -d -m 755 $(MANDIR)
|
|
|
|
$(INSTALL) -m 644 $(MANFILES) $(MANDIR)
|
2011-11-05 10:39:17 +00: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 06:46:59 +00: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-23 03:59:10 +00:00
|
|
|
|
2011-10-16 21:16:36 +00:00
|
|
|
install-macosx: $(NAME)
|
|
|
|
$(INSTALL) -d -m 755 $(MACOSXINSTALL)/Contents/Resources
|
|
|
|
$(INSTALL) -d -m 755 $(MACOSXINSTALL)/Contents/MacOS
|
2012-10-21 04:06:35 +00:00
|
|
|
$(INSTALL) $(NAME) $(MACOSXINSTALL)/Contents/MacOS/$(NAME)-bin
|
|
|
|
$(INSTALL) $(MACOSXFILES)/$(NAME).sh $(MACOSXINSTALL)/Contents/MacOS/$(NAME)
|
2011-10-30 21:27:33 +00: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-17 04:24:02 +00: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 12:44:01 +00:00
|
|
|
done
|
2011-10-16 21:16:36 +00:00
|
|
|
|
2012-10-17 04:24:02 +00: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-17 06:55:35 +00:00
|
|
|
$(GTK_MAC_BUNDLER) packaging/macosx/subsurface.bundle
|
2012-10-17 04:24:02 +00:00
|
|
|
|
2012-10-16 11:04:37 +00:00
|
|
|
install-cross-windows: $(NAME)
|
|
|
|
$(INSTALL) -d -m 755 $(WINDOWSSTAGING)/share/locale
|
|
|
|
for MSG in $(WINMSGDIRS); do\
|
2012-10-17 04:24:02 +00:00
|
|
|
$(INSTALL) -d -m 755 $(WINDOWSSTAGING)/$$MSG;\
|
2012-10-17 06:55:35 +00:00
|
|
|
$(INSTALL) $(CROSS_PATH)/$$MSG/* $(WINDOWSSTAGING)/$$MSG;\
|
2012-10-16 11:04:37 +00:00
|
|
|
done
|
2012-10-17 06:46:59 +00: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 11:04:37 +00:00
|
|
|
done
|
|
|
|
|
2013-01-24 23:58:35 +00:00
|
|
|
create-windows-installer: $(NAME) $(NSIFILE) install-cross-windows
|
|
|
|
$(MAKENSIS) $(NSIFILE)
|
|
|
|
|
|
|
|
$(NSIFILE): $(NSIINPUTFILE)
|
|
|
|
$(shell cat $(NSIINPUTFILE) | sed -e 's/VERSIONTOKEN/$(VERSION_STRING)/;s/PRODVTOKEN/$(PRODVERSION_STRING)/' > $(NSIFILE))
|
|
|
|
|
|
|
|
|
2012-10-18 21:53:27 +00:00
|
|
|
update-po-files:
|
2012-10-19 07:50:14 +00:00
|
|
|
xgettext -o po/subsurface-new.pot -s -k_ -kN_ --keyword=C_:1c,2 --add-comments="++GETTEXT" *.c
|
2012-10-18 21:53:27 +00:00
|
|
|
for i in po/*.po; do \
|
2012-10-19 07:50:14 +00:00
|
|
|
msgmerge -s -U $$i po/subsurface-new.pot ; \
|
2012-10-18 21:53:27 +00:00
|
|
|
done
|
|
|
|
|
2013-01-31 02:48:59 +00:00
|
|
|
EXTRA_FLAGS = $(GTKCFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) \
|
|
|
|
$(XSLT) $(ZIP) $(LIBDIVECOMPUTERCFLAGS) \
|
|
|
|
$(LIBSOUPCFLAGS) $(OSMGPSMAPFLAGS) $(GCONF2CFLAGS) \
|
|
|
|
-DVERSION_STRING='"$(VERSION_STRING)"'
|
2013-01-23 03:52:07 +00:00
|
|
|
|
2013-01-31 02:48:59 +00:00
|
|
|
%.o: %.c
|
|
|
|
@echo ' CC' $<
|
|
|
|
@mkdir -p .dep
|
|
|
|
@$(CC) $(CFLAGS) $(EXTRA_FLAGS) -MD -MF .dep/$@.dep -c -o $@ $<
|
2011-11-24 06:56:57 +00:00
|
|
|
|
2012-10-19 19:53:08 +00:00
|
|
|
share/locale/%.UTF-8/LC_MESSAGES/subsurface.mo: po/%.po po/%.aliases
|
2012-10-12 08:05:41 +00:00
|
|
|
mkdir -p $(dir $@)
|
|
|
|
msgfmt -c -o $@ po/$*.po
|
2012-10-16 19:21:11 +00:00
|
|
|
@-if test -s po/$*.aliases; then \
|
2012-10-16 13:09:34 +00:00
|
|
|
for ALIAS in `cat po/$*.aliases`; do \
|
2012-10-17 04:24:02 +00:00
|
|
|
mkdir -p share/locale/$$ALIAS/LC_MESSAGES; \
|
|
|
|
cp $@ share/locale/$$ALIAS/LC_MESSAGES; \
|
2012-10-16 13:09:34 +00:00
|
|
|
done; \
|
|
|
|
fi
|
2012-10-11 10:06:56 +00: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 23:12:28 +00:00
|
|
|
doc:
|
|
|
|
$(MAKE) -C Documentation doc
|
|
|
|
|
2011-09-27 16:43:53 +00:00
|
|
|
clean:
|
2012-10-19 07:50:14 +00:00
|
|
|
rm -f $(OBJS) *~ $(NAME) $(NAME).exe po/*~ po/subsurface-new.pot
|
2013-01-31 02:48:59 +00:00
|
|
|
rm -rf share .dep
|
|
|
|
|
|
|
|
-include $(DEPS)
|