1 # Copyright (C) 2011 Neil Brown <neilb@suse.de>
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.
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.
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.
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
21 all: $(PROGS) $(TESTS)
25 lsused: lsused.o libsus.a
26 $(CC) -o lsused lsused.o libsus.a -levent
28 wakealarmd: wakealarmd.o libsus.a
29 $(CC) -o wakealarmd wakealarmd.o libsus.a -levent
32 $(CC) -o $@ -c $(CFLAGS) -Dmain=$* $<
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
37 request_suspend: request_suspend.o
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
49 ar cr libsus.a $(LIBS)
52 rm -f *.o *.a *.pyc $(PROGS) $(TESTS)