-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
664a99e
commit 8b1d8a5
Showing
1 changed file
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,44 @@ | ||
all: clean gpuPlotGenerator | ||
OPENCL_INCLUDE = ../_opencl/include | ||
OPENCL_LIB = ../_opencl/lib/win/x86 | ||
CC = g++ | ||
CC_FLAGS = -ansi -pedantic -W -Wall -std=c++0x -O3 -I$(OPENCL_INCLUDE) | ||
LD = g++ | ||
LD_FLAGS = -fPIC -L$(OPENCL_LIB) -static-libgcc -static-libstdc++ -lOpenCL | ||
ECHO = echo | ||
MKDIR = mkdir | ||
CP = cp | ||
RM = rm | ||
|
||
gpuPlotGenerator: | ||
g++ -pthread -ansi -pedantic -W -Wall -std=c++0x *.cpp -lOpenCL -o gpuPlotGenerator | ||
SRC = $(wildcard *.cpp) | ||
OBJ = $(SRC:.cpp=.o) | ||
EXEC = bin/gpuPlotGenerator.exe | ||
|
||
all: $(EXEC) | ||
|
||
dist: all | ||
@$(ECHO) Generating distribution | ||
@$(MKDIR) -p bin/kernel | ||
@$(CP) kernel/util.cl bin/kernel | ||
@$(CP) kernel/shabal.cl bin/kernel | ||
@$(CP) kernel/nonce.cl bin/kernel | ||
@$(CP) README bin/README | ||
|
||
rebuild: distclean all | ||
|
||
$(EXEC): $(OBJ) | ||
@$(ECHO) Linking [$@] | ||
@$(LD) -o $@ $^ $(LD_FLAGS) | ||
|
||
%.o: %.cpp | ||
@$(ECHO) Compiling [$<] | ||
@$(CC) -o $@ -c $< $(CC_FLAGS) | ||
|
||
clean: | ||
rm -f gpuPlotGenerator | ||
@$(ECHO) Cleaning project | ||
@$(RM) -f *.o | ||
|
||
test: gpuPlotGenerator | ||
./gpuPlotGenerator generate 0 0 ./plots/ 0 10 10000 1000 20 76 | ||
distclean: clean | ||
@$(ECHO) Dist cleaning project | ||
@$(RM) -f $(EXEC) | ||
@$(RM) -Rf bin/kernel | ||
@$(RM) -f bin/README |