Removed the REVISION_NUMBER. Prints help on either stderr or stdout.
[dus.git] / Makefile
1
2 #
3 #  dus is a simple utility designed to display the list of files and
4 #  directories with disk occupancy, sorted according to it.
5 #
6 #  Copyright (c) 2009 Francois Fleuret
7 #  Written by Francois Fleuret <francois@fleuret.org>
8 #
9 #  This file is part of dus.
10 #
11 #  dus is free software: you can redistribute it and/or modify
12 #  it under the terms of the GNU General Public License version 3 as
13 #  published by the Free Software Foundation.
14 #
15 #  dus is distributed in the hope that it will be useful, but
16 #  WITHOUT ANY WARRANTY; without even the implied warranty of
17 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 #  General Public License for more details.
19 #
20 #  You should have received a copy of the GNU General Public License
21 #  along with dus.  If not, see <http://www.gnu.org/licenses/>.
22 #
23
24 BINARY_PATH = /usr/bin
25 MAN_PATH = /usr/share/man/man1
26
27 LDFLAGS=
28
29 ifeq ($(DEBUG),yes)
30   OPTIMIZE_FLAG = -ggdb3 -DDEBUG -fno-omit-frame-pointer
31 else
32   OPTIMIZE_FLAG = -O2
33 endif
34
35 CFLAGS = -Wall -ansi -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTIMIZE_FLAG)
36
37 all: dus
38
39 dus: dus.o
40         $(CC) -o $@ $^ $(LDFLAGS)
41
42 install: dus
43         install -m 755 dus $(BINARY_PATH)
44         # install -m 644 dus.1 $(MAN_PATH)
45         # gzip $(MAN_PATH)/dus.1
46
47 uninstall:
48         rm $(BINARY_PATH)/dus
49         # rm $(MAN_PATH)/dus.1.gz
50
51 clean:
52         rm -f *.o dus