Permalink
Browse files

Convert over to autotools. Release version 0.1.

  • Loading branch information...
1 parent e33abcd commit 702e2ac8119943ded0e95a77b3e9c63f7311f717 Jeff Garzik committed with Jeff Garzik Nov 25, 2010
Showing with 431 additions and 27 deletions.
  1. +17 −0 .gitignore
  2. +1 −0 AUTHORS
  3. +340 −0 COPYING
  4. +1 −0 ChangeLog
  5. +3 −0 LICENSE
  6. +0 −24 Makefile
  7. +9 −0 Makefile.am
  8. +5 −0 NEWS
  9. +7 −3 README
  10. +12 −0 autogen.sh
  11. +34 −0 configure.ac
  12. +2 −0 cpu-miner.c
View
@@ -2,3 +2,20 @@
minerd
*.o
+autom4te.cache
+.deps
+
+Makefile
+Makefile.in
+INSTALL
+aclocal.m4
+configure
+depcomp
+missing
+install-sh
+stamp-h1
+cpuminer-config.h*
+compile
+config.log
+config.status
+
View
@@ -0,0 +1 @@
+Jeff Garzik <jgarzik@pobox.com>
View
340 COPYING

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1 @@
+See git repository ('git log') for full changelog.
View
@@ -0,0 +1,3 @@
+cpuminer is available under the terms of the GNU Public License version 2.
+
+See COPYING for details.
View
@@ -1,24 +0,0 @@
-
-CFLAGS= -O2 -Wall -g -march=native -pthread
-
-PROG = minerd
-
-OBJS = cpu-miner.o
-
-LDFLAGS = $(CFLAGS)
-
-LIBS = -lcurl -ljansson -lcrypto
-
-all: $(PROG)
-
-.c.o:
- gcc $(CFLAGS) -c $< -o $@
-
-clean:
- rm -f $(PROG) $(OBJS)
-
-$(PROG): $(OBJS)
- gcc $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS)
-
-cpu-miner.o: cpu-miner.c sha256_generic.c
-
View
@@ -0,0 +1,9 @@
+
+INCLUDES = -pthread
+
+bin_PROGRAMS = minerd
+
+minerd_SOURCES = cpu-miner.c sha256_generic.c
+minerd_LDFLAGS = -pthread
+minerd_LDADD = @CRYPTO_LIBS@ @LIBCURL@ @JANSSON_LIBS@
+
View
5 NEWS
@@ -0,0 +1,5 @@
+
+Version 0.1 - November 24, 2010
+
+- Initial release.
+
View
10 README
@@ -1,11 +1,15 @@
-This is a CPU miner for bitcoin.
+This is a multi-threaded CPU miner for bitcoin.
-License: X11/MIT
- See http://www.opensource.org/licenses/mit-license.php
+License: GPLv2. See COPYING for details.
Dependencies:
libcurl http://curl.haxx.se/libcurl/
jansson http://www.digip.org/jansson/
OpenSSL libcrypto http://www.openssl.org/
+Basic build instructions:
+ ./autogen.sh
+ ./configure
+ make
+
View
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# You need autoconf 2.5x, preferably 2.57 or later
+# You need automake 1.7 or later. 1.6 might work.
+
+set -e
+
+aclocal
+autoheader
+automake --gnu --add-missing --copy
+autoconf
+
View
@@ -0,0 +1,34 @@
+AC_INIT([cpuminer], [0.1])
+
+AC_PREREQ(2.52)
+AC_CONFIG_SRCDIR([cpu-miner.c])
+AM_INIT_AUTOMAKE([gnu])
+AC_CONFIG_HEADERS([cpuminer-config.h])
+
+dnl Make sure anyone changing configure.ac/Makefile.am has a clue
+AM_MAINTAINER_MODE
+
+dnl Checks for programs
+AC_PROG_CC
+AC_PROG_GCC_TRADITIONAL
+AM_PROG_CC_C_O
+
+dnl Checks for header files.
+AC_HEADER_STDC
+
+AC_CHECK_LIB(crypto, MD5_Init, CRYPTO_LIBS=-lcrypto)
+AC_CHECK_LIB(jansson, json_loads, JANSSON_LIBS=-ljansson)
+
+PKG_PROG_PKG_CONFIG()
+
+LIBCURL_CHECK_CONFIG(, 7.10.1, ,
+ [AC_MSG_ERROR([Missing required libcurl >= 7.10.1])])
+
+AC_SUBST(CRYPTO_LIBS)
+AC_SUBST(JANSSON_LIBS)
+
+AC_CONFIG_FILES([
+ Makefile
+ ])
+AC_OUTPUT
+
View
@@ -5,6 +5,8 @@
*/
#define _GNU_SOURCE
+#include "cpuminer-config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

0 comments on commit 702e2ac

Please sign in to comment.