]> git.neil.brown.name Git - susman.git/blob - Makefile
Require process requesting immediate suspend to remain active.
[susman.git] / Makefile
1 # Copyright (C) 2011 Neil Brown <neilb@suse.de>
2 #
3 #    This program is free software; you can redistribute it and/or modify
4 #    it under the terms of the GNU General Public License as published by
5 #    the Free Software Foundation; either version 2 of the License, or
6 #    (at your option) any later version.
7 #
8 #    This program is distributed in the hope that it will be useful,
9 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
10 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 #    GNU General Public License for more details.
12 #
13 #    You should have received a copy of the GNU General Public License along
14 #    with this program; if not, write to the Free Software Foundation, Inc.,
15 #    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16
17 PROGS = lsusd lsused request_suspend wakealarmd susman
18 TESTS = block_test watch_test event_test alarm_test
19 LIBS = suspend_block.o watcher.o wakeevent.o wakealarm.o
20
21 all: $(PROGS) $(TESTS)
22
23 lsusd: lsusd.o
24
25 lsused: lsused.o libsus.a
26         $(CC) -o lsused lsused.o libsus.a -levent
27
28 wakealarmd: wakealarmd.o libsus.a
29         $(CC) -o wakealarmd wakealarmd.o libsus.a -levent
30
31 %-m.o: %.c
32         $(CC) -o $@ -c $(CFLAGS) -Dmain=$* $<
33
34 susman: susman.o lsusd-m.o lsused-m.o wakealarmd-m.o libsus.a
35         $(CC) -o susman susman.o lsusd-m.o lsused-m.o wakealarmd-m.o libsus.a -levent
36
37 request_suspend: request_suspend.o
38
39 block_test: block_test.o libsus.a
40         $(CC) -o block_test block_test.o libsus.a
41 watch_test: watch_test.o libsus.a
42         $(CC) -o watch_test watch_test.o libsus.a -levent
43 event_test: event_test.o libsus.a
44         $(CC) -o event_test event_test.o libsus.a -levent
45 alarm_test: alarm_test.o libsus.a
46         $(CC) -o alarm_test alarm_test.o libsus.a -levent
47
48 libsus.a: $(LIBS)
49         ar cr libsus.a $(LIBS)
50
51 clean:
52         rm -f *.o *.a *.pyc $(PROGS) $(TESTS)
53