From eff65410dfda1b5ddf9cfcaaa3a63bbb64617163 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Fri, 23 Mar 2012 19:20:08 +0100 Subject: [PATCH] wmauda: Pixmap folder set as argument The PIXMAP_DIR is set in the Makefile folder, using the prefix argument. --- wmauda/Makefile | 10 ++++------ wmauda/config.h | 2 -- wmauda/wmauda.c | 12 +++++++++--- 3 files changed, 13 insertions(+), 11 deletions(-) delete mode 100644 wmauda/config.h diff --git a/wmauda/Makefile b/wmauda/Makefile index 4da37f1..fdac125 100644 --- a/wmauda/Makefile +++ b/wmauda/Makefile @@ -1,20 +1,18 @@ CC ?= gcc CFLAGS ?= -g -pipe -PREFIX ?= /usr +PREFIX ?= /usr/local INSTALL_DIR := $(PREFIX)/bin PIXMAP_DIR := $(PREFIX)/share/pixmaps MANPAGE_DIR := $(PREFIX)/share/man/man1 -CFLAGS += $(shell pkg-config audacious --cflags) $(shell pkg-config dbus-1 --cflags) -LIBS := $(shell pkg-config audacious --libs) $(shell pkg-config audclient --libs) $(shell pkg-config dbus-1 --libs) +CFLAGS += $(shell pkg-config audclient --cflags) $(shell pkg-config dbus-glib-1 --cflags) $(shell pkg-config gtk+-2.0 --cflags) -DPIXMAP_DIR="\"$(PIXMAP_DIR)\"" -CFLAGS += $(shell pkg-config gtk+-2.0 --cflags) -LIBS += $(shell pkg-config gtk+-2.0 --libs) -lX11 +LIBS := $(shell pkg-config audclient --libs) $(shell pkg-config dbus-glib-1 --libs) $(shell pkg-config gtk+-2.0 --libs) -lX11 OBJS = wmauda.o -HEADERS = config.h dock-master.xpm +HEADERS = dock-master.xpm wmauda: $(OBJS) $(HEADERS) $(CC) -o wmauda $(OBJS) $(CFLAGS) $(LIBS) diff --git a/wmauda/config.h b/wmauda/config.h deleted file mode 100644 index 22ea9ba..0000000 --- a/wmauda/config.h +++ /dev/null @@ -1,2 +0,0 @@ -#define DATA_DIR "/usr/share/pixmaps" -#define VERSION "0.6" diff --git a/wmauda/wmauda.c b/wmauda/wmauda.c index f2b83b0..8f13cbc 100644 --- a/wmauda/wmauda.c +++ b/wmauda/wmauda.c @@ -29,12 +29,18 @@ #include #include -#include "config.h" - #include "dock-master.xpm" #include +#ifndef VERSION +# define VERSION 0.8 +#endif + +#ifndef PIXMAP_DIR +# define PIXMAP_DIR "/usr/local/share/pixmaps" +#endif + typedef struct { int x, y, width, height, pressed_x, pressed_y, normal_x, normal_y; @@ -731,7 +737,7 @@ void init(void) gdk_draw_rectangle(launch_mask, mask_gc, TRUE, 0, 0, -1, -1); if (!icon_name) - icon_name = g_strdup_printf("%s/wmauda.xpm", DATA_DIR); + icon_name = g_strdup_printf("%s/wmauda.xpm", PIXMAP_DIR); pixmap = gdk_pixmap_create_from_xpm(icon_win->window, &mask, NULL, icon_name); if (!pixmap) -- 2.11.4.GIT