1 |
# Makefile for diderot system |
# Makefile for diderot system |
2 |
# |
# |
3 |
# COPYRIGHT (c) 2010 The Diderot Project (http://diderot-language.cs.uchicago.edu) |
# COPYRIGHT (c) 2013 The Diderot Project (http://diderot-language.cs.uchicago.edu) |
4 |
# All rights reserved. |
# All rights reserved. |
5 |
# |
# |
6 |
|
|
12 |
BUILD_DIRS = src/compiler \ |
BUILD_DIRS = src/compiler \ |
13 |
src/lib/build |
src/lib/build |
14 |
|
|
15 |
|
INSTALL_DIR = @prefix@ |
16 |
|
|
17 |
# add OpenCL specific targets |
# add OpenCL specific targets |
18 |
# |
# |
19 |
ifeq (@CL_ENABLED@,true) |
ifeq (@CL_ENABLED@,true) |
20 |
BUILD_DIRS += src/clinfo |
BUILD_DIRS += src/clinfo |
21 |
endif |
endif |
22 |
|
|
23 |
.PHONY: help build local-install \ |
.PHONY: help build local-install install \ |
24 |
clean local-distclean local-devclean |
clean local-distclean local-devclean |
25 |
|
|
26 |
help: |
help: |
27 |
@echo "This Makefile supports the following targets:" |
@echo "This Makefile supports the following targets:" |
28 |
@echo " help -- print this message." |
@echo " help -- print this message." |
29 |
@echo " build -- build Diderot tools and libraries" |
@echo " build -- build Diderot tools and libraries" |
30 |
@echo " local-install -- install Diderot tools and libraries in " |
@echo " local-install -- install Diderot tools, libraries, and headers in " |
31 |
@echo " @DIDEROT_ROOT@/bin" |
@echo " @DIDEROT_ROOT@/{bin,lib,include}" |
32 |
|
@echo " install -- install Diderot tools, libraries, and headers in " |
33 |
|
@echo " @INSTALL_ROOT@/{bin,lib,include}" |
34 |
@echo " clean -- remove intermediate files generated during building" |
@echo " clean -- remove intermediate files generated during building" |
35 |
@echo " distclean -- remove files generated during configuration" |
@echo " distclean -- remove files generated during configuration" |
36 |
@echo " and building; the resulting tree has the same" |
@echo " and building; the resulting tree has the same" |
46 |
mkdir -p include/Diderot |
mkdir -p include/Diderot |
47 |
(cd src/include/Diderot/; cp -p *.h ../../../include/Diderot) || exit $$? |
(cd src/include/Diderot/; cp -p *.h ../../../include/Diderot) || exit $$? |
48 |
|
|
49 |
|
install: |
50 |
|
mkdir -p $(INSTALL_DIR) |
51 |
|
for dir in $(BUILD_DIRS); do \ |
52 |
|
(cd $$dir && $(MAKE) install) || exit $$?; \ |
53 |
|
done |
54 |
|
mkdir -p $(INSTALL_DIR)/include/Diderot |
55 |
|
(cd src/include/Diderot/; cp -p *.h $(INSTALL_DIR)/include/Diderot) || exit $$? |
56 |
|
|
57 |
build: |
build: |
58 |
for dir in $(BUILD_DIRS); do \ |
for dir in $(BUILD_DIRS); do \ |
59 |
(cd $$dir && $(MAKE) build) || exit $$?; \ |
(cd $$dir && $(MAKE) build) || exit $$?; \ |