Permalink
Browse files

Support Mac OS X in the master Makefile.

  • Loading branch information...
1 parent d717f45 commit ca840bde63bcea18eb4cdb9a92c7749d49f7c16b @samr7 committed Jul 2, 2012
Showing with 11 additions and 25 deletions.
  1. +11 −3 Makefile
  2. +0 −22 Makefile.osx
View
@@ -1,7 +1,15 @@
LIBS=-lpcre -lcrypto -lm -lpthread
CFLAGS=-ggdb -O3 -Wall
OBJS=vanitygen.o oclvanitygen.o oclvanityminer.o oclengine.o keyconv.o pattern.o util.o
-PROGS=vanitygen oclvanitygen oclvanityminer keyconv
+PROGS=vanitygen keyconv oclvanitygen oclvanityminer
+
+PLATFORM=$(shell uname -s)
+ifeq ($(PLATFORM),Darwin)
+OPENCL_LIBS=-framework OpenCL
+else
+OPENCL_LIBS=-lOpenCL
+endif
+
most: vanitygen keyconv
@@ -11,10 +19,10 @@ vanitygen: vanitygen.o pattern.o util.o
$(CC) $^ -o $@ $(CFLAGS) $(LIBS)
oclvanitygen: oclvanitygen.o oclengine.o pattern.o util.o
- $(CC) $^ -o $@ $(CFLAGS) $(LIBS) -lOpenCL
+ $(CC) $^ -o $@ $(CFLAGS) $(LIBS) $(OPENCL_LIBS)
oclvanityminer: oclvanityminer.o oclengine.o pattern.o util.o
- $(CC) $^ -o $@ $(CFLAGS) $(LIBS) -lOpenCL -lcurl
+ $(CC) $^ -o $@ $(CFLAGS) $(LIBS) $(OPENCL_LIBS) -lcurl
keyconv: keyconv.o util.o
$(CC) $^ -o $@ $(CFLAGS) $(LIBS)
View
@@ -1,22 +0,0 @@
-LIBS=-lpcre -lcrypto -lm -lpthread
-CFLAGS=-ggdb -O3 -Wall
-OBJS=vanitygen.o oclvanitygen.o oclvanityminer.o oclengine.o keyconv.o pattern.o util.o
-PROGS=vanitygen oclvanitygen oclvanityminer keyconv
-TESTS=
-
-all: $(PROGS)
-
-vanitygen: vanitygen.o pattern.o util.o
- $(CC) $^ -o $@ $(CFLAGS) $(LIBS)
-
-oclvanitygen: oclvanitygen.o oclengine.o pattern.o util.o
- $(CC) $^ -o $@ $(CFLAGS) $(LIBS) -framework OpenCL
-
-oclvanityminer: oclvanityminer.o oclengine.o pattern.o util.o
- $(CC) $^ -o $@ $(CFLAGS) $(LIBS) -lcurl -framework OpenCL
-
-keyconv: keyconv.o util.o
- $(CC) $^ -o $@ $(CFLAGS) $(LIBS)
-
-clean:
- rm -f $(OBJS) $(PROGS) $(TESTS)

0 comments on commit ca840bd

Please sign in to comment.