]> git.tdb.fi Git - ext/subsurface.git/commitdiff
A Makefile 'clean' target is quite standard.
authorCristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Tue, 27 Sep 2011 16:43:53 +0000 (18:43 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Sep 2011 17:48:52 +0000 (10:48 -0700)
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Makefile

index 628f116d7dfeb874aefe1d4918dbea52b77c0f19..f962c0f01a0ae8fe730f68286a274a2d20171381 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ INSTALL=install
 
 prefix = $(HOME)
 DESTDIR = $(prefix)/bin
+NAME = subsurface
 
 LIBDIVECOMPUTERDIR = /usr/local
 LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
@@ -27,12 +28,12 @@ OBJS =      main.o dive.o profile.o info.o equipment.o divelist.o \
        parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o \
        gtk-gui.o
 
-subsurface: $(OBJS)
-       $(CC) $(LDFLAGS) -o subsurface $(OBJS) $(LIBS)
+$(NAME): $(OBJS)
+       $(CC) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS)
 
-install: subsurface
+install: $(NAME)
        $(INSTALL) -d -m 755 '$(DESTDIR)'
-       $(INSTALL) subsurface '$(DESTDIR)'
+       $(INSTALL) $(NAME) '$(DESTDIR)'
 
 parse-xml.o: parse-xml.c dive.h
        $(CC) $(CFLAGS) `pkg-config --cflags glib-2.0` -c `xml2-config --cflags`  parse-xml.c
@@ -75,3 +76,6 @@ gtk-gui.o: gtk-gui.c dive.h display.h divelist.h display-gtk.h libdivecomputer.h
 
 uemis.o: uemis.c uemis.h
        $(CC) $(CFLAGS) `pkg-config --cflags gtk+-2.0 glib-2.0` -c uemis.c
+
+clean:
+       rm -f $(OBJS) *~ $(NAME)