Skip to content

Commit

Permalink
add support for pkg-config
Browse files Browse the repository at this point in the history
  • Loading branch information
TUVIMEN committed Jul 27, 2024
1 parent 39ad1ea commit fa63b94
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.o
*.so
reliq
./reliq.h
/reliq
/reliq.h
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ reliq_h:
lib: clean reliq_h
@make O_LIB=1 TARGET=lib${TARGET}.so

lib-install: lib
install-pc:
sed "s/#VERSION#/${VERSION}/g;s|#PREFIX#|${PREFIX}|g;s/#CFLAGS_D#/${CFLAGS_D}/g" reliq.pc > $$(pkg-config --variable pc_path pkg-config | cut -d: -f1)/reliq.pc

lib-install: lib install-pc
install -m755 lib${TARGET}.so ${LD_LIBRARY_PATH}
install -m644 reliq.h ${INCLUDE_PATH}

Expand Down
11 changes: 11 additions & 0 deletions reliq.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=#PREFIX#
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include

Name: reliq
Description: html parsing and searching library
URL: https://github.com/TUVIMEN/reliq
Version: #VERSION#
Libs: -L"${libdir}" -lreliq
Cflags: -I"${includedir}" #CFLAGS_D#

0 comments on commit fa63b94

Please sign in to comment.