You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
942 B
46 lines
942 B
+++ Makefile
|
|
@@ -12,6 +12,10 @@
|
|
endif
|
|
endif
|
|
|
|
+ifndef WITH_PULSEAUDIO
|
|
+ WITH_PULSEAUDIO=yes
|
|
+endif
|
|
+
|
|
CFLAGS+=-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare
|
|
CFLAGS+=-g
|
|
CFLAGS+=-std=gnu99
|
|
@@ -21,8 +25,8 @@
|
|
CFLAGS+=-Iinclude
|
|
LIBS+=-lconfuse
|
|
LIBS+=-lyajl
|
|
-LIBS+=-lpulse
|
|
LIBS+=-lm
|
|
+LIBS+=-lpulse
|
|
|
|
VERSION=2.10
|
|
GIT_VERSION="2.10 (2016-01-01)"
|
|
@@ -75,6 +79,13 @@
|
|
LIBS:=$(filter-out -lpulse, $(LIBS)) -lpthread
|
|
endif
|
|
|
|
+ifeq ($(WITH_PULSEAUDIO),yes)
|
|
+CFLAGS+=-DWITH_PULSEAUDIO
|
|
+else
|
|
+OBJS:=$(filter-out src/pulse.o, $(OBJS))
|
|
+LIBS:=$(filter-out -lpulse, $(LIBS))
|
|
+endif
|
|
+
|
|
src/%.o: src/%.c include/i3status.h
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
|
@echo " CC $<"
|
|
+++ src/print_volume.c
|
|
@@ -60,7 +60,7 @@
|
|
free(instance);
|
|
}
|
|
|
|
-#ifndef __OpenBSD__
|
|
+#if !defined(__OpenBSD__) && defined(WITH_PULSEAUDIO)
|
|
/* Try PulseAudio first */
|
|
|
|
/* If the device name has the format "pulse[:N]" where N is the
|
|
|