]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Add cheesy "install" target
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Sep 2011 03:59:10 +0000 (20:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Sep 2011 03:59:10 +0000 (20:59 -0700)
It just puts the subsurface binary in $(HOME)/bin.

.. and then the binary won't find the icon file, so this is really not
enough of an install to get it really working, but whatever.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Makefile

index c019cf8c751de31568cb4fbb4f04248876a236c8..e93d03030c0f68ac3a568a3bcc96182078136a61 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,9 @@
 CC=gcc
 CFLAGS=-Wall -Wno-pointer-sign -g
+INSTALL=install
+
+prefix = $(HOME)
+DESTDIR = $(prefix)/bin
 
 LIBDIVECOMPUTERDIR = /usr/local
 LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
@@ -24,6 +28,10 @@ OBJS =       main.o dive.o profile.o info.o equipment.o divelist.o \
 subsurface: $(OBJS)
        $(CC) $(LDFLAGS) -o subsurface $(OBJS) $(LIBS)
 
+install: subsurface
+       $(INSTALL) -d -m 755 '$(DESTDIR)'
+       $(INSTALL) subsurface '$(DESTDIR)'
+
 parse-xml.o: parse-xml.c dive.h
        $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c `xml2-config --cflags`  parse-xml.c