Changed the minor version to 3 for the conversion to pure C.
[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 CFLAGS = -Wall -ansi -pedantic -DREVISION_NUMBER=$(REVISION_NUMBER) $(OPTIMIZE_FLAG)
26
27 all: breezed
28
29 breezed: breezed.c
30         $(CC) -o $@ $^ $(LDFLAGS)
31
32 install: breezed /etc/breezed.conf
33         install -m 755 breezed $(BINARY_PATH)
34         install -m 755 breezed.sh /etc/init.d/
35         install -m 644 breezed.1 $(MAN_PATH)
36         gzip $(MAN_PATH)/breezed.1
37         install -m 755 breezed-pm-utils.sh $(PM_SLEEPD)/50breezed
38         update-rc.d breezed.sh defaults
39         /etc/init.d/breezed.sh start
40
41 uninstall:
42         /etc/init.d/breezed.sh stop
43         update-rc.d -f breezed.sh remove
44         rm $(PM_SLEEPD)/50breezed
45         rm $(MAN_PATH)/breezed.1.gz
46         rm /etc/init.d/breezed.sh
47         rm $(BINARY_PATH)/breezed
48
49 clean:
50         \rm -f breezed