summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-17 10:59:43 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-17 11:17:48 -0800
commitd0d4bbece7e0a304a3e1f1fcea3608f3d741e8fa (patch)
tree3b2588afc37b40b49c5173921f8c871bb1024479 /Makefile
parent91d6d12416086e08f97dece728ec9a6d08554230 (diff)
downloadsubsurface-d0d4bbece7e0a304a3e1f1fcea3608f3d741e8fa.tar.gz
Hack Makefile, gtk-gui.c and divelist.c to allow building w/o osm-gps-map
While we are waiting for an autotools generated Makefile, this should allow people to build that don't have osm-gps-map. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d866a5c0d..e49006391 100644
--- a/Makefile
+++ b/Makefile
@@ -91,6 +91,11 @@ GLIB2CFLAGS = $(shell $(PKGCONFIG) --cflags glib-2.0)
GTK2CFLAGS = $(shell $(PKGCONFIG) --cflags gtk+-2.0)
CFLAGS += $(shell $(XSLCONFIG) --cflags)
OSMGPSMAPFLAGS += $(shell $(PKGCONFIG) --cflags osmgpsmap)
+LIBOSMGPSMAP += $(shell $(PKGCONFIG) --libs osmgpsmap 2> /dev/null)
+ifneq ($(strip $(LIBOSMGPSMAP)),)
+ GPSOBJ = gps.o
+ CFLAGS += -DHAVE_OSM_GPS_MAP
+endif
LIBZIP = $(shell $(PKGCONFIG) --libs libzip 2> /dev/null)
ifneq ($(strip $(LIBZIP)),)
@@ -126,7 +131,7 @@ ifneq ($(strip $(LIBXSLT)),)
endif
endif
-LIBS = $(LIBXML2) $(LIBXSLT) $(LIBGTK) $(LIBGCONF2) $(LIBDIVECOMPUTER) $(EXTRALIBS) $(LIBZIP) -lpthread -lm -lssl -lcrypto -losmgpsmap
+LIBS = $(LIBXML2) $(LIBXSLT) $(LIBGTK) $(LIBGCONF2) $(LIBDIVECOMPUTER) $(EXTRALIBS) $(LIBZIP) -lpthread -lm -lssl -lcrypto $(LIBOSMGPSMAP)
MSGLANGS=$(notdir $(wildcard po/*po))
MSGOBJS=$(addprefix share/locale/,$(MSGLANGS:.po=.UTF-8/LC_MESSAGES/subsurface.mo))
@@ -134,7 +139,7 @@ MSGOBJS=$(addprefix share/locale/,$(MSGLANGS:.po=.UTF-8/LC_MESSAGES/subsurface.m
OBJS = main.o dive.o time.o profile.o info.o equipment.o divelist.o deco.o planner.o \
parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o uemis-downloader.o \
gtk-gui.o statistics.o file.o cochran.o device.o download-dialog.o prefs.o \
- gps.o $(OSSUPPORT).o $(RESFILE)
+ $(GPSOBJ) $(OSSUPPORT).o $(RESFILE)
$(NAME): $(OBJS) $(MSGOBJS)
$(CC) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS)