2019-10-27 19:55:42 +00:00
|
|
|
# Info for make, this will be preprocessed by autoconf.
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
2019-10-27 19:55:43 +00:00
|
|
|
datarootdir = @datarootdir@
|
2019-10-27 19:55:42 +00:00
|
|
|
bindir = @bindir@
|
|
|
|
icondir = @datadir@/icons/wmbattery
|
|
|
|
man1dir = @mandir@/man1
|
|
|
|
srcdir = @srcdir@
|
|
|
|
|
2019-10-29 18:12:17 +00:00
|
|
|
PACKAGE_NAME = @PACKAGE_NAME@
|
|
|
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
|
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
|
|
|
|
2019-10-27 19:55:42 +00:00
|
|
|
CC = @CC@
|
2019-10-27 19:55:46 +00:00
|
|
|
CFLAGS = @CFLAGS@ -Wall @Xlib_CFLAGS@ @Xext_CFLAGS@ @libXpm_CFLAGS@
|
2019-10-27 19:55:44 +00:00
|
|
|
CPPFLAGS = @CPPFLAGS@ -DACPI_APM -DICONDIR=\"$(icondir)\"
|
2019-10-27 19:55:42 +00:00
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
LDFLAGS = @LDFLAGS@
|
2019-10-27 19:55:46 +00:00
|
|
|
LIBS = @LIBS@ @Xlib_LIBS@ @Xext_LIBS@ @libXpm_LIBS@
|
2019-10-28 22:06:38 +00:00
|
|
|
USE_HAL = @USE_HAL@
|
|
|
|
USE_UPOWER = @USE_UPOWER@
|
2020-05-02 03:19:55 +00:00
|
|
|
USE_ENVSYS = @USE_ENVSYS@
|
2014-09-20 04:23:18 +00:00
|
|
|
|
|
|
|
all: wmbattery
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f wmbattery *.o
|
|
|
|
|
|
|
|
distclean: clean
|
2019-10-29 18:12:14 +00:00
|
|
|
rm -rf autom4te.cache config.status config.cache config.log config.h \
|
|
|
|
Makefile
|
2014-09-20 04:23:18 +00:00
|
|
|
|
|
|
|
install: all
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(icondir)
|
|
|
|
$(INSTALL_PROGRAM) wmbattery $(DESTDIR)$(bindir)
|
2015-05-14 04:38:49 +00:00
|
|
|
$(INSTALL_DATA) $(srcdir)/wmbattery.1 $(DESTDIR)$(man1dir)/wmbattery.1
|
2014-09-20 04:23:18 +00:00
|
|
|
$(INSTALL_DATA) $(srcdir)/*.xpm $(DESTDIR)$(icondir)
|
|
|
|
|
|
|
|
uninstall:
|
2015-05-14 04:38:49 +00:00
|
|
|
rm -rf $(bindir)/wmbattery $(man1dir)/wmbattery.1 $(icondir)
|
2014-09-20 04:23:18 +00:00
|
|
|
|
2019-10-29 18:12:17 +00:00
|
|
|
dist:
|
|
|
|
@test -d $(PACKAGE_NAME)-$(PACKAGE_VERSION) \
|
|
|
|
&& rm -fr $(PACKAGE_NAME)-$(PACKAGE_VERSION) || :
|
|
|
|
@$(INSTALL) -d $(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
|
|
|
@$(INSTALL) -d $(PACKAGE_NAME)-$(PACKAGE_VERSION)/autoconf
|
|
|
|
@find . -type f \
|
|
|
|
! -name autogen ! -name configure ! -name .gitignore \
|
|
|
|
! -name config.status ! -name config.cache ! -name config.log \
|
|
|
|
! -name config.h ! -name Makefile \
|
|
|
|
! -name $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
|
|
|
|
! -path './autoconf/*' \
|
|
|
|
! -path './autom4te.cache/*' \
|
|
|
|
! -path './$(PACKAGE_NAME)-$(PACKAGE_VERSION)/*' \
|
|
|
|
-exec $(INSTALL_DATA) '{}' $(PACKAGE_NAME)-$(PACKAGE_VERSION) \;
|
|
|
|
@$(INSTALL_PROGRAM) autogen configure $(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
|
|
|
@$(INSTALL_PROGRAM) autoconf/install-sh $(PACKAGE_NAME)-$(PACKAGE_VERSION)/autoconf
|
|
|
|
@tar cf - $(PACKAGE_NAME)-$(PACKAGE_VERSION) \
|
|
|
|
| gzip >$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz
|
|
|
|
@rm -fr $(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
|
|
|
|
2014-09-20 04:23:18 +00:00
|
|
|
OBJS=wmbattery.o acpi.o sonypi.o
|
|
|
|
|
|
|
|
ifdef USE_HAL
|
2019-10-27 19:55:44 +00:00
|
|
|
CPPFLAGS += -DHAL
|
2019-10-28 22:06:39 +00:00
|
|
|
CFLAGS += @hal_CFLAGS@
|
|
|
|
LIBS += @hal_LIBS@
|
2019-10-27 19:55:44 +00:00
|
|
|
OBJS += simplehal.o
|
2014-09-20 04:23:18 +00:00
|
|
|
simplehal.o: simplehal.c
|
2019-10-27 19:55:45 +00:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c simplehal.c -o simplehal.o
|
2014-09-20 04:23:18 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef USE_UPOWER
|
2019-10-27 19:55:44 +00:00
|
|
|
CPPFLAGS += -DUPOWER
|
2019-10-28 22:06:39 +00:00
|
|
|
CFLAGS += @upower_CFLAGS@
|
|
|
|
LIBS += @upower_LIBS@
|
2019-10-27 19:55:44 +00:00
|
|
|
OBJS += upower.o
|
2014-09-20 04:23:18 +00:00
|
|
|
upower.o: upower.c
|
2019-10-27 19:55:45 +00:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c upower.c -o upower.o
|
2014-09-20 04:23:18 +00:00
|
|
|
endif
|
|
|
|
|
2020-05-02 03:19:55 +00:00
|
|
|
ifdef USE_ENVSYS
|
|
|
|
CPPFLAGS += -DENVSYS
|
|
|
|
LIBS += -lprop
|
|
|
|
OBJS += envsys.o
|
|
|
|
envsys.o: envsys.c
|
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c envsys.c -o envsys.o
|
|
|
|
endif
|
|
|
|
|
2014-09-20 04:23:18 +00:00
|
|
|
wmbattery: $(OBJS)
|
|
|
|
$(CC) -o wmbattery $(LDFLAGS) $(OBJS) $(LIBS)
|
|
|
|
|
|
|
|
wmbattery.o: wmbattery.c wmbattery.h
|