Moved the binary into /usr/bin instead of /usr/local/bin.
[breezed.git] / Makefile
1
2 #  breezed is a fan speed control daemon for Linux computers.
3 #
4 #  Copyright (c) 2008 Francois Fleuret
5 #  Written by Francois Fleuret <francois@fleuret.org>
6 #
7 #  This file is part of breezed.
8 #
9 #  breezed is free software: you can redistribute it and/or modify it
10 #  under the terms of the GNU General Public License version 3 as
11 #  published by the Free Software Foundation.
12 #
13 #  breezed is distributed in the hope that it will be useful, but
14 #  WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 #  General Public License for more details.
17 #
18 #  You should have received a copy of the GNU General Public License
19 #  along with breezed.  If not, see <http://www.gnu.org/licenses/>.
20
21 BINARY_PATH = /usr/bin
22 MAN_PATH = /usr/share/man/man1
23 PM_SLEEPD = /usr/lib/pm-utils/sleep.d
24
25 all: breezed
26
27 breezed: breezed.cc
28         g++ -o breezed breezed.cc
29
30 install: breezed /etc/breezed.conf
31         install -m 755 breezed $(BINARY_PATH)
32         install -m 755 breezed.sh /etc/init.d/
33         install -m 644 breezed.1 $(MAN_PATH)
34         install -m 755 breezed-pm-utils.sh $(PM_SLEEPD)/50breezed
35         gzip $(MAN_PATH)/breezed.1
36         update-rc.d breezed.sh defaults
37         /etc/init.d/breezed.sh start
38
39 uninstall:
40         /etc/init.d/breezed.sh stop
41         update-rc.d -f breezed.sh remove
42         rm $(PM_SLEEPD)/50breezed
43         rm $(MAN_PATH)/breezed.1.gz
44         rm $(BINARY_PATH)/breezed
45
46 clean:
47         \rm -f breezed