configure: include -lm and -DLUA_USE_POSIX in config.mk
This commit is contained in:
parent
331c6acbd2
commit
bbd25fe4a2
2 changed files with 15 additions and 10 deletions
2
Makefile
2
Makefile
|
@ -7,7 +7,7 @@ LUADIR = external/lua
|
|||
CC = ${_CC}
|
||||
CFLAGS = ${_CFLAGS} -I${LUADIR} -pedantic -Wall -Wextra
|
||||
CPPFLAGS = -D_DEFAULT_SOURCE
|
||||
LDFLAGS = -lm ${_LDFLAGS}
|
||||
LDFLAGS = ${_LDFLAGS}
|
||||
|
||||
OBJS = callisto.o lcl.o lenviron.o lextra.o lfs.o ljson.o \
|
||||
lprocess.o util.o
|
||||
|
|
23
configure
vendored
23
configure
vendored
|
@ -5,7 +5,10 @@
|
|||
set -e
|
||||
|
||||
mkf=config.mk
|
||||
cflags='-std=c99' # set here to apply to all subtrees
|
||||
# these also apply to all libraries in external/
|
||||
cflags='-std=c99'
|
||||
cppflags='-DLUA_USE_POSIX'
|
||||
ldflags='-lm'
|
||||
|
||||
# utility functions
|
||||
|
||||
|
@ -57,7 +60,7 @@ gen_CFLAGS () {
|
|||
## flags used in the linking step
|
||||
gen_LDFLAGS () {
|
||||
if pkg-config readline; then
|
||||
ldflags="$(pkg-config --libs readline)"
|
||||
ldflags="$ldflags $(pkg-config --libs readline)"
|
||||
fi
|
||||
if present ld.lld; then
|
||||
ldflags="$ldflags -fuse-ld=lld"
|
||||
|
@ -105,11 +108,13 @@ gen_LDFLAGS
|
|||
|
||||
printf '# generated by configure
|
||||
|
||||
_CC = %s
|
||||
_CFLAGS = %s
|
||||
_LDFLAGS =%s
|
||||
' \
|
||||
"$cc" \
|
||||
"$cflags" \
|
||||
"$ldflags"\
|
||||
_CC = %s
|
||||
_CFLAGS = %s
|
||||
_CPPFLAGS = %s
|
||||
_LDFLAGS =%s
|
||||
' \
|
||||
"$cc" \
|
||||
"$cflags" \
|
||||
"$cppflags"\
|
||||
"$ldflags" \
|
||||
>"$mkf"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue