xbattmon

simple battery monitor for X
git clone git://git.2f30.org/xbattmon
Log | Files | Refs | README | LICENSE

commit 995f80c64f7abb4c2801f8580b47463cccae7561
parent b7e4d422fa382a49a539bdaa388eb0ddf8d2df3c
Author: Quentin Rameau <quinq@fifth.space>
Date:   Wed, 12 Sep 2018 18:01:47 +0200

POSIXify Makefiles

Diffstat:
MMakefile | 5+++++
Mconfig.dfly.mk | 2+-
Mconfig.linux.mk | 1+
3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -1,3 +1,5 @@ +.POSIX: + VERSION = 1.1 include config.mk @@ -10,6 +12,9 @@ all: $(BIN) $(BIN): $(OBJ) $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDLIBS) +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< + xbattmon.o: arg.h config.h config.h: diff --git a/config.dfly.mk b/config.dfly.mk @@ -2,6 +2,6 @@ PREFIX = /usr/local MANPREFIX = $(PREFIX)/man CPPFLAGS = -DVERSION=\"${VERSION}\" -DPATH_APM=\"/dev/apm\" -CFLAGS = -I/usr/local/include ${CPPFLAGS} +CFLAGS = -I/usr/local/include LDFLAGS = -L/usr/local/lib LDLIBS = -lX11 diff --git a/config.linux.mk b/config.linux.mk @@ -2,6 +2,7 @@ PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man CPPFLAGS = \ + -D_POSIX_C_SOURCE=200809L \ -DVERSION=\"${VERSION}\" \ -DPATH_FMT_BAT_FULL=\"/sys/class/power_supply/BAT%d/energy_full\" \ -DPATH_FMT_BAT_NOW=\"/sys/class/power_supply/BAT%d/energy_now\" \