libelf: Correctly use LDFLAGS/CPPFLAGS

This commit is contained in:
Dylan Araps 2020-05-26 18:23:35 +03:00
parent 74b0ee8751
commit 969fbd8cf9
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

View File

@ -31,14 +31,14 @@ done
# Create all objects (.o).
for file in libelf/*.c; do
${CC:-cc} -I./libelf -I./common $LDFLAGS $CFLAGS $CPPFLAGS -c \
${CC:-cc} -I./libelf -I./common $CFLAGS $CPPFLAGS -c \
-o "${file%%.c}.o" "$file"
done
mkdir -p "$1/usr/lib"
# Create shared library.
${CC:-cc} $LDFLAGS $CFLAGS $CPPFLAGS -I./libelf -I./common libelf/*.o \
${CC:-cc} $LDFLAGS $CFLAGS -I./libelf -I./common libelf/*.o \
-o "$1/usr/lib/libelf.so.1"
# Create static library.