Browse Source

Merge pull request #423 from gzm55/master

build out of source dir
nfactor-troky
Con Kolivas 12 years ago
parent
commit
2029d8299d
  1. 2
      Makefile.am
  2. 10
      autogen.sh
  3. 1
      ccan/Makefile.am
  4. 24
      configure.ac

2
Makefile.am

@ -33,6 +33,8 @@ else
cgminer_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib @OPENCL_FLAGS@ @LIBUSB_CFLAGS@ @LIBCURL_CFLAGS@ cgminer_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib @OPENCL_FLAGS@ @LIBUSB_CFLAGS@ @LIBCURL_CFLAGS@
endif endif
cgminer_CPPFLAGS += $(ADL_CPPFLAGS)
# common sources # common sources
cgminer_SOURCES := cgminer.c cgminer_SOURCES := cgminer.c

10
autogen.sh

@ -1,17 +1,11 @@
#!/bin/sh #!/bin/sh
cwd="$PWD"
bs_dir="$(dirname $(readlink -f $0))" bs_dir="$(dirname $(readlink -f $0))"
rm -rf "${bs_dir}"/autom4te.cache rm -rf "${bs_dir}"/autom4te.cache
rm -f "${bs_dir}"/aclocal.m4 "${bs_dir}"/ltmain.sh rm -f "${bs_dir}"/aclocal.m4 "${bs_dir}"/ltmain.sh
echo 'Running autoreconf -if...' echo 'Running autoreconf -if...'
autoreconf -if || exit 1 autoreconf -if ${AC_FLAGS} "${bs_dir}" || exit 1
if test -z "$NOCONFIGURE" ; then if test -z "$NOCONFIGURE" ; then
echo 'Configuring...' echo 'Configuring...'
cd "${bs_dir}" &> /dev/null "$bs_dir"/configure "$@"
test "$?" = "0" || e=1
test "$cwd" != "$bs_dir" && cd "$bs_dir" &> /dev/null
./configure $@
test "$e" = "1" && exit 1
cd "$cwd"
fi fi

1
ccan/Makefile.am

@ -1,3 +1,4 @@
noinst_LIBRARIES = libccan.a noinst_LIBRARIES = libccan.a
libccan_a_SOURCES = compiler/compiler.h opt/helpers.c opt/opt.c opt/opt.h opt/parse.c opt/private.h opt/usage.c typesafe_cb/typesafe_cb.h libccan_a_SOURCES = compiler/compiler.h opt/helpers.c opt/opt.c opt/opt.h opt/parse.c opt/private.h opt/usage.c typesafe_cb/typesafe_cb.h
libccan_a_CPPFLAGS = -I$(top_srcdir)

24
configure.ac

@ -117,6 +117,13 @@ if test "x$have_win32" != xtrue; then
fi fi
fi fi
have_cgminer_sdk=false
if test -n "$CGMINER_SDK"; then
have_cgminer_sdk=true
CPPFLAGS="-I$CGMINER_SDK/include $CPPFLAGS"
LDFLAGS="-L$CGMINER_SDK/lib/$target $LDFLAGS"
fi
cpumining="no" cpumining="no"
AC_ARG_ENABLE([cpumining],,[cpumining=$enableval] ) AC_ARG_ENABLE([cpumining],,[cpumining=$enableval] )
@ -186,7 +193,11 @@ scrypt="no"
if test "$found_opencl" = 1; then if test "$found_opencl" = 1; then
if test "x$adl" != xno; then if test "x$adl" != xno; then
AC_CHECK_FILE([${ADL_SDK:-ADL_SDK}/adl_sdk.h], have_adl=true, have_adl=false,) ADL_CPPFLAGS=
AC_CHECK_FILE([$srcdir/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$srcdir], have_adl=false,)
if test x$have_adl+$have_cgminer_sdk = xfalse+true; then
AC_CHECK_FILE([$CGMINER_SDK/include/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$CGMINER_SDK/include], have_adl=false,)
fi
if test x$have_adl = xtrue if test x$have_adl = xtrue
then then
AC_DEFINE([HAVE_ADL], [1], [Defined if ADL headers were found]) AC_DEFINE([HAVE_ADL], [1], [Defined if ADL headers were found])
@ -386,6 +397,16 @@ AM_CONDITIONAL([HAVE_LIBUDEV], [test x$libudev != xno])
PKG_PROG_PKG_CONFIG() PKG_PROG_PKG_CONFIG()
if test "x$have_cgminer_sdk" = "xtrue"; then
if test "x$have_x86_64" = xtrue; then
ARCH_DIR=x86_64
else
ARCH_DIR=x86
fi
PKG_CONFIG="${PKG_CONFIG:-pkg-config} --define-variable=arch=$ARCH_DIR --define-variable=target=$target --define-variable=cgminersdkdir=$CGMINER_SDK"
PKG_CONFIG_PATH="$CGMINER_SDK/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
fi
if test "x$ztex$modminer$bitforce$bflsc" != xnononono; then if test "x$ztex$modminer$bitforce$bflsc" != xnononono; then
case $target in case $target in
*-*-freebsd*) *-*-freebsd*)
@ -475,6 +496,7 @@ AC_SUBST(WS2_LIBS)
AC_SUBST(MATH_LIBS) AC_SUBST(MATH_LIBS)
AC_SUBST(UDEV_LIBS) AC_SUBST(UDEV_LIBS)
AC_SUBST(YASM_FMT) AC_SUBST(YASM_FMT)
AC_SUBST(ADL_CPPFLAGS)
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile

Loading…
Cancel
Save