3 # Copyright (c) 2013 Francois Fleuret
4 # Written by Francois Fleuret <francois@fleuret.org>
6 # This file is part of mymail.
8 # mymail is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 3 as
10 # published by the Free Software Foundation.
12 # mymail is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with mymail. If not, see <http://www.gnu.org/licenses/>.
21 BINARY_PATH = $(DESTDIR)/usr/bin
22 MAN_PATH = $(DESTDIR)/usr/share/man/man1
26 UNAME=\"$(shell uname -srmn)\"
29 OPTIMIZE_FLAG = -ggdb3 -DDEBUG -fno-omit-frame-pointer
34 CFLAGS = -Wall -Wextra -ansi -pedantic -DUNAME="$(UNAME)" $(OPTIMIZE_FLAG)
39 $(CC) -o $@ $^ $(LDFLAGS)
42 mkdir -p $(BINARY_PATH) $(MAN_PATH)
43 install -m 755 mymail $(BINARY_PATH)
44 install -m 755 bash-mymail.sh $(BINARY_PATH)
45 install -m 644 mymail.1 $(MAN_PATH)
46 gzip $(MAN_PATH)/mymail.1
49 rm $(BINARY_PATH)/mymail
50 rm $(BINARY_PATH)/bash-mymail.sh
51 rm $(MAN_PATH)/mymail.1.gz