From 37559aa18c8d2b61cd085c9dddcaac9a5a45a246 Mon Sep 17 00:00:00 2001 From: Iblis Lin Date: Tue, 19 Jan 2016 20:45:54 +0800 Subject: [PATCH] FreeBSD has different pkg-config dir: /usr/local/libdata/ --- Make.inc | 8 +++++++- Makefile | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Make.inc b/Make.inc index 6858ea3..2add739 100644 --- a/Make.inc +++ b/Make.inc @@ -12,6 +12,12 @@ bindir = $(prefix)/bin libdir = $(prefix)/lib includedir = $(prefix)/include +ifeq ($(OS), FreeBSD) + pkgconfigdir = $(prefix)/libdata/pkgconfig +else + pkgconfigdir = $(libdir)/pkgconfig +endif + USEGCC = 1 USECLANG = 0 @@ -91,7 +97,7 @@ ifeq ($(OS), WINNT) SONAME_FLAG = -soname override CFLAGS_add += -nodefaultlibs shlibdir = $(bindir) - else +else ifeq ($(OS), Darwin) SHLIB_EXT = dylib SONAME_FLAG = -install_name diff --git a/Makefile b/Makefile index d05f97e..6264a1a 100644 --- a/Makefile +++ b/Makefile @@ -62,9 +62,9 @@ openlibm.pc: openlibm.pc.in Make.inc Makefile install: all openlibm.pc mkdir -p $(DESTDIR)$(shlibdir) - mkdir -p $(DESTDIR)$(libdir)/pkgconfig + mkdir -p $(DESTDIR)$(pkgconfigdir) mkdir -p $(DESTDIR)$(includedir)/openlibm cp -f -a libopenlibm.$(SHLIB_EXT)* $(DESTDIR)$(shlibdir)/ cp -f -a libopenlibm.a $(DESTDIR)$(libdir)/ cp -f -a include/openlibm*.h $(DESTDIR)$(includedir)/ - cp -f -a openlibm.pc $(DESTDIR)$(libdir)/pkgconfig/ + cp -f -a openlibm.pc $(DESTDIR)$(pkgconfigdir)/