Make UNUSED macro function-style
[clinfo] / Makefile
1 # Headers
2
3 HDR =   src/error.h \
4         src/ext.h \
5         src/fmtmacros.h \
6         src/memory.h \
7         src/ms_support.h \
8         src/strbuf.h
9
10 VPATH = src
11
12 CFLAGS += -std=c99 -g -Wall -Wextra -pedantic
13
14 SPARSE ?= sparse
15 SPARSEFLAGS=-Wsparse-all -Wno-decl
16
17 # BSD make does not define RM
18 RM ?= rm -f
19
20 # Common library includes
21 LDLIBS = -lOpenCL -ldl
22
23 # OS-specific library includes
24 LDLIBS_Darwin = -framework OpenCL
25 LDLIBS_Darwin_exclude = -lOpenCL
26
27 LDLIBS += $(LDLIBS_${OS})
28
29 # Remove -lOpenCL if OS is Darwin
30 LDLIBS := $(LDLIBS:$(LDLIBS_${OS}_exclude)=)
31
32 clinfo: clinfo.o
33
34 clinfo.o: clinfo.c $(HDR)
35
36 clean:
37         $(RM) clinfo.o clinfo
38
39 sparse: clinfo.c
40         $(SPARSE) $(CPPFLAGS) $(CFLAGS) $(SPARSEFLAGS) $^
41
42 .PHONY: clean sparse