-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (30 loc) · 993 Bytes
/
Copy pathMakefile
File metadata and controls
44 lines (30 loc) · 993 Bytes
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
37
38
39
40
41
42
43
44
# Makefile-mode
include Build/rules.mk
MAX_KERNEL_WIDTH := 23
CPPFLAGS += -IExternal
CPPFLAGS += -I.
CPPFLAGS += -DMAX_KERNEL_WIDTH=$(MAX_KERNEL_WIDTH)
CLC = /System/Library/Frameworks/OpenCL.framework/Libraries/openclc
SRCS += main.c
SRCS += cda.c
SRCS += dr.c
SRCS += blur.c
SRCS += cl.c
SRCS += External/lodepng.c
OBJS := $(foreach src,$(SRCS),$(call outName,$(src)))
all: SdfNormal
SdfNormal: pvrt.cl.x86_64.bc pvrt.cl.gpu_64.bc $(OBJS) Makefile
$(CXX) -o $@ $(CPPFLAGS) $(SRCS) -framework OpenCL
%.x86_64.bc: pvrt.cl gen_src/pvrt.cl.inc
$(CLC) -x cl -cl-std=CL1.1 -Os -arch x86_64 -emit-llvm -c -o $@ $(call first_dot,$@)
%.gpu_64.bc: pvrt.cl gen_src/pvrt.cl.inc
$(CLC) -x cl -cl-std=CL1.1 -Os -arch gpu_64 -emit-llvm -c -o $@ $(call first_dot,$@)
gen_src/pvrt.cl.inc : gen_src blurGen.pl
perl blurGen.pl $(MAX_KERNEL_WIDTH) > $@
gen_src :
mkdir gen_src
info:
$(CLC) -v
$(foreach src,$(SRCS),$(eval $(call srcToObj,$(src))))
CLEAN += SdfNormal
include Build/rules2.mk