No longer hardcore PREFIX as /usr/pkg

This commit is contained in:
Pierre Pronchery 2009-07-24 00:08:27 +00:00
parent adf0d0ea97
commit cd42379b5a
3 changed files with 6 additions and 2 deletions

View File

@ -17,7 +17,7 @@ INSTALL = install
all: $(TARGETS)
panel_OBJS = panel.o main.o
panel_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
panel_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) -D PREFIX=\"$(PREFIX)\" $(CFLAGSF) $(CFLAGS)
panel_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
panel: $(panel_OBJS)

View File

@ -46,6 +46,9 @@ struct _Panel
/* constants */
#ifndef PREFIX
# define PREFIX "/usr/local"
#endif
#define PANEL_BORDER_WIDTH 4
#define PANEL_ICON_SIZE 48
@ -373,7 +376,7 @@ static gint _apps_compare(gconstpointer a, gconstpointer b);
static gboolean _panel_idle_apps(gpointer data)
{
Panel * panel = data;
const char path[] = "/usr/pkg/share/applications";
const char path[] = PREFIX "/share/applications";
DIR * dir;
struct dirent * de;
size_t len;

View File

@ -7,6 +7,7 @@ dist=Makefile,panel.h
[panel]
type=binary
sources=panel.c,main.c
cppflags=-D PREFIX=\"$(PREFIX)\"
install=$(BINDIR)
[main.c]