Skip to content

Commit

Permalink
Support for arbitrary lib/ dirnames (like lib64 in Fedora)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarezp committed Jul 16, 2013
1 parent 1680f2b commit 4065b8a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions Makefile
Expand Up @@ -53,7 +53,11 @@ ifndef PREFIX
PREFIX=usr/local/
endif

MACROS=-DPREFIX=$(PREFIX)
ifndef LIBDIRNAME
LIBDIRNAME=lib/
endif

MACROS=-DPREFIX=$(PREFIX) -DLIBDIRNAME=$(LIBDIRNAME)

#Special variables
SHELL=/bin/sh
Expand Down Expand Up @@ -160,8 +164,8 @@ install-man:

.PHONY : install-shared
install-shared:
mkdir -p $(DESTDIR)/$(PREFIX)/lib/superkb
[ -n "$(SHARED)" ] && cp $(SHARED) $(DESTDIR)/$(PREFIX)/lib/superkb/ || true
mkdir -p $(DESTDIR)/$(PREFIX)/$(LIBDIRNAME)/superkb
[ -n "$(SHARED)" ] && cp $(SHARED) $(DESTDIR)/$(PREFIX)/$(LIBDIRNAME)/superkb/ || true

.PHONY : uninstall
uninstall:
Expand All @@ -171,7 +175,7 @@ uninstall:

.PHONY : uninstall-shared
uninstall-shared:
[ -d /$(PREFIX)/lib/superkb ] && rm -fr $(DESTDIR)/$(PREFIX)/lib/superkb
[ -d /$(PREFIX)/$(LIBDIRNAME)/superkb ] && rm -fr $(DESTDIR)/$(PREFIX)/$(LIBDIRNAME)/superkb

.PHONY : uninstall-man
uninstall-man:
Expand Down
2 changes: 1 addition & 1 deletion drawkblib.c
Expand Up @@ -30,7 +30,7 @@
#define PREFIX "/usr/local/"
#endif

#define LIB_PREFIX "/" ESTR(PREFIX) "/lib/"
#define LIB_PREFIX "/" ESTR(PREFIX) "/" ESTR(LIBDIRNAME) "/"

#ifndef WITH_DRAWKBLIBS_XLIB
#define drawkblibs_xlib_init NULL
Expand Down
2 changes: 1 addition & 1 deletion imagelib.c
Expand Up @@ -30,7 +30,7 @@
#define PREFIX "/usr/local/"
#endif

#define LIB_PREFIX "/" ESTR(PREFIX) "/lib/"
#define LIB_PREFIX "/" ESTR(PREFIX) "/" ESTR(LIBDIRNAME) "/"

#ifndef WITH_GDKPIXBUF
#define pi_gdkpixbuf_init NULL
Expand Down

0 comments on commit 4065b8a

Please sign in to comment.