forked from stream1972/gfnsieve_ocl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.mac
36 lines (25 loc) · 823 Bytes
/
Makefile.mac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
plat := macos_$(shell uname -m)
obj := output_$(plat)
CXX = g++
CXXFLAGS := -DPLATFORM_MAC -Wall -Wextra -O3
LINKCMD = $(CXX) -o $@ $^
CORECONVCMD = awk -f create_core.awk $< >$@
all: $(obj) gfnsvsim_$(plat) gfnsvocl_$(plat)
$(obj):
mkdir $(obj)
gfnsvsim_$(plat): $(obj)/gfnsvsim.o
$(LINKCMD)
gfnsvocl_$(plat): $(obj)/gfnsvocl.o $(obj)/gsv_ocl.o
$(LINKCMD) -framework OpenCL
$(obj)/gfnsvsim.o: gfnsvCUDA+.cpp
$(CXX) $(CXXFLAGS) -DDEVICE_SIMULATION -c -o $@ $<
$(obj)/gfnsvocl.o: gfnsvCUDA+.cpp
$(CXX) $(CXXFLAGS) -DDEVICE_OPENCL -c -o $@ $<
$(obj)/gsv_ocl.o: gsv_ocl.cpp core_63.tmp core_64.tmp core_79.tmp
$(CXX) $(CXXFLAGS) -c -o $@ gsv_ocl.cpp
core_63.tmp: ocl_core_63.cl
$(CORECONVCMD)
core_64.tmp: ocl_core_64.cl
$(CORECONVCMD)
core_79.tmp: ocl_core_79.cl
$(CORECONVCMD)