wmbattery: use CPPFLAGS for defining preprocessor macros.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
This commit is contained in:
Jeremy Sowden 2019-10-27 19:55:44 +00:00 committed by Carlos R. Mafra
parent bf484198ea
commit 08912c26f3

View file

@ -8,8 +8,8 @@ man1dir = @mandir@/man1
srcdir = @srcdir@
CC = @CC@
CFLAGS = @CFLAGS@ -Wall -DACPI_APM
CPPFLAGS = @CPPFLAGS@ -DICONDIR=\"$(icondir)\"
CFLAGS = @CFLAGS@ -Wall
CPPFLAGS = @CPPFLAGS@ -DACPI_APM -DICONDIR=\"$(icondir)\"
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@ -42,17 +42,17 @@ uninstall:
OBJS=wmbattery.o acpi.o sonypi.o
ifdef USE_HAL
CPPFLAGS += -DHAL
LIBS += $(shell pkg-config --libs hal)
OBJS += simplehal.o
CFLAGS+=-DHAL
simplehal.o: simplehal.c
$(CC) $(CFLAGS) $(shell pkg-config --cflags hal) -c simplehal.c -o simplehal.o
$(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
CFLAGS+=-DUPOWER
upower.o: upower.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(shell pkg-config --cflags upower-glib) -c upower.c -o upower.o
endif