builds now

This commit is contained in:
NishiOwO 2025-04-06 04:55:24 +09:00
parent 2a91f8be0f
commit fce1ab40cf
No known key found for this signature in database
GPG Key ID: 27EF69B208EB9343
13 changed files with 967 additions and 129 deletions

View File

@ -218,6 +218,12 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GL_MORE_CFLAGS = @GL_MORE_CFLAGS@
GL_MORE_LIBS = @GL_MORE_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@ -229,7 +235,13 @@ LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NB_BACKEND = @NB_BACKEND@
NB_CPPFLAGS = @NB_CPPFLAGS@
NB_DRIVER = @NB_DRIVER@
NB_LDADD = @NB_LDADD@
OBJEXT = @OBJEXT@
ODE_CFLAGS = @ODE_CFLAGS@
ODE_LIBS = @ODE_LIBS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@

View File

@ -1 +1 @@
AM_CPPFLAGS = -I$(top_srcdir)/engine/include -I$(top_srcdir)/external/lua -I$(top_srcdir)/external/stb -I$(top_srcdir)/external/zlib -I$(top_srcdir)/deps/include
AM_CPPFLAGS = @NB_CPPFLAGS@ -DDRV_@NB_DRIVER@ -DUSE_@NB_BACKEND@ -I$(top_srcdir)/engine/include -I$(top_srcdir)/external/lua -I$(top_srcdir)/external/stb -I$(top_srcdir)/external/zlib -I$(top_srcdir)/deps/include

View File

@ -417,7 +417,7 @@ $config_commands
Report bugs to the package provider."
ac_cs_config='--host=x86_64-w64-mingw32 host_alias=x86_64-w64-mingw32'
ac_cs_config='--host=x86_64-w64-mingw32 --with-wgl host_alias=x86_64-w64-mingw32'
ac_cs_version="\
NishBox config.status 1.0.0
configured by ./configure, generated by GNU Autoconf 2.72,
@ -498,7 +498,7 @@ if $ac_cs_silent; then
fi
if $ac_cs_recheck; then
set X /bin/sh './configure' '--host=x86_64-w64-mingw32' 'host_alias=x86_64-w64-mingw32' $ac_configure_extra_args --no-create --no-recursion
set X /bin/sh './configure' '--host=x86_64-w64-mingw32' '--with-wgl' 'host_alias=x86_64-w64-mingw32' $ac_configure_extra_args --no-create --no-recursion
shift
\printf "%s\n" "running CONFIG_SHELL=/bin/sh $*" >&6
CONFIG_SHELL='/bin/sh'
@ -518,7 +518,7 @@ _ASBOX
#
# INIT-COMMANDS
#
AMDEP_TRUE="" MAKE="make"
AMDEP_TRUE="" MAKE="gmake"
# Handling of arguments.
@ -597,6 +597,18 @@ S["am__EXEEXT_FALSE"]="#"
S["am__EXEEXT_TRUE"]=""
S["LTLIBOBJS"]=""
S["LIBOBJS"]=""
S["NB_LDADD"]="-lgdi32 -lws2_32 -lopengl32 -lglu32 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lode"
S["NB_CPPFLAGS"]=" -I/usr/pkg/include"
S["NB_BACKEND"]="WGL"
S["NB_DRIVER"]="OPENGL"
S["ODE_LIBS"]="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lode"
S["ODE_CFLAGS"]="-I/usr/pkg/include"
S["GLU_LIBS"]="-lglu32"
S["GLU_CFLAGS"]=""
S["GL_LIBS"]="-lopengl32"
S["GL_CFLAGS"]=""
S["GL_MORE_LIBS"]="-lgdi32"
S["GL_MORE_CFLAGS"]=""
S["PKG_CONFIG_LIBDIR"]=""
S["PKG_CONFIG_PATH"]=""
S["PKG_CONFIG"]="/usr/pkg/bin/pkg-config"

810
configure vendored
View File

