Browse Source

Patch to work on OSX

master
Gavin Andresen 14 years ago committed by tcatm
parent
commit
4a9d9e0b1d
  1. 20
      Makefile.osx
  2. 4
      findnonce.h
  3. 4
      ocl.h

20
Makefile.osx vendored

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
LIBS=-ljansson -lcurl
DEFS=
DEBUGFLAGS=
CFLAGS=-I/usr/local/include -O3 -Wformat $(DEBUGFLAGS) $(DEFS)
LDFLAGS=-framework OpenCL -L/usr/local/lib
HEADERS=
OBJS=miner.o ocl.o findnonce.o util.o
all: oclminer
%.o: %.c $(HEADERS)
gcc -c $(CFLAGS) -o $@ $<
oclminer: $(OBJS)
gcc $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
clean:
-rm *.o oclminer

4
findnonce.h

@ -1,6 +1,10 @@ @@ -1,6 +1,10 @@
#define MAXTHREADS 2000000
#ifdef __APPLE_CC__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif
typedef struct {
cl_uint ctx_a; cl_uint ctx_b; cl_uint ctx_c; cl_uint ctx_d;

4
ocl.h

@ -1,6 +1,10 @@ @@ -1,6 +1,10 @@
#ifndef __OCL_H__
#define __OCL_H__
#ifdef __APPLE_CC__
#include <OpenCL/opencl.h>
#else
#include <CL/cl.h>
#endif
typedef struct {
cl_context context;

Loading…
Cancel
Save