Skip to content

Commit

Permalink
Make dbus optional
Browse files Browse the repository at this point in the history
Use 'make CC="cc -DNO_DBUS"' to build without dbus
  • Loading branch information
doughdemon committed Aug 2, 2014
1 parent 59d4a57 commit a836ced
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
CFLAGS = $(shell pkg-config --cflags freetype2 x11 openal dbus-1)
CFLAGS = $(shell pkg-config --cflags freetype2 x11 openal)
CFLAGS += $(shell pkg-config --cflags dbus-1)
CFLAGS += -g -pthread -std=gnu99
LDFLAGS = $(shell pkg-config --libs freetype2 x11 openal dbus-1)
LDFLAGS = $(shell pkg-config --libs freetype2 x11 openal)
LDFLAGS += $(shell pkg-config --libs dbus-1)
LDFLAGS += -lX11 -lXft -lXrender -ltoxcore -ltoxav -ltoxdns -lopenal -pthread -lresolv -ldl -lm -lfontconfig -lv4lconvert -lvpx -lXext

DESTDIR=/usr/local
Expand Down
4 changes: 4 additions & 0 deletions xlib/dbus.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifndef NO_DBUS

#include <dbus/dbus.h>
#include <signal.h>

Expand Down Expand Up @@ -106,3 +108,5 @@ void dbus_notify(char *title, char *content)

return;
}

#endif /* NODBUS */
2 changes: 1 addition & 1 deletion xlib/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "audio.c"
#include "v4l.c"

#ifndef __APPLE__
#if !(defined(__APPLE__) || defined(NO_DBUS))
#define HAVE_DBUS
#include "dbus.c"
#endif
Expand Down

0 comments on commit a836ced

Please sign in to comment.