The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
691 B
45 lines
691 B
6 years ago
|
#! /bin/sh
|
||
|
|
||
|
srcdir=$(dirname "$0")
|
||
|
|
||
|
for i in "$@"
|
||
|
do
|
||
|
case $i in
|
||
|
--prefix=*)
|
||
|
PREFIX="${i#*=}"
|
||
|
shift
|
||
|
;;
|
||
|
--libdir=*)
|
||
|
LIBDIR="${i#*=}"
|
||
|
shift
|
||
|
;;
|
||
|
--includedir=*)
|
||
|
INCDIR="${i#*=}"
|
||
|
shift
|
||
|
;;
|
||
|
--libext=*)
|
||
|
LIBEXT="${i#*=}"
|
||
|
shift
|
||
|
;;
|
||
|
*)
|
||
|
shift
|
||
|
;;
|
||
|
esac
|
||
|
done
|
||
|
|
||
4 years ago
|
DEP_ARGS=$(pkg-config --cflags --libs somelib)
|
||
6 years ago
|
|
||
|
cat > Makefile << EOL
|
||
|
all: libfoo.$LIBEXT
|
||
|
|
||
|
libfoo.$LIBEXT:
|
||
|
$CC "$srcdir/libfoo.c" -shared -fPIC $DEP_ARGS -o \$@
|
||
|
|
||
|
install: libfoo.$LIBEXT
|
||
|
mkdir -p "\$(DESTDIR)$LIBDIR";
|
||
|
mkdir -p "\$(DESTDIR)$LIBDIR/pkgconfig";
|
||
|
mkdir -p "\$(DESTDIR)$INCDIR";
|
||
|
cp \$< "\$(DESTDIR)$LIBDIR";
|
||
|
cp "$srcdir/libfoo.h" "\$(DESTDIR)$INCDIR";
|
||
|
EOL
|