wmbattery: remove rules generating autoconf artefacts.
[dockapps.git] / wmbattery / Makefile
blob863d07ad1a737c6f7d990fa009c3889f4b1e6a96
1 include makeinfo
3 all: wmbattery
5 clean:
6 rm -f wmbattery *.o
8 distclean: clean
9 rm -f config.status config.cache config.log makeinfo config.h \
10 config.h.in configure
12 install: all
13 $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(icondir)
14 $(INSTALL_PROGRAM) wmbattery $(DESTDIR)$(bindir)
15 $(INSTALL_DATA) $(srcdir)/wmbattery.1 $(DESTDIR)$(man1dir)/wmbattery.1
16 $(INSTALL_DATA) $(srcdir)/*.xpm $(DESTDIR)$(icondir)
18 uninstall:
19 rm -rf $(bindir)/wmbattery $(man1dir)/wmbattery.1 $(icondir)
21 OBJS=wmbattery.o acpi.o sonypi.o
23 ifdef USE_HAL
24 LIBS+=$(shell pkg-config --libs hal)
25 OBJS+=simplehal.o
26 CFLAGS+=-DHAL
27 simplehal.o: simplehal.c
28 $(CC) $(CFLAGS) $(shell pkg-config --cflags hal) -c simplehal.c -o simplehal.o
29 endif
31 ifdef USE_UPOWER
32 LIBS+=$(shell pkg-config --libs upower-glib)
33 OBJS+=upower.o
34 CFLAGS+=-DUPOWER
35 upower.o: upower.c
36 $(CC) $(CPPFLAGS) $(CFLAGS) $(shell pkg-config --cflags upower-glib) -c upower.c -o upower.o
37 endif
39 wmbattery: $(OBJS)
40 $(CC) -o wmbattery $(LDFLAGS) $(OBJS) $(LIBS)
42 wmbattery.o: wmbattery.c wmbattery.h