Browse Source

Try to pass CC and CFLAGS to libblkmaker build system

Luke Dashjr 13 years ago
parent
commit
7a2c56173a
2 changed files with 5 additions and 2 deletions
  1. 4 1
      Makefile.am
  2. 1 1
      autogen.sh

+ 4 - 1
Makefile.am

@@ -36,9 +36,12 @@ bfgminer_SOURCES	+= elist.h miner.h compat.h bench_block.h	\
 		   sha2.c sha2.h api.c
 
 if NEED_LIBBLKMAKER
-SUBDIRS           += libblkmaker
+bfgminer_LDADD    += libblkmaker/libblkmaker.so libblkmaker/libblkmaker_jansson.so
 bfgminer_CPPFLAGS += -Ilibblkmaker
 bfgminer_LDFLAGS  += -Llibblkmaker -Wl,-rpath,libblkmaker -lblkmaker -lblkmaker_jansson
+
+libblkmaker/libblkmaker.so libblkmaker/libblkmaker_jansson.so:
+	cd libblkmaker && $(MAKE) $(AM_MAKEFLAGS) CFLAGS="$(CFLAGS)" CC="$(CC)" $(@:libblkmaker/%=%)
 endif
 
 bfgminer_SOURCES	+= logging.c

+ 1 - 1
autogen.sh

@@ -6,7 +6,7 @@ rm -f "${bs_dir}"/aclocal.m4 "${bs_dir}"/ltmain.sh
 
 if test -z "$NOSUBMODULES" ; then
 	echo 'Getting submodules...'
-	git submodule update --init
+	git submodule update --init --merge
 fi
 
 echo 'Running autoreconf -if...'