summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-24 04:12:44 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-24 04:12:44 -0700
commit16461e93289f85f7b46f64973a5ed8e9a9040189 (patch)
tree7546353594fffa848c62cdb83faccc110f65f09d /Makefile
parenta72408400c67a142b9abaec89df954df7dac7a71 (diff)
downloadsubsurface-16461e93289f85f7b46f64973a5ed8e9a9040189.tar.gz
Makefile fixes
The stupid lib vs lib64 problem. I'm sure there's a more portable way to handle this, but this at least seems to work. Also fix the install target. Seriously, you create a directory with mode 644 and claim that this ever worked? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e946469bb..2d86d4890 100644
--- a/Makefile
+++ b/Makefile
@@ -24,17 +24,27 @@ MANFILES = $(NAME).1
# libdivecomputer still is - so we check /usr/local and /usr and then we
# give up. You can override by simply setting it here
#
-libdc-local := $(wildcard /usr/local/include/libdivecomputer/*)
-libdc-usr := $(wildcard /usr/include/libdivecomputer/*)
+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)
ifneq ($(strip $(libdc-local)),)
LIBDIVECOMPUTERDIR = /usr/local
LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
+else ifneq ($(strip $(libdc-local64)),)
+ LIBDIVECOMPUTERDIR = /usr/local
+ LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
+ LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a
else ifneq ($(strip $(libdc-usr)),)
LIBDIVECOMPUTERDIR = /usr
LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
+else ifneq ($(strip $(libdc-usr64)),)
+ LIBDIVECOMPUTERDIR = /usr
+ LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
+ LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a
else
$(error Cannot find libdivecomputer - please edit Makefile)
endif
@@ -67,8 +77,8 @@ install: $(NAME)
$(INSTALL) -d -m 755 $(ICONDIR)
$(INSTALL) $(ICONFILE) $(ICONDIR)
$(gtk_update_icon_cache)
- $(INSTALL) -d -m 644 $(MANDIR)
- $(INSTALL) $(MANFILES) $(MANDIR)
+ $(INSTALL) -d -m 755 $(MANDIR)
+ $(INSTALL) -m 644 $(MANFILES) $(MANDIR)
parse-xml.o: parse-xml.c dive.h
$(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c `xml2-config --cflags` parse-xml.c