@ -609,6 +609,18 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
NB_LDADD
NB_CPPFLAGS
NB_BACKEND
NB_DRIVER
ODE_LIBS
ODE_CFLAGS
GLU_LIBS
GLU_CFLAGS
GL_LIBS
GL_CFLAGS
GL_MORE_LIBS
GL_MORE_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
@ -705,6 +717,9 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_silent_rules
with_glx
with_wgl
with_glfw
enable_dependency_tracking
'
ac_precious_vars='build_alias
@ -717,7 +732,15 @@ LIBS
CPPFLAGS
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR'
PKG_CONFIG_LIBDIR
GL_MORE_CFLAGS
GL_MORE_LIBS
GL_CFLAGS
GL_LIBS
GLU_CFLAGS
GLU_LIBS
ODE_CFLAGS
ODE_LIBS'
# Initialize some variables set by options.
@ -1348,6 +1371,13 @@ Optional Features:
--disable-dependency-tracking
speeds up one-time build
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-glx Build with GLX backend
--with-wgl Build with WGL backend
--with-glfw Build with GLFW backend
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
@ -1361,6 +1391,16 @@ Some influential environment variables:
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
GL_MORE_CFLAGS
C compiler flags for GL_MORE, overriding pkg-config
GL_MORE_LIBS
linker flags for GL_MORE, overriding pkg-config
GL_CFLAGS C compiler flags for GL, overriding pkg-config
GL_LIBS linker flags for GL, overriding pkg-config
GLU_CFLAGS C compiler flags for GLU, overriding pkg-config
GLU_LIBS linker flags for GLU, overriding pkg-config
ODE_CFLAGS C compiler flags for ODE, overriding pkg-config
ODE_LIBS linker flags for ODE, overriding pkg-config
Use these variables to override the choices made by 'configure' or to help
it to find libraries and programs with nonstandard names/locations.
@ -1482,6 +1522,54 @@ fi
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
}
then :
ac_retval=0
else case e in #(
e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1 ;;
esac
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_link
ac_configure_args_raw=
for ac_arg
do
@ -2894,6 +2982,28 @@ fi
# Check whether --with-glx was given.
if test ${with_glx+y}
then :
withval=$with_glx;
fi
# Check whether --with-wgl was given.
if test ${with_wgl+y}
then :
withval=$with_wgl;
fi
# Check whether --with-glfw was given.
if test ${with_glfw+y}
then :
withval=$with_glfw;
fi
@ -5549,7 +5659,698 @@ if test -z "$PKG_CONFIG"; then
fi
NB_DRIVER=OPENGL
NB_BACKEND=GLX
NB_BACKEND=
if test "x$with_glx" = "xyes"
then :
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x11" >&5
printf %s "checking for x11... " >&6; }
if test -n "$GL_MORE_CFLAGS"; then
pkg_cv_GL_MORE_CFLAGS="$GL_MORE_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
($PKG_CONFIG --exists --print-errors "x11") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GL_MORE_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$GL_MORE_LIBS"; then
pkg_cv_GL_MORE_LIBS="$GL_MORE_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
($PKG_CONFIG --exists --print-errors "x11") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GL_MORE_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
GL_MORE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1`
else
GL_MORE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GL_MORE_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (x11) were not met:
$GL_MORE_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables GL_MORE_CFLAGS
and GL_MORE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables GL_MORE_CFLAGS
and GL_MORE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
GL_MORE_CFLAGS=$pkg_cv_GL_MORE_CFLAGS
GL_MORE_LIBS=$pkg_cv_GL_MORE_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
fi
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gl" >&5
printf %s "checking for gl... " >&6; }
if test -n "$GL_CFLAGS"; then
pkg_cv_GL_CFLAGS="$GL_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl\""; } >&5
($PKG_CONFIG --exists --print-errors "gl") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "gl" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$GL_LIBS"; then
pkg_cv_GL_LIBS="$GL_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl\""; } >&5
($PKG_CONFIG --exists --print-errors "gl") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "gl" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gl" 2>&1`
else
GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gl" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GL_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (gl) were not met:
$GL_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables GL_CFLAGS
and GL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables GL_CFLAGS
and GL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
GL_CFLAGS=$pkg_cv_GL_CFLAGS
GL_LIBS=$pkg_cv_GL_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
fi
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glu" >&5
printf %s "checking for glu... " >&6; }
if test -n "$GLU_CFLAGS"; then
pkg_cv_GLU_CFLAGS="$GLU_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glu\""; } >&5
($PKG_CONFIG --exists --print-errors "glu") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GLU_CFLAGS=`$PKG_CONFIG --cflags "glu" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$GLU_LIBS"; then
pkg_cv_GLU_LIBS="$GLU_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glu\""; } >&5
($PKG_CONFIG --exists --print-errors "glu") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GLU_LIBS=`$PKG_CONFIG --libs "glu" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
GLU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glu" 2>&1`
else
GLU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glu" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GLU_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (glu) were not met:
$GLU_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables GLU_CFLAGS
and GLU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables GLU_CFLAGS
and GLU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
GLU_CFLAGS=$pkg_cv_GLU_CFLAGS
GLU_LIBS=$pkg_cv_GLU_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
fi
NB_BACKEND=GLX
fi
if test "x$with_wgl" = "xyes"
then :
:
GL_MORE_LIBS="-lgdi32"
GL_LIBS="-lopengl32"
GLU_LIBS="-lglu32"
NB_BACKEND=WGL
fi
if test "x$with_glfw" = "xyes"
then :
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glfw3" >&5
printf %s "checking for glfw3... " >&6; }
if test -n "$GL_CFLAGS"; then
pkg_cv_GL_CFLAGS="$GL_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glfw3\""; } >&5
($PKG_CONFIG --exists --print-errors "glfw3") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "glfw3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$GL_LIBS"; then
pkg_cv_GL_LIBS="$GL_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glfw3\""; } >&5
($PKG_CONFIG --exists --print-errors "glfw3") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "glfw3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glfw3" 2>&1`
else
GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glfw3" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GL_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (glfw3) were not met:
$GL_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables GL_CFLAGS
and GL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables GL_CFLAGS
and GL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
GL_CFLAGS=$pkg_cv_GL_CFLAGS
GL_LIBS=$pkg_cv_GL_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
fi
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glu" >&5
printf %s "checking for glu... " >&6; }
if test -n "$GLU_CFLAGS"; then
pkg_cv_GLU_CFLAGS="$GLU_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glu\""; } >&5
($PKG_CONFIG --exists --print-errors "glu") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GLU_CFLAGS=`$PKG_CONFIG --cflags "glu" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$GLU_LIBS"; then
pkg_cv_GLU_LIBS="$GLU_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glu\""; } >&5
($PKG_CONFIG --exists --print-errors "glu") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GLU_LIBS=`$PKG_CONFIG --libs "glu" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
GLU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glu" 2>&1`
else
GLU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glu" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GLU_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (glu) were not met:
$GLU_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables GLU_CFLAGS
and GLU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables GLU_CFLAGS
and GLU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
GLU_CFLAGS=$pkg_cv_GLU_CFLAGS
GLU_LIBS=$pkg_cv_GLU_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
fi
NB_BACKEND=GLFW
fi
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ode" >&5
printf %s "checking for ode... " >&6; }
if test -n "$ODE_CFLAGS"; then
pkg_cv_ODE_CFLAGS="$ODE_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ode\""; } >&5
($PKG_CONFIG --exists --print-errors "ode") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_ODE_CFLAGS=`$PKG_CONFIG --cflags "ode" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$ODE_LIBS"; then
pkg_cv_ODE_LIBS="$ODE_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ode\""; } >&5
($PKG_CONFIG --exists --print-errors "ode") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_ODE_LIBS=`$PKG_CONFIG --libs "ode" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
ODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ode" 2>&1`
else
ODE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ode" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$ODE_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (ode) were not met:
$ODE_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables ODE_CFLAGS
and ODE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables ODE_CFLAGS
and ODE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details" "$LINENO" 5; }
else
ODE_CFLAGS=$pkg_cv_ODE_CFLAGS
ODE_LIBS=$pkg_cv_ODE_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
fi
if test "x$NB_BACKEND" = "x"
then :
printf "%s\n" "Backend cannot be empty; see --help"
as_fn_exit 1
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lws2_32" >&5
printf %s "checking for socket in -lws2_32... " >&6; }
if test ${ac_cv_lib_ws2_32_socket+y}
then :
printf %s "(cached) " >&6
else case e in #(
e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lws2_32 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply.
The 'extern "C"' is for builds by C++ compilers;
although this is not generally supported in C code supporting it here
has little cost and some practical benefit (sr 110532). */
#ifdef __cplusplus
extern "C"
#endif
char socket (void);
int
main (void)
{
return socket ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_ws2_32_socket=yes
else case e in #(
e) ac_cv_lib_ws2_32_socket=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_socket" >&5
printf "%s\n" "$ac_cv_lib_ws2_32_socket" >&6; }
if test "x$ac_cv_lib_ws2_32_socket" = xyes
then :
SOCKET_LIBS="-lws2_32"
else case e in #(
e) : ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
printf %s "checking for socket in -lsocket... " >&6; }
if test ${ac_cv_lib_socket_socket+y}
then :
printf %s "(cached) " >&6
else case e in #(
e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply.
The 'extern "C"' is for builds by C++ compilers;
although this is not generally supported in C code supporting it here
has little cost and some practical benefit (sr 110532). */
#ifdef __cplusplus
extern "C"
#endif
char socket (void);
int
main (void)
{
return socket ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_socket_socket=yes
else case e in #(
e) ac_cv_lib_socket_socket=no ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
if test "x$ac_cv_lib_socket_socket" = xyes
then :
SOCKET_LIBS="-lsocket"
else case e in #(
e) : ;;
esac
fi
NB_CPPFLAGS="$GL_MORE_CFLAGS $GL_CFLAGS $GLU_CFLAGS $ODE_CFLAGS"
NB_LDADD="$GL_MORE_LIBS $SOCKET_LIBS $GL_LIBS $GLU_LIBS $ODE_LIBS"
ac_config_files="$ac_config_files Makefile src/Makefile engine/Makefile"
@ -6862,3 +7663,8 @@ printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2
fi
printf "%s\n" "----------------------------------"
printf "%s\n" "Driver : $NB_DRIVER"
printf "%s\n" "Backend : $NB_BACKEND"
printf "%s\n" "----------------------------------"

