-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
45 lines (32 loc) · 964 Bytes
/
Makefile
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
# OpenCL Utility library Makefile.
# This should not be invoked directly
MAJOR=0
MINOR=0
PATCHLEVEL=1
VERSION=$(MAJOR).$(MINOR).$(PATCHLEVEL)
LIBBASE=libCLU.so
OUTDIR=$(CURDIR)/lib
SONAME=$(LIBBASE).$(MAJOR)
SOPATH=$(OUTDIR)/$(SONAME)
LIBNAME=$(LIBBASE).$(VERSION)
LIBPATH=$(OUTDIR)/$(LIBNAME)
DEVPATH=$(OUTDIR)/$(LIBBASE)
# Use ?= so PREFIX can still be set on the command line.
PREFIX ?= /usr/local
export OUTDIR SONAME LIBPATH
$(DEVPATH): $(SOPATH)
ln -sf $(SONAME) $(DEVPATH)
$(SOPATH): $(LIBPATH) $(OUTDIR)
ln -sf $(LIBNAME) $(SOPATH)
$(OUTDIR) :
mkdir -p $@
$(LIBPATH) : $(OUTDIR)
$(MAKE) -C src $(LIBPATH)
install: $(LIBPATH)
install -d $(PREFIX)/lib
install --mode=644 --target-directory=$(PREFIX)/lib $(LIBPATH)
ln -sf $(LIBNAME) $(PREFIX)/lib/$(SONAME)
ln -sf $(SONAME) $(PREFIX)/lib/$(LIBBASE)
install -d $(PREFIX)/include/CL
install --mode=644 --target-directory=$(PREFIX)/include/CL include/CL/clu.h
.PHONY : $(LIBPATH) install