45 lines
981 B
Makefile
45 lines
981 B
Makefile
# vala-otp
|
|
# Written in 2022 by Lucas
|
|
#
|
|
# To the extent possible under law, the author(s) have dedicated all
|
|
# copyright and related and neighboring rights to this software to the
|
|
# public domain worldwide. This software is distributed without any
|
|
# warranty.
|
|
#
|
|
# You should have received a copy of the CC0 Public Domain Dedication
|
|
# along with this software. If not, see
|
|
# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
.POSIX:
|
|
.SUFFIXES:
|
|
|
|
P = otp
|
|
V = 0.0
|
|
|
|
DIST = COPYING Makefile opt.vala t/rfc.vala
|
|
|
|
all: libotp.so
|
|
|
|
clean:
|
|
rm -f otp.h libotp.so otp.vapi ${P}-${V}.tgz
|
|
|
|
test: t/rfc.t
|
|
|
|
run-tests: test
|
|
LD_LIBRARY_PATH=. prove
|
|
|
|
dist: clean
|
|
pax -w -s ',^,$P-$V/,' ${DIST} | gzip >$P-$V.tgz
|
|
|
|
install: all
|
|
mkdir -p ${PREFIX}/bin
|
|
cp -f ${BIN} ${PREFIX}/bin
|
|
|
|
uninstall:
|
|
cd ${PREFIX}/bin && rm -f ${BIN}
|
|
|
|
libotp.so: otp.vala
|
|
valac --library=otp -H otp.h -X -fPIC -X -shared -o libotp.so otp.vala
|
|
|
|
t/rfc.t: libotp.so
|
|
valac -X -I. -X libotp.so -o t/rfc.t otp.vapi t/rfc.vala
|