Add build system and boilerplate
FossilOrigin-Name: f4f7ec59913f58beff7b54b86e3ea84fb45b1bfd6950719adef3975e71c610a5
This commit is contained in:
parent
f456a2b790
commit
6ae5b43b5a
15 changed files with 5287 additions and 0 deletions
21
.fossil-settings/ignore-glob
Normal file
21
.fossil-settings/ignore-glob
Normal file
|
@ -0,0 +1,21 @@
|
|||
*.a
|
||||
*.dep
|
||||
*.dll
|
||||
*.dylib
|
||||
*.exe
|
||||
*.framework
|
||||
*.o
|
||||
*.orig
|
||||
*.so
|
||||
*.so.*
|
||||
*/.deps
|
||||
*~
|
||||
.deps
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
buildsys.mk
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
extra.mk
|
||||
tests/tests
|
18
Makefile
Normal file
18
Makefile
Normal file
|
@ -0,0 +1,18 @@
|
|||
SUBDIRS = src tests
|
||||
DISTCLEAN = aclocal.m4 \
|
||||
autom4te.cache \
|
||||
buildsys.mk \
|
||||
config.h \
|
||||
config.log \
|
||||
config.status \
|
||||
extra.mk
|
||||
|
||||
include buildsys.mk
|
||||
include extra.mk
|
||||
|
||||
.PHONY: check
|
||||
|
||||
tests: src
|
||||
|
||||
check: tests
|
||||
cd tests && ${MAKE} -s run
|
10
autogen.sh
Normal file
10
autogen.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Set a version for OpenBSD
|
||||
: ${AUTOCONF_VERSION:=2.69}
|
||||
: ${AUTOMAKE_VERSION:=1.16}
|
||||
export AUTOCONF_VERSION AUTOMAKE_VERSION
|
||||
|
||||
aclocal -I build-aux/m4
|
||||
autoconf
|
1509
build-aux/config.guess
vendored
Normal file
1509
build-aux/config.guess
vendored
Normal file
File diff suppressed because it is too large
Load diff
1799
build-aux/config.sub
vendored
Normal file
1799
build-aux/config.sub
vendored
Normal file
File diff suppressed because it is too large
Load diff
301
build-aux/install-sh
Normal file
301
build-aux/install-sh
Normal file
|
@ -0,0 +1,301 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: install-sh.in,v 1.6 2012/01/11 13:07:31 hans Exp $
|
||||
# This script now also installs multiple files, but might choke on installing
|
||||
# multiple files with spaces in the file names.
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
awkprog="${AWKPROG-awk}"
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
instcmd="$cpprog"
|
||||
instflags=""
|
||||
pathcompchmodcmd="$chmodprog 755"
|
||||
chmodcmd="$chmodprog 755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
stripflags=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
msrc=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
suffix=""
|
||||
suffixfmt=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-b) suffix=".old"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-B) suffixfmt="$2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m*)
|
||||
chmodcmd="$chmodprog ${1#-m}"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-S) stripcmd="$stripprog"
|
||||
stripflags="-S $2 $stripflags"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-p) instflags="-p"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$msrc" = x ]
|
||||
then
|
||||
msrc="$dst"
|
||||
else
|
||||
msrc="$msrc $dst"
|
||||
fi
|
||||
src="$dst"
|
||||
dst="$1"
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$dir_arg" = x ]
|
||||
then
|
||||
dstisfile=""
|
||||
if [ ! -d "$dst" ]
|
||||
then
|
||||
if [ x"$msrc" = x"$src" ]
|
||||
then
|
||||
dstisfile=true
|
||||
else
|
||||
echo "install: destination is not a directory"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
msrc="$msrc $dst"
|
||||
fi
|
||||
|
||||
if [ x"$msrc" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for srcarg in $msrc; do
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
|
||||
dstarg="$srcarg"
|
||||
else
|
||||
dstarg="$dst"
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $srcarg $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f "$srcarg" ]
|
||||
then
|
||||
doinst="$instcmd $instflags"
|
||||
elif [ -d "$srcarg" ]
|
||||
then
|
||||
echo "install: $srcarg: not a regular file"
|
||||
exit 1
|
||||
elif [ "$srcarg" = "/dev/null" ]
|
||||
then
|
||||
doinst="$cpprog"
|
||||
else
|
||||
echo "install: $srcarg does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d "$dstarg" ]
|
||||
then
|
||||
dstarg="$dstarg"/`basename "$srcarg"`
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo "$dstarg" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$doit $mkdirprog "${pathcomp}"
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "${pathcomp}"; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "${pathcomp}"; else true ; fi &&
|
||||
if [ x"$pathcompchmodcmd" != x ]; then $doit $pathcompchmodcmd "${pathcomp}"; else true ; fi
|
||||
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
if [ -d "$dstarg" ]; then
|
||||
true
|
||||
else
|
||||
$doit $mkdirprog "$dstarg" &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dstarg"; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dstarg"; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dstarg"; else true ; fi
|
||||
fi
|
||||
else
|
||||
|
||||
if [ x"$dstisfile" = x ]
|
||||
then
|
||||
file=$srcarg
|
||||
else
|
||||
file=$dst
|
||||
fi
|
||||
|
||||
dstfile=`basename "$file"`
|
||||
dstfinal="$dstdir/$dstfile"
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Make a backup file name in the proper directory.
|
||||
case x$suffixfmt in
|
||||
*%*) suffix=`echo x |
|
||||
$awkprog -v bname="$dstfinal" -v fmt="$suffixfmt" '
|
||||
{ cnt = 0;
|
||||
do {
|
||||
sfx = sprintf(fmt, cnt++);
|
||||
name = bname sfx;
|
||||
} while (system("test -f " name) == 0);
|
||||
print sfx; }' -`;;
|
||||
x) ;;
|
||||
*) suffix="$suffixfmt";;
|
||||
esac
|
||||
dstbackup="$dstfinal$suffix"
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $doinst $srcarg "$dsttmp" &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $stripflags "$dsttmp"; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
if [ x"$suffix" != x ] && [ -f "$dstfinal" ]
|
||||
then
|
||||
$doit $mvcmd "$dstfinal" "$dstbackup"
|
||||
else
|
||||
$doit $rmcmd -f "$dstfinal"
|
||||
fi &&
|
||||
$doit $mvcmd "$dsttmp" "$dstfinal"
|
||||
fi
|
||||
|
||||
done &&
|
||||
|
||||
|
||||
exit 0
|
78
build-aux/m4/ax_check_compiler_flags.m4
Normal file
78
build-aux/m4/ax_check_compiler_flags.m4
Normal file
|
@ -0,0 +1,78 @@
|
|||
# ===========================================================================
|
||||
# http://autoconf-archive.cryp.to/ax_check_compiler_flags.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether the given compiler FLAGS work with the current language's
|
||||
# compiler, or whether they give an error. (Warnings, however, are
|
||||
# ignored.)
|
||||
#
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# LAST MODIFICATION
|
||||
#
|
||||
# 2008-04-12
|
||||
#
|
||||
# COPYLEFT
|
||||
#
|
||||
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||
# Copyright (c) 2008 Matteo Frigo
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Macro Archive. When you make and
|
||||
# distribute a modified version of the Autoconf Macro, you may extend this
|
||||
# special exception to the GPL to apply to your modified version as well.
|
||||
|
||||
AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
|
||||
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
|
||||
AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
|
||||
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
|
||||
AS_LITERAL_IF([$1],
|
||||
[AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [
|
||||
ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$1"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
|
||||
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
|
||||
[ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
|
||||
_AC_LANG_PREFIX[]FLAGS="$1"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
|
||||
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
|
||||
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
|
||||
eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)
|
||||
AC_MSG_RESULT($ax_check_compiler_flags)
|
||||
if test "x$ax_check_compiler_flags" = xyes; then
|
||||
m4_default([$2], :)
|
||||
else
|
||||
m4_default([$3], :)
|
||||
fi
|
||||
])dnl AX_CHECK_COMPILER_FLAGS
|
386
build-aux/m4/buildsys.m4
Normal file
386
build-aux/m4/buildsys.m4
Normal file
|
@ -0,0 +1,386 @@
|
|||
dnl
|
||||
dnl Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017,
|
||||
dnl 2018, 2020, 2021, 2022
|
||||
dnl Jonathan Schleifer <js@nil.im>
|
||||
dnl
|
||||
dnl https://fossil.nil.im/buildsys
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, and/or distribute this software for any
|
||||
dnl purpose with or without fee is hereby granted, provided that the above
|
||||
dnl copyright notice and this permission notice is present in all copies.
|
||||
dnl
|
||||
dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
dnl CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
dnl POSSIBILITY OF SUCH DAMAGE.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([BUILDSYS_INIT], [
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
|
||||
AC_ARG_ENABLE(rpath,
|
||||
AS_HELP_STRING([--disable-rpath], [do not use rpath]))
|
||||
|
||||
case "$build_os" in
|
||||
darwin*)
|
||||
case "$host_os" in
|
||||
darwin*)
|
||||
AC_SUBST(BUILD_AND_HOST_ARE_DARWIN, yes)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_PROG_INSTALL
|
||||
case "$INSTALL" in
|
||||
./build-aux/install-sh*)
|
||||
INSTALL="$PWD/$INSTALL"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CONFIG_COMMANDS_PRE([
|
||||
AS_IF([test x"$GCC" = x"yes"],
|
||||
[AC_SUBST(DEP_CFLAGS, '-MD -MF $${out%.o}.dep')])
|
||||
AS_IF([test x"$GXX" = x"yes"],
|
||||
[AC_SUBST(DEP_CXXFLAGS, '-MD -MF $${out%.o}.dep')])
|
||||
AS_IF([test x"$GOBJC" = x"yes"],
|
||||
[AC_SUBST(DEP_OBJCFLAGS, '-MD -MF $${out%.o}.dep')])
|
||||
AS_IF([test x"$GOBJCXX" = x"yes"],
|
||||
[AC_SUBST(DEP_OBJCXXFLAGS, '-MD -MF $${out%.o}.dep')])
|
||||
|
||||
AC_SUBST(AMIGA_LIB_CFLAGS)
|
||||
AC_SUBST(AMIGA_LIB_LDFLAGS)
|
||||
|
||||
case "$build_os" in
|
||||
morphos*)
|
||||
dnl Don't use tput on MorphOS: The colored output is
|
||||
dnl quite unreadable and in some MorphOS versions the
|
||||
dnl output from tput is not 8-bit safe, with awk (for
|
||||
dnl AC_SUBST) failing as a result.
|
||||
;;
|
||||
*)
|
||||
AC_PATH_PROG(TPUT, tput)
|
||||
;;
|
||||
esac
|
||||
|
||||
AS_IF([test x"$TPUT" != x""], [
|
||||
if x=$($TPUT el 2>/dev/null); then
|
||||
AC_SUBST(TERM_EL, "$x")
|
||||
else
|
||||
AC_SUBST(TERM_EL, "$($TPUT ce 2>/dev/null)")
|
||||
fi
|
||||
|
||||
if x=$($TPUT sgr0 2>/dev/null); then
|
||||
AC_SUBST(TERM_SGR0, "$x")
|
||||
else
|
||||
AC_SUBST(TERM_SGR0, "$($TPUT me 2>/dev/null)")
|
||||
fi
|
||||
|
||||
if x=$($TPUT bold 2>/dev/null); then
|
||||
AC_SUBST(TERM_BOLD, "$x")
|
||||
else
|
||||
AC_SUBST(TERM_BOLD, "$($TPUT md 2>/dev/null)")
|
||||
fi
|
||||
|
||||
if x=$($TPUT setaf 1 2>/dev/null); then
|
||||
AC_SUBST(TERM_SETAF1, "$x")
|
||||
AC_SUBST(TERM_SETAF2,
|
||||
"$($TPUT setaf 2 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF3,
|
||||
"$($TPUT setaf 3 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF4,
|
||||
"$($TPUT setaf 4 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF6,
|
||||
"$($TPUT setaf 6 2>/dev/null)")
|
||||
dnl OpenBSD seems to want 3 parameters for terminals
|
||||
dnl ending in -256color, but the additional two
|
||||
dnl parameters don't seem to do anything, so we set
|
||||
dnl them to 0.
|
||||
elif x=$($TPUT setaf 1 0 0 2>/dev/null); then
|
||||
AC_SUBST(TERM_SETAF1, "$x")
|
||||
AC_SUBST(TERM_SETAF2,
|
||||
"$($TPUT setaf 2 0 0 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF3,
|
||||
"$($TPUT setaf 3 0 0 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF4,
|
||||
"$($TPUT setaf 4 0 0 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF6,
|
||||
"$($TPUT setaf 6 0 0 2>/dev/null)")
|
||||
else
|
||||
AC_SUBST(TERM_SETAF1,
|
||||
"$($TPUT AF 1 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF2,
|
||||
"$($TPUT AF 2 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF3,
|
||||
"$($TPUT AF 3 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF4,
|
||||
"$($TPUT AF 4 2>/dev/null)")
|
||||
AC_SUBST(TERM_SETAF6,
|
||||
"$($TPUT AF 6 2>/dev/null)")
|
||||
fi
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([BUILDSYS_CHECK_IOS], [
|
||||
case "$host_os" in
|
||||
darwin*)
|
||||
AC_MSG_CHECKING(whether host is iOS)
|
||||
AC_EGREP_CPP(yes, [
|
||||
#include <TargetConditionals.h>
|
||||
|
||||
#if (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || \
|
||||
(defined(TARGET_OS_SIMULATOR) && \
|
||||
TARGET_OS_SIMULATOR)
|
||||
yes
|
||||
#endif
|
||||
], [
|
||||
host_is_ios="yes"
|
||||
], [
|
||||
host_is_ios="no"
|
||||
])
|
||||
AC_MSG_RESULT($host_is_ios)
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
AC_DEFUN([BUILDSYS_PROG_IMPLIB], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_MSG_CHECKING(whether we need an implib)
|
||||
case "$host_os" in
|
||||
cygwin* | mingw*)
|
||||
AC_MSG_RESULT(yes)
|
||||
PROG_IMPLIB_NEEDED='yes'
|
||||
PROG_IMPLIB_LDFLAGS='-Wl,--export-all-symbols,--out-implib,lib${PROG}.a'
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
PROG_IMPLIB_NEEDED='no'
|
||||
PROG_IMPLIB_LDFLAGS=''
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(PROG_IMPLIB_NEEDED)
|
||||
AC_SUBST(PROG_IMPLIB_LDFLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN([BUILDSYS_SHARED_LIB], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([BUILDSYS_CHECK_IOS])
|
||||
AC_MSG_CHECKING(for shared library system)
|
||||
|
||||
case "$host" in
|
||||
*-*-darwin*)
|
||||
AC_MSG_RESULT(Darwin)
|
||||
LIB_CFLAGS='-fPIC -DPIC'
|
||||
LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
|
||||
LIB_LDFLAGS_INSTALL_NAME='-Wl,-install_name,${libdir}/$${out%.dylib}.${LIB_MAJOR}.dylib'
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.dylib'
|
||||
AS_IF([test x"$enable_rpath" != x"no"], [
|
||||
LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
|
||||
])
|
||||
PLUGIN_CFLAGS='-fPIC -DPIC'
|
||||
PLUGIN_LDFLAGS='-bundle ${PLUGIN_LDFLAGS_BUNDLE_LOADER}'
|
||||
PLUGIN_SUFFIX='.bundle'
|
||||
AS_IF([test x"$host_is_ios" = x"yes"], [
|
||||
LINK_PLUGIN='rm -fr $$out && ${MKDIR_P} $$out && if test -f Info.plist; then ${INSTALL} -m 644 Info.plist $$out/Info.plist; fi && ${LD} -o $$out/$${out%${PLUGIN_SUFFIX}} ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS} && ${CODESIGN} -fs ${CODESIGN_IDENTITY} --timestamp=none $$out'
|
||||
], [
|
||||
LINK_PLUGIN='rm -fr $$out && ${MKDIR_P} $$out/Contents/MacOS && if test -f Info.plist; then ${INSTALL} -m 644 Info.plist $$out/Contents/Info.plist; fi && ${LD} -o $$out/Contents/MacOS/$${out%${PLUGIN_SUFFIX}} ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS} && ${CODESIGN} -fs ${CODESIGN_IDENTITY} --timestamp=none $$out'
|
||||
])
|
||||
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib'
|
||||
INSTALL_PLUGIN='&& rm -fr ${DESTDIR}${plugindir}/$$i && cp -R $$i ${DESTDIR}${plugindir}/'
|
||||
UNINSTALL_PLUGIN='&& rm -fr ${DESTDIR}${plugindir}/$$i'
|
||||
CLEAN_LIB=''
|
||||
;;
|
||||
*-*-mingw* | *-*-cygwin*)
|
||||
AC_MSG_RESULT(MinGW / Cygwin)
|
||||
LIB_CFLAGS=''
|
||||
LIB_LDFLAGS='-shared -Wl,--export-all-symbols'
|
||||
LIB_LDFLAGS_INSTALL_NAME=''
|
||||
LIB_PREFIX=''
|
||||
LIB_SUFFIX='${LIB_MAJOR}.dll'
|
||||
LINK_LIB='&& rm -f lib$${out%${LIB_SUFFIX}}.dll.a && ${LN_S} $$out lib$${out%${LIB_SUFFIX}}.dll.a'
|
||||
PLUGIN_CFLAGS=''
|
||||
PLUGIN_LDFLAGS='-shared -Wl,--export-all-symbols'
|
||||
PLUGIN_SUFFIX='.dll'
|
||||
LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
|
||||
INSTALL_LIB='&& ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 lib$${i%${LIB_SUFFIX}}.dll.a ${DESTDIR}${libdir}/lib$${i%${LIB_SUFFIX}}.dll.a'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/lib$${i%${LIB_SUFFIX}}.dll.a'
|
||||
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
|
||||
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
|
||||
CLEAN_LIB='${SHARED_LIB}.a ${SHARED_LIB_NOINST}.a'
|
||||
;;
|
||||
*-*-openbsd* | *-*-mirbsd*)
|
||||
AC_MSG_RESULT(OpenBSD)
|
||||
LIB_CFLAGS='-fPIC -DPIC'
|
||||
LIB_LDFLAGS='-shared'
|
||||
LIB_LDFLAGS_INSTALL_NAME=''
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.so.${LIB_MAJOR}.${LIB_MINOR}'
|
||||
AS_IF([test x"$enable_rpath" != x"no"], [
|
||||
LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
|
||||
])
|
||||
PLUGIN_CFLAGS='-fPIC -DPIC'
|
||||
PLUGIN_LDFLAGS='-shared'
|
||||
PLUGIN_SUFFIX='.so'
|
||||
LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
|
||||
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i'
|
||||
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
|
||||
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
|
||||
CLEAN_LIB=''
|
||||
;;
|
||||
*-*-solaris*)
|
||||
AC_MSG_RESULT(Solaris)
|
||||
LIB_CFLAGS='-fPIC -DPIC'
|
||||
LIB_LDFLAGS='-shared -Wl,-soname=$$out.${LIB_MAJOR}.${LIB_MINOR}'
|
||||
LIB_LDFLAGS_INSTALL_NAME=''
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.so'
|
||||
AS_IF([test x"$enable_rpath" != x"no"], [
|
||||
LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
|
||||
])
|
||||
PLUGIN_CFLAGS='-fPIC -DPIC'
|
||||
PLUGIN_LDFLAGS='-shared'
|
||||
PLUGIN_SUFFIX='.so'
|
||||
LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
|
||||
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}'
|
||||
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
|
||||
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
|
||||
CLEAN_LIB=''
|
||||
;;
|
||||
*-*-android*)
|
||||
AC_MSG_RESULT(Android)
|
||||
LIB_CFLAGS='-fPIC -DPIC'
|
||||
LIB_LDFLAGS='-shared -Wl,-soname=$$out.${LIB_MAJOR}'
|
||||
LIB_LDFLAGS_INSTALL_NAME=''
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.so'
|
||||
PLUGIN_CFLAGS='-fPIC -DPIC'
|
||||
PLUGIN_LDFLAGS='-shared'
|
||||
PLUGIN_SUFFIX='.so'
|
||||
LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
|
||||
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0'
|
||||
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
|
||||
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
|
||||
CLEAN_LIB=''
|
||||
;;
|
||||
hppa*-*-hpux*)
|
||||
AC_MSG_RESULT([HP-UX (PA-RISC)])
|
||||
LIB_CFLAGS='-fPIC -DPIC'
|
||||
LIB_LDFLAGS='-shared -Wl,+h,$$out'
|
||||
LIB_LDFLAGS_INSTALL_NAME=''
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.${LIB_MAJOR}'
|
||||
LINK_LIB='&& rm -f $${out%%.*}.sl && ${LN_S} $$out $${out%%.*}.sl'
|
||||
AS_IF([test x"$enable_rpath" != x"no"], [
|
||||
LDFLAGS_RPATH='-Wl,+b,${libdir}'
|
||||
])
|
||||
PLUGIN_CFLAGS='-fPIC -DPIC'
|
||||
PLUGIN_LDFLAGS='-shared'
|
||||
PLUGIN_SUFFIX='.sl'
|
||||
LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
|
||||
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i && ${LN_S} -f $$i ${DESTDIR}${libdir}/$${i%%.*}.sl'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%%.*}.sl'
|
||||
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
|
||||
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
|
||||
CLEAN_LIB=''
|
||||
;;
|
||||
ia64*-*-hpux*)
|
||||
AC_MSG_RESULT([HP-UX (Itanium)])
|
||||
LIB_CFLAGS='-fPIC -DPIC'
|
||||
LIB_LDFLAGS='-shared -Wl,+h,$$out'
|
||||
LIB_LDFLAGS_INSTALL_NAME=''
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.${LIB_MAJOR}'
|
||||
LINK_LIB='&& rm -f $${out%%.*}.so && ${LN_S} $$out $${out%%.*}.so'
|
||||
AS_IF([test x"$enable_rpath" != x"no"], [
|
||||
LDFLAGS_RPATH='-Wl,+b,${libdir}'
|
||||
])
|
||||
PLUGIN_CFLAGS='-fPIC -DPIC'
|
||||
PLUGIN_LDFLAGS='-shared'
|
||||
PLUGIN_SUFFIX='.so'
|
||||
LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
|
||||
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i && ${LN_S} -f $$i ${DESTDIR}${libdir}/$${i%%.*}.so'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%%.*}.so'
|
||||
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
|
||||
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
|
||||
CLEAN_LIB=''
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(ELF)
|
||||
LIB_CFLAGS='-fPIC -DPIC'
|
||||
LIB_LDFLAGS='-shared -Wl,-soname=$$out.${LIB_MAJOR}'
|
||||
LIB_LDFLAGS_INSTALL_NAME=''
|
||||
LIB_PREFIX='lib'
|
||||
LIB_SUFFIX='.so'
|
||||
AS_IF([test x"$enable_rpath" != x"no"], [
|
||||
LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
|
||||
])
|
||||
PLUGIN_CFLAGS='-fPIC -DPIC'
|
||||
PLUGIN_LDFLAGS='-shared'
|
||||
PLUGIN_SUFFIX='.so'
|
||||
LINK_PLUGIN='${LD} -o $$out ${PLUGIN_OBJS} ${PLUGIN_OBJS_EXTRA} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}'
|
||||
INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i'
|
||||
UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0'
|
||||
INSTALL_PLUGIN='&& ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i'
|
||||
UNINSTALL_PLUGIN='&& rm -f ${DESTDIR}${plugindir}/$$i'
|
||||
CLEAN_LIB=''
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(LIB_CFLAGS)
|
||||
AC_SUBST(LIB_LDFLAGS)
|
||||
AC_SUBST(LIB_LDFLAGS_INSTALL_NAME)
|
||||
AC_SUBST(LIB_PREFIX)
|
||||
AC_SUBST(LIB_SUFFIX)
|
||||
AC_SUBST(LINK_LIB)
|
||||
AC_SUBST(LDFLAGS_RPATH)
|
||||
AC_SUBST(PLUGIN_CFLAGS)
|
||||
AC_SUBST(PLUGIN_LDFLAGS)
|
||||
AC_SUBST(PLUGIN_SUFFIX)
|
||||
AC_SUBST(LINK_PLUGIN)
|
||||
AC_SUBST(INSTALL_LIB)
|
||||
AC_SUBST(UNINSTALL_LIB)
|
||||
AC_SUBST(INSTALL_PLUGIN)
|
||||
AC_SUBST(UNINSTALL_PLUGIN)
|
||||
AC_SUBST(CLEAN_LIB)
|
||||
])
|
||||
|
||||
AC_DEFUN([BUILDSYS_FRAMEWORK], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([BUILDSYS_CHECK_IOS])
|
||||
AC_REQUIRE([BUILDSYS_SHARED_LIB])
|
||||
|
||||
AC_CHECK_TOOL(CODESIGN, codesign)
|
||||
|
||||
case "$host_os" in
|
||||
darwin*)
|
||||
AS_IF([test x"$host_is_ios" = x"yes"], [
|
||||
FRAMEWORK_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
|
||||
FRAMEWORK_LDFLAGS_INSTALL_NAME='-Wl,-install_name,@executable_path/Frameworks/$$out/$${out%.framework}'
|
||||
], [
|
||||
FRAMEWORK_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
|
||||
FRAMEWORK_LDFLAGS_INSTALL_NAME='-Wl,-install_name,@executable_path/../Frameworks/$$out/$${out%.framework}'
|
||||
])
|
||||
|
||||
AC_SUBST(FRAMEWORK_LDFLAGS)
|
||||
AC_SUBST(FRAMEWORK_LDFLAGS_INSTALL_NAME)
|
||||
AC_SUBST(FRAMEWORK_LIBS)
|
||||
|
||||
$1
|
||||
;;
|
||||
esac
|
||||
])
|
957
buildsys.mk.in
Normal file
957
buildsys.mk.in
Normal file
|
@ -0,0 +1,957 @@
|
|||
#
|
||||
# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
|
||||
# 2017, 2018, 2020, 2021, 2022
|
||||
# Jonathan Schleifer <js@nil.im>
|
||||
#
|
||||
# https://fossil.nil.im/buildsys
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice is present in all copies.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CPP = @CPP@
|
||||
DC = @DC@
|
||||
ERLC = @ERLC@
|
||||
OBJC = @OBJC@
|
||||
OBJCXX = @OBJCXX@
|
||||
AR = @AR@
|
||||
LD = ${CC}
|
||||
RANLIB = @RANLIB@
|
||||
PYTHON = @PYTHON@
|
||||
ASFLAGS = @ASFLAGS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
DFLAGS = @DFLAGS@
|
||||
ERLCFLAGS = @ERLCFLAGS@
|
||||
OBJCFLAGS = @OBJCFLAGS@
|
||||
OBJCXXFLAGS = @OBJCXXFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LDFLAGS_RPATH = @LDFLAGS_RPATH@
|
||||
LIBS = @LIBS@
|
||||
PYTHON_FLAGS = @PYTHON_FLAGS@
|
||||
PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@
|
||||
PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@
|
||||
PROG_SUFFIX = @EXEEXT@
|
||||
LIB_CFLAGS = @LIB_CFLAGS@
|
||||
LIB_LDFLAGS = @LIB_LDFLAGS@
|
||||
LIB_LDFLAGS_INSTALL_NAME = @LIB_LDFLAGS_INSTALL_NAME@
|
||||
LIB_PREFIX = @LIB_PREFIX@
|
||||
LIB_SUFFIX = @LIB_SUFFIX@
|
||||
LINK_LIB = @LINK_LIB@
|
||||
AMIGA_LIB_CFLAGS = @AMIGA_LIB_CFLAGS@
|
||||
AMIGA_LIB_LDFLAGS = @AMIGA_LIB_LDFLAGS@
|
||||
PLUGIN_CFLAGS = @PLUGIN_CFLAGS@
|
||||
PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@
|
||||
PLUGIN_SUFFIX = @PLUGIN_SUFFIX@
|
||||
FRAMEWORK_LDFLAGS = @FRAMEWORK_LDFLAGS@
|
||||
FRAMEWORK_LDFLAGS_INSTALL_NAME = @FRAMEWORK_LDFLAGS_INSTALL_NAME@
|
||||
FRAMEWORK_LIBS = @FRAMEWORK_LIBS@
|
||||
CODESIGN = @CODESIGN@
|
||||
CODESIGN_IDENTITY ?= -
|
||||
CLEAN_LIB = @CLEAN_LIB@
|
||||
DEP_ASFLAGS = @DEP_ASFLAGS@
|
||||
DEP_CFLAGS = @DEP_CFLAGS@
|
||||
DEP_CXXFLAGS = @DEP_CXXFLAGS@
|
||||
DEP_OBJCFLAGS = @DEP_OBJCFLAGS@
|
||||
DEP_OBJCXXFLAGS = @DEP_OBJCXXFLAGS@
|
||||
LN_S = @LN_S@
|
||||
MKDIR_P = mkdir -p
|
||||
INSTALL = @INSTALL@
|
||||
SHELL = @SHELL@
|
||||
MSGFMT = @MSGFMT@
|
||||
JAVAC = @JAVAC@
|
||||
JAVACFLAGS = @JAVACFLAGS@
|
||||
JAR = @JAR@
|
||||
RC = @RC@
|
||||
BUILD_AND_HOST_ARE_DARWIN = @BUILD_AND_HOST_ARE_DARWIN@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
amigalibdir ?= ${prefix}/libs
|
||||
plugindir ?= ${libdir}/${PACKAGE_NAME}
|
||||
datarootdir = @datarootdir@
|
||||
datadir = @datadir@
|
||||
includedir = @includedir@
|
||||
includesubdir ?= ${PACKAGE_NAME}
|
||||
INSTALL_INCLUDES ?= yes
|
||||
localedir = @localedir@
|
||||
localename ?= ${PACKAGE_NAME}
|
||||
mandir = @mandir@
|
||||
mansubdir ?= man1
|
||||
|
||||
OBJS1 = ${SRCS:.c=.o}
|
||||
OBJS2 = ${OBJS1:.cc=.o}
|
||||
OBJS3 = ${OBJS2:.cxx=.o}
|
||||
OBJS4 = ${OBJS3:.d=.o}
|
||||
OBJS5 = ${OBJS4:.erl=.beam}
|
||||
OBJS6 = ${OBJS5:.java=.class}
|
||||
OBJS7 = ${OBJS6:.m=.o}
|
||||
OBJS8 = ${OBJS7:.mm=.o}
|
||||
OBJS9 = ${OBJS8:.py=.pyc}
|
||||
OBJS10 = ${OBJS9:.rc=.o}
|
||||
OBJS11 = ${OBJS10:.S=.o}
|
||||
OBJS += ${OBJS11:.xpm=.o}
|
||||
|
||||
LIB_OBJS = ${OBJS:.o=.lib.o}
|
||||
AMIGA_LIB_OBJS = ${OBJS:.o=.amigalib.o}
|
||||
PLUGIN_OBJS = ${OBJS:.o=.plugin.o}
|
||||
|
||||
DEPS = ${OBJS:.o=.dep} \
|
||||
${LIB_OBJS:.o=.dep} \
|
||||
${AMIGA_LIB_OBJS:.o=.dep} \
|
||||
${PLUGIN_OBJS:.o=.dep}
|
||||
|
||||
MO_FILES = ${LOCALES:.po=.mo}
|
||||
|
||||
.SILENT:
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .amigalib.o .beam .c .cc .class .cxx .d .erl .lib.o .java .mo .m .mm .o .plugin.o .po .py .pyc .rc .S .xpm
|
||||
.PHONY: all subdirs subdirs-after pre-depend depend install install-extra uninstall uninstall-extra clean distclean locales copy-headers-into-framework ${SUBDIRS} ${SUBDIRS_AFTER}
|
||||
|
||||
all:
|
||||
${MAKE} -s pre-all
|
||||
${MAKE} -s subdirs
|
||||
${MAKE} -s depend
|
||||
${MAKE} -s ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${STATIC_AMIGA_LIB} ${STATIC_AMIGA_LIB_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${FRAMEWORK} ${FRAMEWORK_NOINST} ${AMIGA_LIB} ${AMIGA_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} ${JARFILE} locales
|
||||
${MAKE} -s subdirs-after
|
||||
${MAKE} -s post-all
|
||||
|
||||
pre-all post-all:
|
||||
|
||||
subdirs: ${SUBDIRS}
|
||||
subdirs-after: ${SUBDIRS_AFTER}
|
||||
|
||||
${SUBDIRS} ${SUBDIRS_AFTER}:
|
||||
for i in $@; do \
|
||||
${DIR_ENTER}; \
|
||||
${MAKE} -s || exit $$?; \
|
||||
${DIR_LEAVE}; \
|
||||
done
|
||||
|
||||
depend: pre-depend
|
||||
: >.deps
|
||||
for i in "" ${DEPS}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
echo "-include \$${.CURDIR}/$$i" >>.deps; \
|
||||
done
|
||||
|
||||
pre-depend:
|
||||
|
||||
${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
out="$@"; \
|
||||
if ${LD} -o $@ ${OBJS} ${OBJS_EXTRA} ${LDFLAGS} ${LIBS}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
fi
|
||||
|
||||
${JARFILE}: ${EXT_DEPS} ${JAR_MANIFEST} ${OBJS} ${OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
if test x"${JAR_MANIFEST}" != x""; then \
|
||||
if ${JAR} cfm ${JARFILE} ${JAR_MANIFEST} ${OBJS} ${OBJS_EXTRA}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
fi \
|
||||
else \
|
||||
if ${JAR} cf ${JARFILE} ${OBJS} ${OBJS_EXTRA}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
fi \
|
||||
fi
|
||||
|
||||
${SHARED_LIB} ${SHARED_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
out="$@"; \
|
||||
if ${LD} -o $@ ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${LIB_LDFLAGS} ${LIB_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS} ${LINK_LIB}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
fi
|
||||
|
||||
${FRAMEWORK} ${FRAMEWORK_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
out="$@"; \
|
||||
if rm -fr $$out && ${MKDIR_P} $$out && ${MAKE} -s COPY_HEADERS_IF_SUBDIR=${includesubdir} COPY_HEADERS_DESTINATION=$$PWD/$@/Headers copy-headers-into-framework && if test -f Info.plist; then ${INSTALL} -m 644 Info.plist $$out/Info.plist; fi && if test -f module.modulemap; then ${MKDIR_P} $$out/Modules && ${INSTALL} -m 644 module.modulemap $$out/Modules/module.modulemap; fi && ${LD} -o $$out/$${out%.framework} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${FRAMEWORK_LDFLAGS} ${FRAMEWORK_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${FRAMEWORK_LIBS} && ${CODESIGN} -fs ${CODESIGN_IDENTITY} $$out; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
rm -fr $$out; false; \
|
||||
${LINK_FAILED}; \
|
||||
fi
|
||||
|
||||
copy-headers-into-framework:
|
||||
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
cd $$i || exit 1; \
|
||||
${MAKE} -s copy-headers-into-framework || exit $$?; \
|
||||
cd .. || exit 1; \
|
||||
done
|
||||
|
||||
if test x"${includesubdir}" = x"${COPY_HEADERS_IF_SUBDIR}"; then \
|
||||
for i in "" ${INCLUDES}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${MKDIR_P} $$(dirname ${COPY_HEADERS_DESTINATION}/$$i) || exit $$?; \
|
||||
${INSTALL} -m 644 $$i ${COPY_HEADERS_DESTINATION}/$$i || exit $$?; \
|
||||
done \
|
||||
fi
|
||||
|
||||
${AMIGA_LIB} ${AMIGA_LIB_NOINST}: ${EXT_DEPS} ${AMIGA_LIB_OBJS_START} ${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
if ${LD} -o $@ ${AMIGA_LIB_OBJS_START} ${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_EXTRA} ${AMIGA_LIB_LDFLAGS} ${AMIGA_LIB_LIBS}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
${LINK_FAILED}; \
|
||||
fi
|
||||
|
||||
${PLUGIN} ${PLUGIN_NOINST}: ${EXT_DEPS} ${PLUGIN_OBJS}
|
||||
${LINK_STATUS}
|
||||
out="$@"; \
|
||||
if @LINK_PLUGIN@; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
rm -fr $$out; false; \
|
||||
${LINK_FAILED}; \
|
||||
fi
|
||||
|
||||
${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
rm -f $@
|
||||
if test x"${BUILD_AND_HOST_ARE_DARWIN}" = x"yes"; then \
|
||||
if /usr/bin/libtool -static -o $@ ${OBJS} ${OBJS_EXTRA}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
rm -f $@; false; \
|
||||
${LINK_FAILED}; \
|
||||
fi; \
|
||||
else \
|
||||
out="$@"; \
|
||||
objs=""; \
|
||||
ars=""; \
|
||||
for i in ${OBJS} ${OBJS_EXTRA}; do \
|
||||
case $$i in \
|
||||
*.a) \
|
||||
ars="$$ars $$i" \
|
||||
;; \
|
||||
*.o) \
|
||||
objs="$$objs $$i" \
|
||||
;; \
|
||||
esac \
|
||||
done; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
mkdir -p $$dir; \
|
||||
cd $$dir; \
|
||||
${AR} x ../$$i; \
|
||||
for j in *.o; do \
|
||||
objs="$$objs $$dir/$$j"; \
|
||||
done; \
|
||||
cd ..; \
|
||||
done; \
|
||||
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
rm -f $@; false; \
|
||||
${LINK_FAILED}; \
|
||||
fi; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
rm -f $@
|
||||
if test x"${BUILD_AND_HOST_ARE_DARWIN}" = x"yes"; then \
|
||||
if /usr/bin/libtool -static -o $@ ${LIB_OBJS} ${LIB_OBJS_EXTRA}; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
rm -f $@; false; \
|
||||
${LINK_FAILED}; \
|
||||
fi; \
|
||||
else \
|
||||
out="$@"; \
|
||||
objs=""; \
|
||||
ars=""; \
|
||||
for i in ${LIB_OBJS} ${LIB_OBJS_EXTRA}; do \
|
||||
case $$i in \
|
||||
*.a) \
|
||||
ars="$$ars $$i" \
|
||||
;; \
|
||||
*.o) \
|
||||
objs="$$objs $$i" \
|
||||
;; \
|
||||
esac \
|
||||
done; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
mkdir -p $$dir; \
|
||||
cd $$dir; \
|
||||
${AR} x ../$$i; \
|
||||
for j in *.o; do \
|
||||
objs="$$objs $$dir/$$j"; \
|
||||
done; \
|
||||
cd ..; \
|
||||
done; \
|
||||
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
rm -f $@; false; \
|
||||
${LINK_FAILED}; \
|
||||
fi; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
${STATIC_AMIGA_LIB} ${STATIC_AMIGA_LIB_NOINST}: ${EXT_DEPS} ${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_EXTRA}
|
||||
${LINK_STATUS}
|
||||
rm -f $@
|
||||
out="$@"; \
|
||||
objs=""; \
|
||||
ars=""; \
|
||||
for i in ${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_EXTRA}; do \
|
||||
case $$i in \
|
||||
*.a) \
|
||||
ars="$$ars $$i" \
|
||||
;; \
|
||||
*.o) \
|
||||
objs="$$objs $$i" \
|
||||
;; \
|
||||
esac \
|
||||
done; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
mkdir -p $$dir; \
|
||||
cd $$dir; \
|
||||
${AR} x ../$$i; \
|
||||
for j in *.o; do \
|
||||
objs="$$objs $$dir/$$j"; \
|
||||
done; \
|
||||
cd ..; \
|
||||
done; \
|
||||
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
|
||||
${LINK_OK}; \
|
||||
else \
|
||||
rm -f $@; false; \
|
||||
${LINK_FAILED}; \
|
||||
fi; \
|
||||
for i in $$ars; do \
|
||||
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
|
||||
rm -fr $$dir; \
|
||||
done
|
||||
|
||||
locales: ${MO_FILES}
|
||||
|
||||
.c.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} ${DEP_CFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.c.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} ${DEP_CFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.c.amigalib.o:
|
||||
${COMPILE_AMIGA_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${AMIGA_LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} ${DEP_CFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_AMIGA_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_AMIGA_LIB_FAILED}; \
|
||||
fi
|
||||
.c.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} ${DEP_CFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
.cc.o .cxx.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} ${CXXFLAGS_$@} ${DEP_CXXFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.cc.lib.o .cxx.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CXX} ${LIB_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} ${CXXFLAGS_$@} ${DEP_CXXFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.cc.amigalib.o .cxx.amigalib.o:
|
||||
${COMPILE_AMIGA_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CXX} ${AMIGA_LIB_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} ${CXXFLAGS_$@} ${DEP_CXXFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_AMIGA_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_AMIGA_LIB_FAILED}; \
|
||||
fi
|
||||
.cc.plugin.o .cxx.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CXX} ${PLUGIN_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$<} ${CXXFLAGS_$@} ${DEP_CXXFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
.d.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if test x"$(basename ${DC})" = x"dmd"; then \
|
||||
if ${DC} ${DFLAGS} -c -of$@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi \
|
||||
else \
|
||||
if ${DC} ${DFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi \
|
||||
fi
|
||||
|
||||
.erl.beam:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${ERLC} ${ERLCFLAGS} -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
|
||||
.java.class:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${JAVAC} ${JAVACFLAGS} $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
|
||||
.m.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$<} ${OBJCFLAGS_$@} ${DEP_OBJCFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.m.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJC} ${LIB_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$<} ${OBJCFLAGS_$@} ${DEP_OBJCFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.m.amigalib.o:
|
||||
${COMPILE_AMIGA_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJC} ${AMIGA_LIB_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$<} ${OBJCFLAGS_$@} ${DEP_OBJCFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_AMIGA_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_AMIGA_LIB_FAILED}; \
|
||||
fi
|
||||
.m.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJC} ${PLUGIN_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$<} ${OBJCFLAGS_$@} ${DEP_OBJCFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
.mm.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJCXX} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$<} ${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.mm.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJCXX} ${LIB_CFLAGS} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$<} ${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.mm.amigalib.o:
|
||||
${COMPILE_AMIGA_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJCXX} ${AMIGA_LIB_CFLAGS} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$<} ${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_AMIGA_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_AMIGA_LIB_FAILED}; \
|
||||
fi
|
||||
.mm.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${OBJCXX} ${PLUGIN_CFLAGS} ${OBJCXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$<} ${OBJCXXFLAGS_$@} ${DEP_OBJCXXFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
.po.mo:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${MSGFMT} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
|
||||
.py.pyc:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${PYTHON} ${PYTHON_FLAGS} -c "import py_compile; py_compile.compile('$<')"; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
|
||||
.rc.o .rc.lib.o .rc.plugin.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${RC} ${RCFLAGS} ${CPPFLAGS} -J rc -O coff -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
|
||||
.S.o .S.amigalib.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${AS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$<} ${ASFLAGS_$@} ${DEP_ASFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.S.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${AS} ${LIB_CFLAGS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$<} ${ASFLAGS_$@} ${DEP_ASFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.S.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${AS} ${PLUGIN_CFLAGS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$<} ${ASFLAGS_$@} ${DEP_ASFLAGS} -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
.xpm.o:
|
||||
${COMPILE_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} -x c -c -o $@ $<; then \
|
||||
${COMPILE_OK}; \
|
||||
else \
|
||||
${COMPILE_FAILED}; \
|
||||
fi
|
||||
.xpm.lib.o:
|
||||
${COMPILE_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} -x c -c -o $@ $<; then \
|
||||
${COMPILE_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_LIB_FAILED}; \
|
||||
fi
|
||||
.xpm.amigalib.o:
|
||||
${COMPILE_AMIGA_LIB_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${AMIGA_LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} -x c -c -o $@ $<; then \
|
||||
${COMPILE_AMIGA_LIB_OK}; \
|
||||
else \
|
||||
${COMPILE_AMIGA_LIB_FAILED}; \
|
||||
fi
|
||||
.xpm.plugin.o:
|
||||
${COMPILE_PLUGIN_STATUS}
|
||||
in="$<"; \
|
||||
out="$@"; \
|
||||
if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$<} ${CFLAGS_$@} -x c -c -o $@ $<; then \
|
||||
${COMPILE_PLUGIN_OK}; \
|
||||
else \
|
||||
${COMPILE_PLUGIN_FAILED}; \
|
||||
fi
|
||||
|
||||
install: all install-extra
|
||||
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${DIR_ENTER}; \
|
||||
${MAKE} -s install || exit $$?; \
|
||||
${DIR_LEAVE}; \
|
||||
done
|
||||
|
||||
for i in "" ${SHARED_LIB}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${libdir} @INSTALL_LIB@; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in "" ${FRAMEWORK}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${INSTALL_STATUS}; \
|
||||
rm -fr ${DESTDIR}${prefix}/Library/Frameworks/$$i; \
|
||||
if ${MKDIR_P} ${DESTDIR}${prefix}/Library/Frameworks && cp -R $$i ${DESTDIR}${prefix}/Library/Frameworks/; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in "" ${AMIGA_LIB}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${amigalibdir} && ${INSTALL} -m 755 $$i ${DESTDIR}${amigalibdir}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in "" ${STATIC_LIB} ${STATIC_PIC_LIB} ${STATIC_AMIGA_LIB}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in "" ${PLUGIN}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${plugindir} @INSTALL_PLUGIN@; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in "" ${DATA}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} $$(dirname ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i) && ${INSTALL} -m 644 $$i ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in "" ${PROG}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
if test x"${INSTALL_INCLUDES}" = x"yes"; then \
|
||||
for i in "" ${INCLUDES}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} $$(dirname ${DESTDIR}${includedir}/${includesubdir}/$$i) && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
|
||||
for i in "" ${MO_FILES}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES && ${INSTALL} -m 644 $$i ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in "" ${MAN}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${INSTALL_STATUS}; \
|
||||
if ${MKDIR_P} ${DESTDIR}${mandir}/${mansubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
|
||||
${INSTALL_OK}; \
|
||||
else \
|
||||
${INSTALL_FAILED}; \
|
||||
fi \
|
||||
done
|
||||
|
||||
install-extra:
|
||||
|
||||
uninstall: uninstall-extra
|
||||
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${DIR_ENTER}; \
|
||||
${MAKE} -s uninstall || exit $$?; \
|
||||
${DIR_LEAVE}; \
|
||||
done
|
||||
|
||||
for i in "" ${SHARED_LIB}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
if test -f ${DESTDIR}${libdir}/$$i -o -f ${DESTDIR}${bindir}/$$i; then \
|
||||
if : @UNINSTALL_LIB@; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi; \
|
||||
done
|
||||
|
||||
for i in "" ${FRAMEWORK}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
if test -d ${DESTDIR}${prefix}/Library/Frameworks/$$i; then \
|
||||
if rm -fr ${DESTDIR}${prefix}/Library/Frameworks/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
rmdir ${DESTDIR}${prefix}/Library/Frameworks >/dev/null 2>&1 || true
|
||||
rmdir ${DESTDIR}${prefix}/Library >/dev/null 2>&1 || true
|
||||
|
||||
for i in "" ${STATIC_LIB} ${STATIC_PIC_LIB} ${STATIC_AMIGA_LIB}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
if test -f ${DESTDIR}${libdir}/$$i; then \
|
||||
if rm -f ${DESTDIR}${libdir}/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in "" ${PLUGIN}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
if test -e ${DESTDIR}${plugindir}/$$i; then \
|
||||
if : @UNINSTALL_PLUGIN@; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
rmdir ${DESTDIR}${plugindir} >/dev/null 2>&1 || true
|
||||
|
||||
for i in "" ${DATA}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
if test -f ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
|
||||
if rm -f ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi; \
|
||||
rmdir "$$(dirname ${DESTDIR}${datadir}/${PACKAGE_NAME}/$$i)" >/dev/null 2>&1 || true; \
|
||||
done
|
||||
rmdir ${DESTDIR}${datadir}/${PACKAGE_NAME} >/dev/null 2>&1 || true
|
||||
|
||||
for i in "" ${PROG}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
if test -f ${DESTDIR}${bindir}/$$i; then \
|
||||
if rm -f ${DESTDIR}${bindir}/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in "" ${INCLUDES}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
if test -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
|
||||
if rm -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
rmdir ${DESTDIR}${includedir}/${includesubdir} >/dev/null 2>&1 || true
|
||||
|
||||
for i in "" ${MO_FILES}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
if test -f ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
|
||||
if rm -f ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
for i in "" ${MAN}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
if test -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
|
||||
if rm -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
uninstall-extra:
|
||||
|
||||
clean:
|
||||
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${DIR_ENTER}; \
|
||||
${MAKE} -s clean || exit $$?; \
|
||||
${DIR_LEAVE}; \
|
||||
done
|
||||
|
||||
: >.deps
|
||||
|
||||
for i in "" ${DEPS} ${OBJS} ${OBJS_EXTRA} ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${AMIGA_LIB_OBJS} ${AMIGA_LIB_OBJS_START} ${AMIGA_LIB_OBJS_EXTRA} ${PLUGIN_OBJS} ${PROG} ${PROG_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${AMIGA_LIB} ${AMIGA_LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${STATIC_AMIGA_LIB} ${STATIC_AMIGA_LIB_NOINST} ${FRAMEWORK} ${PLUGIN} ${PLUGIN_NOINST} ${CLEAN_LIB} ${MO_FILES} ${CLEAN}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
if test -f $$i -o -d $$i; then \
|
||||
if rm -fr $$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
distclean: clean
|
||||
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
${DIR_ENTER}; \
|
||||
${MAKE} -s distclean || exit $$?; \
|
||||
${DIR_LEAVE}; \
|
||||
done
|
||||
|
||||
for i in "" ${DISTCLEAN} .deps *~; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
if test -f $$i -o -d $$i; then \
|
||||
if rm -fr $$i; then \
|
||||
${DELETE_OK}; \
|
||||
else \
|
||||
${DELETE_FAILED}; \
|
||||
fi \
|
||||
fi \
|
||||
done
|
||||
|
||||
print-hierarchy:
|
||||
for i in "" ${SUBDIRS} ${SUBDIRS_AFTER}; do \
|
||||
test x"$$i" = x"" && continue; \
|
||||
echo ${PRINT_HIERARCHY_PREFIX}$$i; \
|
||||
cd $$i || exit $$?; \
|
||||
${MAKE} -s PRINT_HIERARCHY_PREFIX=$$i/ print-hierarchy || exit $$?; \
|
||||
cd .. || exit $$?; \
|
||||
done
|
||||
|
||||
print-var:
|
||||
printf '%s\n' '${${VAR}}'
|
||||
|
||||
DIR_ENTER = printf "@TERM_EL@@TERM_SETAF6@Entering directory @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF6@.@TERM_SGR0@\n" "$$i"; cd $$i || exit $$?
|
||||
DIR_LEAVE = printf "@TERM_EL@@TERM_SETAF6@Leaving directory @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF6@.@TERM_SGR0@\n" "$$i"; cd .. || exit $$?
|
||||
COMPILE_STATUS = printf "@TERM_EL@@TERM_SETAF3@Compiling @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF3@...@TERM_SGR0@\r" "$<"
|
||||
COMPILE_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully compiled @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF2@.@TERM_SGR0@\n" "$<"
|
||||
COMPILE_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to compile @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF1@!@TERM_SGR0@\n" "$<"; exit $$err
|
||||
COMPILE_LIB_STATUS = printf "@TERM_EL@@TERM_SETAF3@Compiling @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF3@ (lib)...@TERM_SGR0@\r" "$<"
|
||||
COMPILE_LIB_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully compiled @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF2@ (lib).@TERM_SGR0@\n" "$<"
|
||||
COMPILE_LIB_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to compile @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF1@ (lib)!@TERM_SGR0@\n" "$<"; exit $$err
|
||||
COMPILE_AMIGA_LIB_STATUS = printf "@TERM_EL@@TERM_SETAF3@Compiling @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF3@ (Amiga lib)...@TERM_SGR0@\r" "$<"
|
||||
COMPILE_AMIGA_LIB_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully compiled @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF2@ (Amiga lib).@TERM_SGR0@\n" "$<"
|
||||
COMPILE_AMIGA_LIB_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to compile @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF1@ (Amiga lib)!@TERM_SGR0@\n" "$<"; exit $$err
|
||||
COMPILE_PLUGIN_STATUS = printf "@TERM_EL@@TERM_SETAF3@Compiling @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF3@ (plugin)...@TERM_SGR0@\r" "$<"
|
||||
COMPILE_PLUGIN_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully compiled @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF2@ (plugin).@TERM_SGR0@\n" "$<"
|
||||
COMPILE_PLUGIN_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to compile @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF1@ (plugin)!@TERM_SGR0@\n" "$<"; exit $$err
|
||||
LINK_STATUS = printf "@TERM_EL@@TERM_SETAF3@Linking @TERM_BOLD@$@@TERM_SGR0@@TERM_SETAF3@...@TERM_SGR0@\r"
|
||||
LINK_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully linked @TERM_BOLD@$@@TERM_SGR0@@TERM_SETAF2@.@TERM_SGR0@\n"
|
||||
LINK_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to link @TERM_BOLD@$@@TERM_SGR0@@TERM_SETAF1@!@TERM_SGR0@\n"; exit $$err
|
||||
INSTALL_STATUS = printf "@TERM_EL@@TERM_SETAF3@Installing @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF3@...@TERM_SGR0@\r" "$$i"
|
||||
INSTALL_OK = printf "@TERM_EL@@TERM_SETAF2@Successfully installed @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF2@.@TERM_SGR0@\n" "$$i"
|
||||
INSTALL_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to install @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF1@!@TERM_SGR0@\n" "$$i"; exit $$err
|
||||
DELETE_OK = printf "@TERM_EL@@TERM_SETAF4@Deleted @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF4@.@TERM_SGR0@\n" "$$i"
|
||||
DELETE_FAILED = err=$$?; printf "@TERM_EL@@TERM_SETAF1@Failed to delete @TERM_BOLD@%s@TERM_SGR0@@TERM_SETAF1@!@TERM_SGR0@\n" "$$i"; exit $$err
|
||||
|
||||
.CURDIR ?= .
|
||||
-include ${.CURDIR}/.deps
|
94
configure.ac
Normal file
94
configure.ac
Normal file
|
@ -0,0 +1,94 @@
|
|||
AC_INIT(Obj3DEngine, 0.1, js@nil.im)
|
||||
AC_CONFIG_SRCDIR(src)
|
||||
AC_CONFIG_AUX_DIR(build-aux)
|
||||
AC_CONFIG_MACRO_DIR(build-aux/m4)
|
||||
|
||||
for i in configure.ac build-aux/m4/*; do
|
||||
AS_IF([test $i -nt configure], [
|
||||
AC_MSG_ERROR([$i is newer than configure! Run ./autogen.sh!])
|
||||
])
|
||||
done
|
||||
|
||||
BUILDSYS_INIT
|
||||
|
||||
AC_CHECK_TOOL(OBJFW_CONFIG, objfw-config)
|
||||
AS_IF([test x$"$OBJFW_CONFIG" = x""], [
|
||||
AC_MSG_ERROR(You need ObjFW and objfw-config installed!)
|
||||
])
|
||||
|
||||
test x"$OBJC" = x"" && OBJC="$($OBJFW_CONFIG --objc)"
|
||||
|
||||
AC_LANG([Objective C])
|
||||
AC_PROG_OBJC
|
||||
AC_PROG_OBJCPP
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_INSTALL
|
||||
|
||||
CPP="$OBJCPP"
|
||||
CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $($OBJFW_CONFIG $OBJFW_CONFIG_FLAGS --cppflags)"
|
||||
OBJCFLAGS="$OBJCFLAGS $($OBJFW_CONFIG $OBJFW_CONFIG_FLAGS --objcflags)"
|
||||
LDFLAGS="$LDFLAGS $($OBJFW_CONFIG $OBJFW_CONFIG_FLAGS --ldflags)"
|
||||
FRAMEWORK_LIBS="$($OBJFW_CONFIG $OBJFW_CONFIG_FLAGS --framework-libs) $LIBS"
|
||||
LIBS="$($OBJFW_CONFIG $OBJFW_CONFIG_FLAGS --libs --rpath) $LIBS"
|
||||
|
||||
AX_CHECK_COMPILER_FLAGS(-Wdocumentation,
|
||||
[OBJCFLAGS="$OBJCFLAGS -Wdocumentation"])
|
||||
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_PROG_RANLIB
|
||||
AC_ARG_ENABLE(shared,
|
||||
AS_HELP_STRING([--disable-shared], [do not build shared library]))
|
||||
AS_IF([test x"$enable_shared" != x"no"], [
|
||||
BUILDSYS_SHARED_LIB
|
||||
AC_SUBST(OBJ3DENGINE_SHARED_LIB,
|
||||
'${LIB_PREFIX}obj3dengine${LIB_SUFFIX}')
|
||||
AC_SUBST(EXCEPTIONS_LIB_A, "exceptions.lib.a")
|
||||
AC_SUBST(EXCEPTIONS_EXCEPTIONS_LIB_A, "exceptions/exceptions.lib.a")
|
||||
|
||||
BUILDSYS_FRAMEWORK([
|
||||
AC_SUBST(OBJ3DENGINE_FRAMEWORK, "Obj3DEngine.framework")
|
||||
])
|
||||
])
|
||||
AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))
|
||||
AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [
|
||||
AC_SUBST(OBJ3DENGINE_STATIC_LIB, "libobj3dengine.a")
|
||||
AC_SUBST(EXCEPTIONS_A, "exceptions.a")
|
||||
AC_SUBST(EXCEPTIONS_EXCEPTIONS_A, "exceptions/exceptions.a")
|
||||
AC_SUBST(LIBOBJ3DENGINE_DEP, "../src/libobj3dengine.a")
|
||||
])
|
||||
|
||||
AS_IF([test x"$GOBJC" = x"yes"], [
|
||||
OBJCFLAGS="$OBJCFLAGS -Wall -Werror -Wwrite-strings -Wpointer-arith"
|
||||
])
|
||||
|
||||
AS_IF([test x"$cross_compiling" = x"yes"], [
|
||||
case "$host" in
|
||||
i?86-*-mingw*)
|
||||
AC_CHECK_PROG(WINE, wine, wine)
|
||||
;;
|
||||
x86_64-*-mingw*)
|
||||
AC_CHECK_PROG(WINE, wine64, wine64)
|
||||
;;
|
||||
esac
|
||||
AS_IF([test x"$WINE" != x""], [AC_SUBST(WRAPPER, "$WINE")])
|
||||
|
||||
AS_IF([test x"$with_wii" = x"yes"], [
|
||||
dnl Keep this lowercase, as WIILOAD is a variable used by
|
||||
dnl wiiload and thus likely already set by the user to something
|
||||
dnl that is not the path of the wiiload binary.
|
||||
AC_CHECK_PROG(wiiload, wiiload, wiiload)
|
||||
|
||||
AS_IF([test x"$wiiload" != x""], [
|
||||
AC_SUBST(WRAPPER, "$wiiload")
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
dnl We don't call AC_PROG_CPP, but only AC_PROG_OBJCPP and set CPP to OBJCPP
|
||||
dnl and add OBJCPPFLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself.
|
||||
AC_SUBST(CPP)
|
||||
AC_SUBST(CPPFLAGS)
|
||||
|
||||
AC_CONFIG_FILES([buildsys.mk extra.mk])
|
||||
AC_OUTPUT
|
12
extra.mk.in
Normal file
12
extra.mk.in
Normal file
|
@ -0,0 +1,12 @@
|
|||
OBJ3DENGINE_SHARED_LIB = @OBJ3DENGINE_SHARED_LIB@
|
||||
OBJ3DENGINE_STATIC_LIB = @OBJ3DENGINE_STATIC_LIB@
|
||||
OBJ3DENGINE_FRAMEWORK = @OBJ3DENGINE_FRAMEWORK@
|
||||
OBJ3DENGINE_LIB_MAJOR = 0
|
||||
OBJ3DENGINE_LIB_MINOR = 0
|
||||
OBJ3DENGINE_LIB_MAJOR_MINOR = ${OBJ3DENGINE_LIB_MAJOR}.${OBJ3DENGINE_LIB_MINOR}
|
||||
|
||||
EXCPETIONS_A = @EXCPETIONS_A@
|
||||
EXCEPTIONS_EXCPETIONS_A = @EXCEPTIONS_EXCPETIONS_A@
|
||||
EXCEPTIONS_EXCPETIONS_LIB_A = @EXCEPTIONS_EXCPETIONS_LIB_A@
|
||||
EXCEPTIONS_LIB_A = @EXCEPTIONS_LIB_A@
|
||||
LIBOBJ3DENGINE_DEP = @LIBOBJ3DENGINE_DEP@
|
19
src/Makefile
Normal file
19
src/Makefile
Normal file
|
@ -0,0 +1,19 @@
|
|||
include ../extra.mk
|
||||
|
||||
SUBDIRS = exceptions
|
||||
|
||||
SHARED_LIB = ${OBJ3DENGINE_SHARED_LIB}
|
||||
STATIC_LIB = ${OBJ3DENGINE_STATIC_LIB}
|
||||
FRAMEWORK = ${OBJ3DENGINE_FRAMEWORK}
|
||||
LIB_MAJOR = ${OBJ3DENGINE_LIB_MAJOR}
|
||||
LIB_MINOR = ${OBJ3DENGINE_LIB_MINOR}
|
||||
|
||||
INCLUDES := ${SRCS:.m=.h}
|
||||
|
||||
OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_A}
|
||||
LIB_OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_LIB_A}
|
||||
|
||||
include ../buildsys.mk
|
||||
|
||||
CPPFLAGS += -I. -Iexceptions
|
||||
LD = ${OBJC}
|
10
src/exceptions/Makefile
Normal file
10
src/exceptions/Makefile
Normal file
|
@ -0,0 +1,10 @@
|
|||
include ../../extra.mk
|
||||
|
||||
STATIC_PIC_LIB_NOINST = ${EXCEPTIONS_LIB_A}
|
||||
STATIC_LIB_NOINST = ${EXCEPTIONS_A}
|
||||
|
||||
INCLUDES = ${SRCS:.m=.h}
|
||||
|
||||
include ../../buildsys.mk
|
||||
|
||||
CPPFLAGS += -I. -I..
|
45
tests/Makefile
Normal file
45
tests/Makefile
Normal file
|
@ -0,0 +1,45 @@
|
|||
PROG_NOINST = tests${PROG_SUFFIX}
|
||||
SRCS = TestsAppDelegate.m
|
||||
|
||||
include ../buildsys.mk
|
||||
include ../extra.mk
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
rm -f libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR}
|
||||
rm -f libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR}
|
||||
rm -f obj3dengine${OBJ3DENGINE_LIB_MAJOR}.dll
|
||||
rm -f libobj3dengine.${OBJ3DENGINE_LIB_MAJOR}.dylib
|
||||
if test -f ../src/libobj3dengine.so; then \
|
||||
${LN_S} ../src/libobj3dengine.so \
|
||||
libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR}; \
|
||||
${LN_S} ../src/libobj3dengine.so \
|
||||
libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR}; \
|
||||
elif test -f ../src/libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR}; then \
|
||||
${LN_S} ../src/libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR} \
|
||||
libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR}; \
|
||||
fi
|
||||
if test -f ../src/obj3dengine${OBJ3DENGINE_LIB_MAJOR}.dll; then \
|
||||
${LN_S} ../src/obj3dengine${OBJ3DENGINE_LIB_MAJOR}.dll \
|
||||
obj3dengine${OBJ3DENGINE_LIB_MAJOR}.dll; \
|
||||
fi
|
||||
if test -f ../src/libobj3dengine.dylib; then \
|
||||
${LN_S} ../src/libobj3dengine.dylib \
|
||||
libobj3dengine.${OBJ3DENGINE_LIB_MAJOR}.dylib; \
|
||||
fi
|
||||
LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \
|
||||
DYLD_FRAMEWORK_PATH=../src$${DYLD_FRAMEWORK_PATH+:}$$DYLD_FRAMEWORK_PATH \
|
||||
DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \
|
||||
LIBRARY_PATH=.$${LIBRARY_PATH+:}$$LIBRARY_PATH \
|
||||
${WRAPPER} ./${PROG_NOINST}; EXIT=$$?; \
|
||||
rm -f libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR}; \
|
||||
rm -f libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR}; \
|
||||
rm -f obj3dengine${OBJ3DENGINE_LIB_MAJOR}.dll; \
|
||||
rm -f libobj3dengine.${OBJ3DENGINE_LIB_MAJOR}.dylib; \
|
||||
exit $$EXIT
|
||||
|
||||
${PROG_NOINST}: ${LIBOBJ3DENGINE_DEP}
|
||||
|
||||
CPPFLAGS += -I../src -I../src/exceptions
|
||||
LIBS := -L../src -lobj3dengine ${LIBS}
|
||||
LD = ${OBJC}
|
28
tests/TestsAppDelegate.m
Normal file
28
tests/TestsAppDelegate.m
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Jonathan Schleifer <js@nil.im>
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This file is part of Obj3DEngine. It may be distributed under the terms of
|
||||
* the Q Public License 1.0, which can be found in the file LICENSE.QPL
|
||||
* included in the packaging of this file.
|
||||
*
|
||||
* Alternatively, it may be distributed under the terms of the GNU General
|
||||
* Public License, either version 2 or 3, which can be found in the file
|
||||
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of
|
||||
* this file.
|
||||
*/
|
||||
|
||||
#import <ObjFW/ObjFW.h>
|
||||
|
||||
@interface TestsAppDelegate: OFObject <OFApplicationDelegate>
|
||||
@end
|
||||
|
||||
OF_APPLICATION_DELEGATE(TestsAppDelegate)
|
||||
|
||||
@implementation TestsAppDelegate
|
||||
- (void)applicationDidFinishLaunching: (OFNotification *)notification
|
||||
{
|
||||
[OFApplication terminate];
|
||||
}
|
||||
@end
|
Loading…
Add table
Add a link
Reference in a new issue