View File

@ -1,6 +1,10 @@
AC_INIT([NishBox], [1.0.0])
AM_INIT_AUTOMAKE([subdir-objects foreign])
AC_ARG_WITH([glx], AS_HELP_STRING([--with-glx], [Build with GLX backend]))
AC_ARG_WITH([wgl], AS_HELP_STRING([--with-wgl], [Build with WGL backend]))
AC_ARG_WITH([glfw], AS_HELP_STRING([--with-glfw], [Build with GLFW backend]))
AM_PROG_AR
AC_PROG_RANLIB
AC_PROG_CC
@ -8,7 +12,46 @@ AC_PROG_CC
PKG_PROG_PKG_CONFIG
NB_DRIVER=OPENGL
NB_BACKEND=GLX
NB_BACKEND=
AS_IF([test "x$with_glx" = "xyes"], [
PKG_CHECK_MODULES([GL_MORE], [x11])
PKG_CHECK_MODULES([GL], [gl])
PKG_CHECK_MODULES([GLU], [glu])
NB_BACKEND=GLX
])
AS_IF([test "x$with_wgl" = "xyes"], [
:
GL_MORE_LIBS="-lgdi32"
GL_LIBS="-lopengl32"
GLU_LIBS="-lglu32"
NB_BACKEND=WGL
])
AS_IF([test "x$with_glfw" = "xyes"], [
PKG_CHECK_MODULES([GL], [glfw3])
PKG_CHECK_MODULES([GLU], [glu])
NB_BACKEND=GLFW
])
PKG_CHECK_MODULES([ODE], [ode])
AS_IF([test "x$NB_BACKEND" = "x"], [
AS_ECHO("Backend cannot be empty; see --help")
AS_EXIT(1)
])
AC_CHECK_LIB(ws2_32,socket,SOCKET_LIBS="-lws2_32",:)
AC_CHECK_LIB(socket,socket,SOCKET_LIBS="-lsocket",:)
NB_CPPFLAGS="$GL_MORE_CFLAGS $GL_CFLAGS $GLU_CFLAGS $ODE_CFLAGS"
NB_LDADD="$GL_MORE_LIBS $SOCKET_LIBS $GL_LIBS $GLU_LIBS $ODE_LIBS"
AC_SUBST(NB_DRIVER)
AC_SUBST(NB_BACKEND)
AC_SUBST(NB_CPPFLAGS)
AC_SUBST(NB_LDADD)
AC_CONFIG_FILES([
Makefile
@ -16,3 +59,8 @@ AC_CONFIG_FILES([
engine/Makefile
])
AC_OUTPUT
AS_ECHO("----------------------------------")
AS_ECHO("Driver : $NB_DRIVER")
AS_ECHO("Backend : $NB_BACKEND")
AS_ECHO("----------------------------------")

View File

@ -1,3 +1,3 @@
include $(top_srcdir)/common-automake.mk
lib_LIBRARIES = libnishbox.a
libnishbox_a_SOURCES = nb_core.c nb_draw_common.c nb_font.c nb_log.c nb_math.c nb_mesh.c nb_model.c nb_physics.c nb_stb_image.c nb_texture.c nb_version.c $(NB_DRIVER)/nb_driver.c $(NB_DRIVER)/nb_graphics.c $(NB_DRIVER)/$(NB_BACKEND)/nb_draw.c
libnishbox_a_SOURCES = nb_core.c nb_draw_common.c nb_font.c nb_log.c nb_math.c nb_mesh.c nb_model.c nb_physics.c nb_stb_image.c nb_texture.c nb_version.c @NB_DRIVER@/nb_driver.c @NB_DRIVER@/nb_graphic.c @NB_DRIVER@/@NB_BACKEND@/nb_draw.c

View File

@ -136,9 +136,9 @@ am_libnishbox_a_OBJECTS = nb_core.$(OBJEXT) nb_draw_common.$(OBJEXT) \
nb_font.$(OBJEXT) nb_log.$(OBJEXT) nb_math.$(OBJEXT) \
nb_mesh.$(OBJEXT) nb_model.$(OBJEXT) nb_physics.$(OBJEXT) \
nb_stb_image.$(OBJEXT) nb_texture.$(OBJEXT) \
nb_version.$(OBJEXT) $(NB_DRIVER)/nb_driver.$(OBJEXT) \
$(NB_DRIVER)/nb_graphics.$(OBJEXT) \
$(NB_DRIVER)/$(NB_BACKEND)/nb_draw.$(OBJEXT)
nb_version.$(OBJEXT) @NB_DRIVER@/nb_driver.$(OBJEXT) \
@NB_DRIVER@/nb_graphic.$(OBJEXT) \
@NB_DRIVER@/@NB_BACKEND@/nb_draw.$(OBJEXT)
libnishbox_a_OBJECTS = $(am_libnishbox_a_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@ -155,15 +155,15 @@ am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = $(NB_DRIVER)/$(DEPDIR)/nb_driver.Po \
$(NB_DRIVER)/$(DEPDIR)/nb_graphics.Po \
$(NB_DRIVER)/$(NB_BACKEND)/$(DEPDIR)/nb_draw.Po \
./$(DEPDIR)/nb_core.Po ./$(DEPDIR)/nb_draw_common.Po \
./$(DEPDIR)/nb_font.Po ./$(DEPDIR)/nb_log.Po \
./$(DEPDIR)/nb_math.Po ./$(DEPDIR)/nb_mesh.Po \
./$(DEPDIR)/nb_model.Po ./$(DEPDIR)/nb_physics.Po \
./$(DEPDIR)/nb_stb_image.Po ./$(DEPDIR)/nb_texture.Po \
./$(DEPDIR)/nb_version.Po
am__depfiles_remade = ./$(DEPDIR)/nb_core.Po \
./$(DEPDIR)/nb_draw_common.Po ./$(DEPDIR)/nb_font.Po \
./$(DEPDIR)/nb_log.Po ./$(DEPDIR)/nb_math.Po \
./$(DEPDIR)/nb_mesh.Po ./$(DEPDIR)/nb_model.Po \
./$(DEPDIR)/nb_physics.Po ./$(DEPDIR)/nb_stb_image.Po \
./$(DEPDIR)/nb_texture.Po ./$(DEPDIR)/nb_version.Po \
@NB_DRIVER@/$(DEPDIR)/nb_driver.Po \
@NB_DRIVER@/$(DEPDIR)/nb_graphic.Po \
@NB_DRIVER@/@NB_BACKEND@/$(DEPDIR)/nb_draw.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@ -226,6 +226,12 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GL_MORE_CFLAGS = @GL_MORE_CFLAGS@
GL_MORE_LIBS = @GL_MORE_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@ -237,7 +243,13 @@ LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NB_BACKEND = @NB_BACKEND@
NB_CPPFLAGS = @NB_CPPFLAGS@
NB_DRIVER = @NB_DRIVER@
NB_LDADD = @NB_LDADD@
OBJEXT = @OBJEXT@
ODE_CFLAGS = @ODE_CFLAGS@
ODE_LIBS = @ODE_LIBS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -298,9 +310,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I$(top_srcdir)/engine/include -I$(top_srcdir)/external/lua -I$(top_srcdir)/external/stb -I$(top_srcdir)/external/zlib -I$(top_srcdir)/deps/include
AM_CPPFLAGS = @NB_CPPFLAGS@ -DDRV_@NB_DRIVER@ -DUSE_@NB_BACKEND@ -I$(top_srcdir)/engine/include -I$(top_srcdir)/external/lua -I$(top_srcdir)/external/stb -I$(top_srcdir)/external/zlib -I$(top_srcdir)/deps/include
lib_LIBRARIES = libnishbox.a
libnishbox_a_SOURCES = nb_core.c nb_draw_common.c nb_font.c nb_log.c nb_math.c nb_mesh.c nb_model.c nb_physics.c nb_stb_image.c nb_texture.c nb_version.c $(NB_DRIVER)/nb_driver.c $(NB_DRIVER)/nb_graphics.c $(NB_DRIVER)/$(NB_BACKEND)/nb_draw.c
libnishbox_a_SOURCES = nb_core.c nb_draw_common.c nb_font.c nb_log.c nb_math.c nb_mesh.c nb_model.c nb_physics.c nb_stb_image.c nb_texture.c nb_version.c @NB_DRIVER@/nb_driver.c @NB_DRIVER@/nb_graphic.c @NB_DRIVER@/@NB_BACKEND@/nb_draw.c
all: all-am
.SUFFIXES:
@ -366,25 +378,25 @@ uninstall-libLIBRARIES:
clean-libLIBRARIES:
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
$(NB_DRIVER)/$(am__dirstamp):
@$(MKDIR_P) $(NB_DRIVER)
@: > $(NB_DRIVER)/$(am__dirstamp)
$(NB_DRIVER)/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) $(NB_DRIVER)/$(DEPDIR)
@: > $(NB_DRIVER)/$(DEPDIR)/$(am__dirstamp)
$(NB_DRIVER)/nb_driver.$(OBJEXT): $(NB_DRIVER)/$(am__dirstamp) \
$(NB_DRIVER)/$(DEPDIR)/$(am__dirstamp)
$(NB_DRIVER)/nb_graphics.$(OBJEXT): $(NB_DRIVER)/$(am__dirstamp) \
$(NB_DRIVER)/$(DEPDIR)/$(am__dirstamp)
$(NB_DRIVER)/$(NB_BACKEND)/$(am__dirstamp):
@$(MKDIR_P) $(NB_DRIVER)/$(NB_BACKEND)
@: > $(NB_DRIVER)/$(NB_BACKEND)/$(am__dirstamp)
$(NB_DRIVER)/$(NB_BACKEND)/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) $(NB_DRIVER)/$(NB_BACKEND)/$(DEPDIR)
@: > $(NB_DRIVER)/$(NB_BACKEND)/$(DEPDIR)/$(am__dirstamp)
$(NB_DRIVER)/$(NB_BACKEND)/nb_draw.$(OBJEXT): \
$(NB_DRIVER)/$(NB_BACKEND)/$(am__dirstamp) \
$(NB_DRIVER)/$(NB_BACKEND)/$(DEPDIR)/$(am__dirstamp)
@NB_DRIVER@/$(am__dirstamp):
@$(MKDIR_P) @NB_DRIVER@
@: > @NB_DRIVER@/$(am__dirstamp)
@NB_DRIVER@/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) @NB_DRIVER@/$(DEPDIR)
@: > @NB_DRIVER@/$(DEPDIR)/$(am__dirstamp)
@NB_DRIVER@/nb_driver.$(OBJEXT): @NB_DRIVER@/$(am__dirstamp) \
@NB_DRIVER@/$(DEPDIR)/$(am__dirstamp)
@NB_DRIVER@/nb_graphic.$(OBJEXT): @NB_DRIVER@/$(am__dirstamp) \
@NB_DRIVER@/$(DEPDIR)/$(am__dirstamp)
@NB_DRIVER@/@NB_BACKEND@/$(am__dirstamp):
@$(MKDIR_P) @NB_DRIVER@/@NB_BACKEND@
@: > @NB_DRIVER@/@NB_BACKEND@/$(am__dirstamp)
@NB_DRIVER@/@NB_BACKEND@/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) @NB_DRIVER@/@NB_BACKEND@/$(DEPDIR)
@: > @NB_DRIVER@/@NB_BACKEND@/$(DEPDIR)/$(am__dirstamp)
@NB_DRIVER@/@NB_BACKEND@/nb_draw.$(OBJEXT): \
@NB_DRIVER@/@NB_BACKEND@/$(am__dirstamp) \
@NB_DRIVER@/@NB_BACKEND@/$(DEPDIR)/$(am__dirstamp)
libnishbox.a: $(libnishbox_a_OBJECTS) $(libnishbox_a_DEPENDENCIES) $(EXTRA_libnishbox_a_DEPENDENCIES)
$(AM_V_at)-rm -f libnishbox.a
@ -393,15 +405,12 @@ libnishbox.a: $(libnishbox_a_OBJECTS) $(libnishbox_a_DEPENDENCIES) $(EXTRA_libni
mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -f $(NB_DRIVER)/$(NB_BACKEND)/*.$(OBJEXT)
-rm -f $(NB_DRIVER)/*.$(OBJEXT)
-rm -f @NB_DRIVER@/*.$(OBJEXT)
-rm -f @NB_DRIVER@/@NB_BACKEND@/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@$(NB_DRIVER)/$(DEPDIR)/nb_driver.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@$(NB_DRIVER)/$(DEPDIR)/nb_graphics.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@$(NB_DRIVER)/$(NB_BACKEND)/$(DEPDIR)/nb_draw.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nb_core.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nb_draw_common.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nb_font.Po@am__quote@ # am--include-marker
@ -413,6 +422,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nb_stb_image.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nb_texture.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nb_version.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@@NB_DRIVER@/$(DEPDIR)/nb_driver.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@@NB_DRIVER@/$(DEPDIR)/nb_graphic.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@@NB_DRIVER@/@NB_BACKEND@/$(DEPDIR)/nb_draw.Po@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@ -553,10 +565,10 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(NB_DRIVER)/$(DEPDIR)/$(am__dirstamp)" || rm -f $(NB_DRIVER)/$(DEPDIR)/$(am__dirstamp)
-test -z "$(NB_DRIVER)/$(NB_BACKEND)/$(DEPDIR)/$(am__dirstamp)" || rm -f $(NB_DRIVER)/$(NB_BACKEND)/$(DEPDIR)/$(am__dirstamp)
-test -z "$(NB_DRIVER)/$(NB_BACKEND)/$(am__dirstamp)" || rm -f $(NB_DRIVER)/$(NB_BACKEND)/$(am__dirstamp)
-test -z "$(NB_DRIVER)/$(am__dirstamp)" || rm -f $(NB_DRIVER)/$(am__dirstamp)
-rm -f @NB_DRIVER@/$(DEPDIR)/$(am__dirstamp)
-rm -f @NB_DRIVER@/$(am__dirstamp)
-rm -f @NB_DRIVER@/@NB_BACKEND@/$(DEPDIR)/$(am__dirstamp)
-rm -f @NB_DRIVER@/@NB_BACKEND@/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -566,10 +578,7 @@ clean: clean-am
clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -f $(NB_DRIVER)/$(DEPDIR)/nb_driver.Po
-rm -f $(NB_DRIVER)/$(DEPDIR)/nb_graphics.Po
-rm -f $(NB_DRIVER)/$(NB_BACKEND)/$(DEPDIR)/nb_draw.Po
-rm -f ./$(DEPDIR)/nb_core.Po
-rm -f ./$(DEPDIR)/nb_core.Po
-rm -f ./$(DEPDIR)/nb_draw_common.Po
-rm -f ./$(DEPDIR)/nb_font.Po
-rm -f ./$(DEPDIR)/nb_log.Po
@ -580,6 +589,9 @@ distclean: distclean-am
-rm -f ./$(DEPDIR)/nb_stb_image.Po
-rm -f ./$(DEPDIR)/nb_texture.Po
-rm -f ./$(DEPDIR)/nb_version.Po
-rm -f @NB_DRIVER@/$(DEPDIR)/nb_driver.Po
-rm -f @NB_DRIVER@/$(DEPDIR)/nb_graphic.Po
-rm -f @NB_DRIVER@/@NB_BACKEND@/$(DEPDIR)/nb_draw.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@ -625,10 +637,7 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(NB_DRIVER)/$(DEPDIR)/nb_driver.Po
-rm -f $(NB_DRIVER)/$(DEPDIR)/nb_graphics.Po
-rm -f $(NB_DRIVER)/$(NB_BACKEND)/$(DEPDIR)/nb_draw.Po
-rm -f ./$(DEPDIR)/nb_core.Po
-rm -f ./$(DEPDIR)/nb_core.Po
-rm -f ./$(DEPDIR)/nb_draw_common.Po
-rm -f ./$(DEPDIR)/nb_font.Po
-rm -f ./$(DEPDIR)/nb_log.Po
@ -639,6 +648,9 @@ maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/nb_stb_image.Po
-rm -f ./$(DEPDIR)/nb_texture.Po
-rm -f ./$(DEPDIR)/nb_version.Po
-rm -f @NB_DRIVER@/$(DEPDIR)/nb_driver.Po
-rm -f @NB_DRIVER@/$(DEPDIR)/nb_graphic.Po
-rm -f @NB_DRIVER@/@NB_BACKEND@/$(DEPDIR)/nb_draw.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

View File

@ -1,18 +0,0 @@
ifeq ($(PLATFORM),)
BACKEND = GLX
ODE_CFLAGS = `pkg-config --cflags ode`
ODE_LIBS = `pkg-config --libs ode`
ifeq ($(BACKEND),GLX)
GL_CFLAGS = `pkg-config --cflags x11` `pkg-config --cflags gl` `pkg-config --cflags glu`
GL_LIBS = `pkg-config --libs x11` `pkg-config --libs gl` `pkg-config --libs glu`
endif
ifeq ($(BACKEND),GLFW)
GL_CFLAGS = `pkg-config --cflags glfw3` `pkg-config --cflags glu`
GL_LIBS = `pkg-config --libs glfw3` `pkg-config --libs glu`
endif
SOCKET_LIBS =
MATH_LIBS = -lm
EXEC =
endif

View File

@ -1,28 +0,0 @@
ifeq ($(PLATFORM),win32)
TARGET_PREFIX = i686-w64-mingw32-
WINDOWS = YES
endif
ifeq ($(PLATFORM),win64)
TARGET_PREFIX = x86_64-w64-mingw32-
WINDOWS = YES
endif
ifeq ($(WINDOWS),YES)
BACKEND = WGL
ODE_CFLAGS = -I../deps/include
ODE_LIBS = -L../deps/lib -lode
ifeq ($(BACKEND),WGL)
GL_CFLAGS =
GL_LIBS = -lopengl32 -lglu32 -lgdi32
endif
ifeq ($(BACKEND),GLFW)
GL_CFLAGS = -I../deps/include
GL_LIBS = -L../deps/lib -lglfw -lopengl32 -lglu32 -lgdi32
endif
SOCKET_LIBS = -lws2_32
MATH_LIBS =
EXEC = .exe
endif

View File

@ -1,4 +1,4 @@
include $(top_srcdir)/common-automake.mk
bin_PROGRAMS = nishbox
nishbox_SOURCES = main.c
nishbox_LDADD = -L$(top_srcdir)/deps/lib -lode $(ADD_LIBS) ../engine/libnishbox.a
nishbox_LDADD = ../engine/libnishbox.a @NB_LDADD@

View File

@ -179,6 +179,12 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GL_MORE_CFLAGS = @GL_MORE_CFLAGS@
GL_MORE_LIBS = @GL_MORE_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@ -190,7 +196,13 @@ LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NB_BACKEND = @NB_BACKEND@
NB_CPPFLAGS = @NB_CPPFLAGS@
NB_DRIVER = @NB_DRIVER@
NB_LDADD = @NB_LDADD@
OBJEXT = @OBJEXT@
ODE_CFLAGS = @ODE_CFLAGS@
ODE_LIBS = @ODE_LIBS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -251,9 +263,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I$(top_srcdir)/engine/include -I$(top_srcdir)/external/lua -I$(top_srcdir)/external/stb -I$(top_srcdir)/external/zlib -I$(top_srcdir)/deps/include
AM_CPPFLAGS = @NB_CPPFLAGS@ -DDRV_@NB_DRIVER@ -DUSE_@NB_BACKEND@ -I$(top_srcdir)/engine/include -I$(top_srcdir)/external/lua -I$(top_srcdir)/external/stb -I$(top_srcdir)/external/zlib -I$(top_srcdir)/deps/include
nishbox_SOURCES = main.c
nishbox_LDADD = -L$(top_srcdir)/deps/lib -lode $(ADD_LIBS) ../engine/libnishbox.a
nishbox_LDADD = ../engine/libnishbox.a @NB_LDADD@
all: all-am
.SUFFIXES:

View File

@ -19,7 +19,7 @@ if [ ! -d ode-${ODE_VERSION} ]; then
fi
cd ode-${ODE_VERSION}
if [ ! -f .configured ]; then
./configure --host=${ARCH}-w64-mingw32 --prefix=/ --disable-demos --without-drawstuff --enable-shared || exit 1
./configure --host=${ARCH}-w64-mingw32 --prefix=$BASE/deps --disable-demos --without-drawstuff --enable-shared || exit 1
touch .configured
fi
if [ ! -f .made ]; then
@ -27,11 +27,12 @@ if [ ! -f .made ]; then
touch .made
fi
if [ ! -f .installed ]; then
${MAKE} install DESTDIR=${BASE}/deps
${MAKE} install
touch .installed
fi
cd ..
cd ..
${MAKE} PLATFORM=win${BITS}
./configure --host=${ARCH}-w64-mingw32 --with-wgl
${MAKE}

View File

@ -1,19 +0,0 @@
#!/bin/sh
OBJS=""
for i in $2/*.c; do
ADD=true
SRC=`echo $i | rev | cut -d"/" -f1 | rev`
OBJ=$1/`echo $i | rev | cut -d"/" -f1 | rev | cut -d"." -f1`.o
for j in $DISCARD; do
if [ "$j" = "$SRC" ]; then
ADD=false
break
fi
done
if $ADD; then
echo "$OBJ: $i"
echo " \$(CC) \$(CFLAGS) -c -o \$@ $i"
OBJS="$OBJS $OBJ"
fi
done
echo "OBJS +=$OBJS"