forked from zuzuf/freeocl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (33 loc) · 867 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
TOPDIR=$(shell pwd)
BUILDDIR=${TOPDIR}/build
J=2
all: configure
@cd ${BUILDDIR} && make -j$J
@echo "All done"
.PHONY : all
pre-build:
@mkdir -p ${BUILDDIR}
.PHONY : pre-build
configure: pre-build
@if test -f ${BUILDDIR}/Makefile; \
then echo Already configured; \
else cd ${BUILDDIR} && cmake -i ${TOPDIR}; \
fi
.PHONY : configure
reconfigure: pre-build
@cd ${BUILDDIR} && cmake -i ${TOPDIR}
.PHONY : reconfigure
debug: pre-build
@cd ${BUILDDIR} && cmake -DCMAKE_BUILD_TYPE=Debug ${TOPDIR} && make -j$J
.PHONY : debug
release: pre-build
@cd ${BUILDDIR} && cmake -DCMAKE_BUILD_TYPE=Release ${TOPDIR} && make -j$J
.PHONY : release
package: distclean pre-build
@cd ${BUILDDIR} && cmake -DCMAKE_BUILD_TYPE=Release ${TOPDIR} && make -j$J package
.PHONY : package
distclean:
@rm -rf ${BUILDDIR}
.PHONY : distclean
%::
@cd ${BUILDDIR} && make $@ -j$J