Skip to content

Commit

Permalink
Restore old makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcoventry committed Sep 16, 2014
1 parent 664a99e commit 8b1d8a5
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions Makefile
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

0 comments on commit 8b1d8a5

Please sign in to comment.