added pkg-config functionality
This commit is contained in:
parent
25cb64d2f2
commit
c8abf83960
1 changed files with 8 additions and 0 deletions
|
@ -14,6 +14,8 @@ SRCDIR="src"
|
||||||
OBJDIR="obj"
|
OBJDIR="obj"
|
||||||
MAKEFILE=".makefile"
|
MAKEFILE=".makefile"
|
||||||
|
|
||||||
|
PKG_CONFIG_LIBS=""
|
||||||
|
|
||||||
HEADER_DIR="include"
|
HEADER_DIR="include"
|
||||||
# -------------------
|
# -------------------
|
||||||
|
|
||||||
|
@ -26,6 +28,9 @@ OBJ="$(find ${SRCDIR} -name '*\.c' 2> /dev/null |
|
||||||
|
|
||||||
srcnum="$(find ${SRCDIR} -name '*\.c' -exec printf %c {} + 2> /dev/null | wc -c)"
|
srcnum="$(find ${SRCDIR} -name '*\.c' -exec printf %c {} + 2> /dev/null | wc -c)"
|
||||||
|
|
||||||
|
CFLAGS="${CFLAGS} $(pkg-config --cflags "${PKG_CONFIG_LIBS}")"
|
||||||
|
LDLIBS="${CFLAGS} $(pkg-config --libs "${PKG_CONFIG_LIBS}")"
|
||||||
|
|
||||||
clear_formatting="\033[0m"
|
clear_formatting="\033[0m"
|
||||||
bold="\033[1m"
|
bold="\033[1m"
|
||||||
info_color="\033[34m" # default: "\033[34m" - blue
|
info_color="\033[34m" # default: "\033[34m" - blue
|
||||||
|
@ -55,6 +60,9 @@ Customization:
|
||||||
OBJDIR the directory where compiled objects will be placed. (default: obj)
|
OBJDIR the directory where compiled objects will be placed. (default: obj)
|
||||||
MAKEFILE the filename of the generated makefile (default: .makefile)
|
MAKEFILE the filename of the generated makefile (default: .makefile)
|
||||||
|
|
||||||
|
PKG_CONFIG_LIBS uses flags generated by pkg-config for the given library
|
||||||
|
name.
|
||||||
|
|
||||||
HEADER_DIR the directory in which header files will be placed by the 'new'
|
HEADER_DIR the directory in which header files will be placed by the 'new'
|
||||||
command. Note that this is relative to SRCDIR. Setting this to
|
command. Note that this is relative to SRCDIR. Setting this to
|
||||||
'.' means headers will be placed in the same directory as
|
'.' means headers will be placed in the same directory as
|
||||||
|
|
Loading…
Reference in a new issue