summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-22 20:59:10 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-22 20:59:10 -0700
commit1e42dc10e5df52822fff698573cae97b2efb3220 (patch)
treec5bed0a4e7ec21a6ac0065a06193e175deec8db3
parentd9ca1b6fbf42b15b597e51f018fdb5df65ee2c29 (diff)
downloadsubsurface-1e42dc10e5df52822fff698573cae97b2efb3220.tar.gz
Add cheesy "install" target
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>
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c019cf8c7..e93d03030 100644
--- 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