1
0
mirror of https://github.com/GOSTSec/gostoclminer synced 2025-01-14 08:47:59 +00:00

Patch to work on OSX

This commit is contained in:
Gavin Andresen 2011-02-04 21:16:27 -05:00 committed by tcatm
parent eaa7158afd
commit 4a9d9e0b1d
3 changed files with 28 additions and 0 deletions

20
Makefile.osx Normal file
View File

@ -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

View File

@ -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
View File

@ -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;