forked from parallella/coprthr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
194 lines (140 loc) · 4.03 KB
/
Makefile.in
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#ifeq (freebsd,$(patsubst freebsd%,freebsd,@build_os@))
#MAKE = gmake
#else
#MAKE = make
#endif
ifeq (freebsd,$(patsubst freebsd%,freebsd,@build_os@))
MAKE = gmake
else
ifneq (@MAKE@,)
MAKE = @MAKE@
else
MAKE = make
endif
endif
prefix=@prefix@
exec_prefix=@exec_prefix@
### this useless define is needed to silence useless autoconf warning
datarootdir=@datarootdir@
INSTALL_BIN_DIR=@bindir@
INSTALL_LIB_DIR=@libdir@
INSTALL_INCLUDE_DIR=@includedir@
INSTALL_MAN_DIR=@mandir@
### libocl ###
ifeq (@ENABLE_LIBOCL@,1)
SUBDIRS += ./src/libocl
endif
### libocl ###
ifeq (@ENABLE_LIBCLRPC@,1)
SUBDIRS += ./src/libclrpc
endif
### libcoprthr ###
ifeq (@ENABLE_LIBCOPRTHR@,1)
SUBDIRS += ./src/libcoprthr ./src/libcoprthr_opencl
endif
### libcoprthrcc ###
ifeq (@ENABLE_LIBCOPRTHRCC@,1)
SUBDIRS += ./src/libcoprthrcc ./tools/xclnm
endif
### libstdcl ###
SUBDIRS += ./include ./src/libclelf ./src/libstdcl
HOST=@host@
HOST_CPU=@host_cpu@
HOST_VENDOR=@host_vendor@
HOST_OS=@host_os@
BUILD=@build@
### clcc ###
ENABLE_CLCC=@ENABLE_CLCC@
ifeq (@host_os@,linux-androideabi)
ENABLE_CLCC=0
endif
ifeq (@build_cpu@,mic)
ENABLE_CLCC=0
endif
ifeq ($(ENABLE_CLCC),1)
SUBDIRS += ./tools/clcc ./tools/clcc1 ./tools/clld ./tools/clnm
endif
### CLETE ###
#ifneq (freebsd,$(patsubst freebsd%,freebsd,@build_os@))
ifeq (@ENABLE_CLETE@,1)
SUBDIRS += ./src/CLETE
endif
#endif
#ifeq (@ENABLE_CLTRACE@,1)
#SUBDIRS += ./tools/cltrace
#endif
#SUBDIRS += $(addprefix ./libs/,$(BUILD_LIBS))
#SUBDIRS += $(addprefix ./tools/,$(BUILD_TOOLS))
#ifeq (@ENABLE_EPIPHANY@,1)
##SUBDIRS += ./src/libcoprthr-e
#endif
### additional tools ###
ifneq (@host_os@,linux-androideabi)
SUBDIRS += ./tools/cltop ./tools/scripts
endif
DISTCLEAN_DIRS = ./src/libstdcl ./src/libcoprthr ./src/libcoprthrcc ./src/libcoprthr_opencl ./src/libocl ./src/CLETE ./tools/cltrace ./tools/xclnm2 ./tools/clld ./test ./test/test_CLETE ./test/test_stdcl ./test/test_libcoprthr_opencl ./test/test_clrpc ./include ./tools/clcc ./tools/clcc1 ./tools/xclnm ./tools/clnm ./src/libclelf ./src/libclrpc ./examples ./tools/cltop ./tools/scripts
#ifeq (@ENABLE_EPIPHANY@,1)
##DISTCLEAN_DIRS += ./src/libcoprthr-e ./test/test_libcoprthr-e
#endif
export TOPDIR = $(CURDIR)
all: $(SUBDIRS)
.PHONY: subdirs $(SUBDIRS) clean distclean install uninstall test quicktest
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@ $(MAKEFLAGS) $(MAKECMDGOALS)
clean: subdirs
$(MAKE) -C ./test $(MAKECMDGOALS)
# $(MAKE) -C ./examples $(MAKECMDGOALS)
distclean:
@dirs="$(DISTCLEAN_DIRS)"; for dir in $$dirs; do \
$(MAKE) -C $$dir distclean; \
rm -f $$dir/Makefile; \
done
rm -f Makefile
rm -f ./scripts/clprocd
rm -f ndk.sh
rm -f install-message.txt
cp -f config.log config.log~
cp -f config.status config.status~
echo-install:
echo $(INSTALL_BIN_DIR)
install: subdirs
test -d $(prefix) || install -m 755 -d $(prefix)
cp -Rf ./doc $(prefix)
cp -Rf ./examples $(prefix)
cp -Rf ./test $(prefix)
install -m 755 ./tools/scripts/cldebug $(INSTALL_BIN_DIR)
install -m 755 ./tools/scripts/clprocd $(INSTALL_BIN_DIR)
#ifeq (freebsd,$(patsubst freebsd%,freebsd,@build_os@))
#else
## install -m 755 ./scripts/clprocd /etc/init.d/
#endif
@chmod -R a+rX $(prefix)
install -m 644 install-message.txt $(prefix)/install-message.txt
@cat install-message.txt
ifeq (@ENABLE_USER_INSTALL@,1)
install -m 755 -d $(prefix)/etc
install -m 644 ./etc/ocl.conf $(prefix)/etc/ocl.conf
else
install -m 644 ./etc/ocl.conf /etc/ocl.conf
endif
uninstall: subdirs
ifeq (freebsd,$(patsubst freebsd%,freebsd,@build_os@))
else
rm -f /etc/init.d/clprocd
endif
rm -f /etc/ocl.conf
test:
$(MAKE) -C ./test $(MAKEFLAGS) $(MAKECMDGOALS)
quicktest:
$(MAKE) -C ./test $(MAKEFLAGS) $(MAKECMDGOALS)
test-libstdcl:
$(MAKE) -C ./test/test_stdcl $(MAKEFLAGS) test
test-libcoprthr_opencl:
$(MAKE) -C ./test/test_libcoprthr_opencl $(MAKEFLAGS) test
test-CLETE:
$(MAKE) -C ./test/test_CLETE $(MAKEFLAGS) test
quicktest-libstdcl:
$(MAKE) -C ./test/test_stdcl $(MAKEFLAGS) quicktest
quicktest-libcoprthr_opencl:
$(MAKE) -C ./test/test_libcoprthr_opencl $(MAKEFLAGS) quicktest