1 MYSRCS
= queue.c threads.c opencl.c hitag2.c
3 MYDEFS
= -D TEST_UNIT
=0
5 platform
= $(shell uname
)
7 ifeq ($(platform
),Darwin
)
8 MYLDLIBS ?
= -framework OpenCL
10 #MYINCLUDES ?=-I/usr/local/cuda-7.5/include
11 #MYINCLUDES ?=-I/opt/nvidia/cuda/include
12 #MYLDLIBS ?= -L/usr/local/cuda-7.5/lib64 -lOpenCL
13 MYLDLIBS ?
= -L
/opt
/nvidia
/cuda
/lib64
-lOpenCL
17 MYINCLUDES
+=-I ..
/common
18 MYINCLUDES
+=-I ..
/common
/OpenCL-Headers
20 BINS
= ht2crack5opencl
21 INSTALLTOOLS
= $(BINS
)
23 include ..
/..
/..
/Makefile.host
25 # checking platform can be done only after Makefile.host
26 ifneq (,$(findstring MINGW
,$(platform
)))
27 # Mingw uses by default Microsoft printf, we want the GNU printf (e.g. for %z)
28 # and setting _ISOC99_SOURCE sets internally __USE_MINGW_ANSI_STDIO=1
29 CFLAGS
+= -D_ISOC99_SOURCE
32 WITH_CLANG
=$(shell $(CC
) --version
2>&1 | grep
-c
"clang")
34 # disable sanitize on Linux
36 ifeq ($(platform
),Linux
)
38 CFLAGS
:= $(filter-out -fsanitize
=address
,$(CFLAGS
))
39 CFLAGS
:= $(filter-out -fno-omit-frame-pointer
,$(CFLAGS
))
40 LDFLAGS
:= $(filter-out -fsanitize
=address
,$(CFLAGS
))
43 Disabling SANITIZE here
, is incompatibe with OpenCL on Linux
, due to a bug.
44 Check this
(https
://github.com
/google
/sanitizers
/issues
/611).
51 ifeq ($(WITH_CLANG
),1)
52 ifeq ($(platform
),Linux
)
57 # if debug and clang, add more CFLAGS
59 ifeq ($(WITH_CLANG
),1)
60 CFLAGS
+= -Weverything
61 CFLAGS
+= -Wno-reserved-id-macro
62 ifeq ($(platform
),Linux
)
63 CFLAGS
+= -Wno-error
=reserved-id-macro
64 CFLAGS
+= -Wno-error
=disabled-macro-expansion
67 $(info CFLAGS are
: $(CFLAGS
))
70 ht2crack5opencl
: $(OBJDIR
)/ht2crack5opencl.o
${MYOBJS}
72 ifeq ($(platform
),Darwin
)
73 ht2crack5opencl_clean
:
76 clean: ht2crack5opencl_clean