Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install a libflame.pc file #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ MK_LIBS_SYML := $(strip $(MK_LIBS_SYML))
# Set the path to the subdirectory of the include installation directory.
MK_INCL_DIR_INST := $(INSTALL_INCDIR)

PC_DIR_INST := $(INSTALL_LIBDIR)/pkgconfig
PC_IN_FILE := libflame.pc.in
PC_OUT_FILE := libflame.pc



#
Expand Down Expand Up @@ -411,7 +415,7 @@ all: libs

libs: libflame

install: libs install-libs install-lib-symlinks install-headers
install: libs install-libs install-lib-symlinks install-headers $(PC_DIR_INST)

uninstall: uninstall-libs uninstall-lib-symlinks uninstall-headers

Expand Down Expand Up @@ -705,6 +709,21 @@ else
@$(MV) $(@F) $(INSTALL_LIBDIR)/
endif

$(PC_DIR_INST): $(PC_IN_FILE)
$(MKDIR) $(@)
ifeq ($(ENABLE_VERBOSE),no)
@echo "Installing $(PC_OUT_FILE) into $(@)/"
endif
$(shell cat "$(PC_IN_FILE)" \
| sed -e "s#@PACKAGE_VERSION@#$(VERSION)#g" \
| sed -e "s#@prefix@#$(prefix)#g" \
| sed -e "s#@exec_prefix@#$(exec_prefix)#g" \
| sed -e "s#@libdir@#$(libdir)#g" \
| sed -e "s#@includedir@#$(includedir)#g" \
| sed -e "s#@LDFLAGS@#$(LDFLAGS)#g" \
> "$(PC_OUT_FILE)" )
$(INSTALL) -m 0644 $(PC_OUT_FILE) $(@)


# --- Clean rules ---

Expand Down Expand Up @@ -751,6 +770,7 @@ ifeq ($(ENABLE_VERBOSE),yes)
- $(RM_RF) $(OBJ_DIR)
- $(RM_RF) $(LIB_DIR)
- $(RM_RF) $(INC_DIR)
- $(RM_RF) $(PC_OUT_FILE)
- $(RM_RF) config.log
- $(RM_RF) aclocal.m4
- $(RM_RF) autom4te.cache
Expand All @@ -762,6 +782,8 @@ else
@$(RM_F) $(AR_OBJ_LIST_FILE)
@echo "Removing $(CONFIG_DIR)"
@$(RM_RF) $(CONFIG_DIR)
@echo "Removing $(PC_OUT_FILE)"
@$(RM_F) $(PC_OUT_FILE)
@echo "Removing $(OBJ_DIR)"
@$(RM_RF) $(OBJ_DIR)
@echo "Removing $(LIB_DIR)"
Expand Down
11 changes: 11 additions & 0 deletions libflame.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: libflame
Description: A portable library for dense matrix computations, providing much of the functionality present in LAPACK
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lflame
Libs.private: @LDFLAGS@
Cflags: -I${includedir}