xref: /freebsd/contrib/libxo/encoder/test/Makefile.am (revision 62cfcf62f627e5093fb37026a6d8c98e4d2ef04c)
1#
2# $Id$
3#
4# Copyright 2015, Juniper Networks, Inc.
5# All rights reserved.
6# This SOFTWARE is licensed under the LICENSE provided in the
7# ../Copyright file. By downloading, installing, copying, or otherwise
8# using the SOFTWARE, you agree to be bound by the terms of that
9# LICENSE.
10
11if LIBXO_WARNINGS_HIGH
12LIBXO_WARNINGS = HIGH
13endif
14if HAVE_GCC
15GCC_WARNINGS = yes
16endif
17include ${top_srcdir}/warnings.mk
18
19enc_testincdir = ${includedir}/libxo
20
21AM_CFLAGS = \
22    -I${top_srcdir}/libxo \
23    -I${top_builddir}/libxo \
24    ${WARNINGS}
25
26LIBNAME = libenc_test
27pkglib_LTLIBRARIES = libenc_test.la
28LIBS = \
29    -L${top_builddir}/libxo -lxo
30
31LDADD = ${top_builddir}/libxo/libxo.la
32
33libenc_test_la_SOURCES = \
34    enc_test.c
35
36pkglibdir = ${XO_ENCODERDIR}
37
38UGLY_NAME = test.enc
39
40install-exec-hook:
41	@DLNAME=`sh -c '. ./libenc_test.la ; echo $$dlname'` ; \
42		if [ x"$$DLNAME" = x ]; \
43                    then DLNAME=${LIBNAME}.${XO_LIBEXT}; fi ; \
44		if [ "$(build_os)" = "cygwin" ]; \
45		    then DLNAME="../bin/$$DLNAME"; fi ; \
46		echo Install link $$DLNAME "->" ${UGLY_NAME} "..." ; \
47		mkdir -p ${DESTDIR}${XO_ENCODERDIR} ; \
48		cd ${DESTDIR}${XO_ENCODERDIR} \
49		&& chmod +w . \
50		&& rm -f ${UGLY_NAME} \
51		&& ${LN_S} $$DLNAME ${UGLY_NAME}
52