Skip to content

Commit

Permalink
Add pkg-config file for NUMA library
Browse files Browse the repository at this point in the history
This is needed so that other projects can add a dependency on libnuma via
PKG_CHECK_MODULES([NUMA], [numa]).  This enabling makes 'make install' do
the right thing, and of course individual distros will need to add enabling
to their associated packages (rpm, deb, etc.) so the package manager
installs do the right thing.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
  • Loading branch information
Ross Zwisler committed Apr 5, 2018
1 parent b407601 commit 53ac79b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@
/test-suite.log
/test/*.log
/test/*.trs

# pkg-config file
numa.pc
18 changes: 18 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

ACLOCAL_AMFLAGS = -I m4
CLEANFILES =

AM_CPPFLAGS = -Wall

Expand Down Expand Up @@ -141,3 +142,20 @@ TESTS = \
# These are known to be broken:
# test/prefered
# test/randmap

SED_PROCESS = \
$(AM_V_GEN)$(SED) \
-e 's,@VERSION\@,$(VERSION),g' \
-e 's,@prefix\@,$(prefix),g' \
-e 's,@exec_prefix\@,$(exec_prefix),g' \
-e 's,@libdir\@,$(libdir),g' \
-e 's,@includedir\@,$(includedir),g' \
< $< > $@ || rm $@

%.pc: %.pc.in Makefile
$(SED_PROCESS)

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = numa.pc
EXTRA_DIST += numa.pc.in
CLEANFILES += numa.pc
10 changes: 10 additions & 0 deletions numa.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: numa
Description: NUMA policy library
Version: @VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -lnuma

0 comments on commit 53ac79b

Please sign in to comment.