summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-12 09:19:21 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-12 09:27:01 -0700
commit9cb60c910681b0fb3c04d22c77bcf9c2754bfa7f (patch)
treec883b03633596fec1a904c7266c492ea833e6807 /Makefile
parent04dc4cdf9d0feab5cd3e8c3aa0ea08addfb3323d (diff)
downloadsubsurface-9cb60c910681b0fb3c04d22c77bcf9c2754bfa7f.tar.gz
Start some very initial libdivecomputer integration
Ok, so this is quite broken right now: it doesn't actually really *do* anything, and it now requires that you have libdivecomputer all set up and installed. That is fairly easy: mkdir ../src cd ../src git clone git://libdivecomputer.git.sourceforge.net/gitroot/libdivecomputer/libdivecomputer cd libdivecomputer autoreconf --install ./configure make sudo make install but you may feel that this is not exactly useful considering that nothing actually *works* yet. Some day. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 787a74fee..7e04f8f17 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,18 @@
CC=gcc
CFLAGS=-Wall -Wno-pointer-sign -g
-OBJS=main.o dive.o profile.o info.o equipment.o divelist.o parse-xml.o save-xml.o
+LIBDIVECOMPUTERDIR = /usr/local
+LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
+LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
+
+OBJS = main.o dive.o profile.o info.o equipment.o divelist.o \
+ parse-xml.o save-xml.o libdivecomputer.o
divelog: $(OBJS)
$(CC) $(LDFLAGS) -o divelog $(OBJS) \
`xml2-config --libs` \
- `pkg-config --libs gtk+-2.0 glib-2.0 gconf-2.0`
+ `pkg-config --libs gtk+-2.0 glib-2.0 gconf-2.0` \
+ $(LIBDIVECOMPUTERARCHIVE)
parse-xml.o: parse-xml.c dive.h
$(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c `xml2-config --cflags` parse-xml.c
@@ -32,3 +38,8 @@ equipment.o: equipment.c dive.h display.h divelist.h
divelist.o: divelist.c dive.h display.h divelist.h
$(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c divelist.c
+
+libdivecomputer.o: libdivecomputer.c dive.h display.h
+ $(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` \
+ -I$(LIBDIVECOMPUTERINCLUDES) \
+ -c libdivecomputer.c