wmbattery: add --enable-hal and --enable-upower.
[dockapps.git] / wmbattery / Makefile.in
blob5c1529bc4e402188d2c6a5c640a2494e4a005e73
1 # Info for make, this will be preprocessed by autoconf.
2 prefix = @prefix@
3 exec_prefix = @exec_prefix@
4 datarootdir = @datarootdir@
5 bindir = @bindir@
6 icondir = @datadir@/icons/wmbattery
7 man1dir = @mandir@/man1
8 srcdir = @srcdir@
10 CC = @CC@
11 CFLAGS = @CFLAGS@ -Wall @Xlib_CFLAGS@ @Xext_CFLAGS@ @libXpm_CFLAGS@
12 CPPFLAGS = @CPPFLAGS@ -DACPI_APM -DICONDIR=\"$(icondir)\"
13 INSTALL = @INSTALL@
14 INSTALL_DATA = @INSTALL_DATA@
15 INSTALL_PROGRAM = @INSTALL_PROGRAM@
16 LDFLAGS = @LDFLAGS@
17 LIBS = @LIBS@ @Xlib_LIBS@ @Xext_LIBS@ @libXpm_LIBS@
18 USE_HAL = @USE_HAL@
19 USE_UPOWER = @USE_UPOWER@
21 all: wmbattery
23 clean:
24 rm -f wmbattery *.o
26 distclean: clean
27 rm -f config.status config.cache config.log makeinfo config.h \
28 config.h.in configure
30 install: all
31 $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(icondir)
32 $(INSTALL_PROGRAM) wmbattery $(DESTDIR)$(bindir)
33 $(INSTALL_DATA) $(srcdir)/wmbattery.1 $(DESTDIR)$(man1dir)/wmbattery.1
34 $(INSTALL_DATA) $(srcdir)/*.xpm $(DESTDIR)$(icondir)
36 uninstall:
37 rm -rf $(bindir)/wmbattery $(man1dir)/wmbattery.1 $(icondir)
39 OBJS=wmbattery.o acpi.o sonypi.o
41 ifdef USE_HAL
42 CPPFLAGS += -DHAL
43 CFLAGS += @HAL_CFLAGS@
44 LIBS += @HAL_LIBS@
45 OBJS += simplehal.o
46 simplehal.o: simplehal.c
47 $(CC) $(CPPFLAGS) $(CFLAGS) -c simplehal.c -o simplehal.o
48 endif
50 ifdef USE_UPOWER
51 CPPFLAGS += -DUPOWER
52 CFLAGS += @UPOWER_GLIB_CFLAGS@
53 LIBS += @UPOWER_GLIB_LIBS@
54 OBJS += upower.o
55 upower.o: upower.c
56 $(CC) $(CPPFLAGS) $(CFLAGS) -c upower.c -o upower.o
57 endif
59 wmbattery: $(OBJS)
60 $(CC) -o wmbattery $(LDFLAGS) $(OBJS) $(LIBS)
62 wmbattery.o: wmbattery.c wmbattery.h