08912c26f3
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
64 lines
1.5 KiB
Makefile
64 lines
1.5 KiB
Makefile
# Info for make, this will be preprocessed by autoconf.
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
datarootdir = @datarootdir@
|
|
bindir = @bindir@
|
|
icondir = @datadir@/icons/wmbattery
|
|
man1dir = @mandir@/man1
|
|
srcdir = @srcdir@
|
|
|
|
CC = @CC@
|
|
CFLAGS = @CFLAGS@ -Wall
|
|
CPPFLAGS = @CPPFLAGS@ -DACPI_APM -DICONDIR=\"$(icondir)\"
|
|
INSTALL = @INSTALL@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
LDFLAGS = @LDFLAGS@
|
|
LIBS = @LIBS@
|
|
|
|
#remove hal support
|
|
#USE_HAL = 1
|
|
|
|
USE_UPOWER = 1
|
|
|
|
all: wmbattery
|
|
|
|
clean:
|
|
rm -f wmbattery *.o
|
|
|
|
distclean: clean
|
|
rm -f config.status config.cache config.log makeinfo config.h \
|
|
config.h.in configure
|
|
|
|
install: all
|
|
$(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(icondir)
|
|
$(INSTALL_PROGRAM) wmbattery $(DESTDIR)$(bindir)
|
|
$(INSTALL_DATA) $(srcdir)/wmbattery.1 $(DESTDIR)$(man1dir)/wmbattery.1
|
|
$(INSTALL_DATA) $(srcdir)/*.xpm $(DESTDIR)$(icondir)
|
|
|
|
uninstall:
|
|
rm -rf $(bindir)/wmbattery $(man1dir)/wmbattery.1 $(icondir)
|
|
|
|
OBJS=wmbattery.o acpi.o sonypi.o
|
|
|
|
ifdef USE_HAL
|
|
CPPFLAGS += -DHAL
|
|
LIBS += $(shell pkg-config --libs hal)
|
|
OBJS += simplehal.o
|
|
simplehal.o: simplehal.c
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(shell pkg-config --cflags hal) -c simplehal.c -o simplehal.o
|
|
endif
|
|
|
|
ifdef USE_UPOWER
|
|
CPPFLAGS += -DUPOWER
|
|
LIBS += $(shell pkg-config --libs upower-glib)
|
|
OBJS += upower.o
|
|
upower.o: upower.c
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(shell pkg-config --cflags upower-glib) -c upower.c -o upower.o
|
|
endif
|
|
|
|
wmbattery: $(OBJS)
|
|
$(CC) -o wmbattery $(LDFLAGS) $(OBJS) $(LIBS)
|
|
|
|
wmbattery.o: wmbattery.c wmbattery.h
|