1 : |
jhr |
5597 |
# Makefile for diderot system
|
2 : |
|
|
#
|
3 : |
|
|
# This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
|
4 : |
|
|
#
|
5 : |
|
|
# COPYRIGHT (c) 2015 The University of Chicago
|
6 : |
|
|
# All rights reserved.
|
7 : |
|
|
#
|
8 : |
|
|
|
9 : |
|
|
SHELL = @SHELL@
|
10 : |
|
|
@SET_MAKE@
|
11 : |
|
|
|
12 : |
|
|
INSTALL = @INSTALL@
|
13 : |
|
|
|
14 : |
|
|
ifeq (@LOGGING_ENABLED@,true)
|
15 : |
|
|
BUILD_DIRS = src/logging/log-analyze \
|
16 : |
|
|
src/logging/log-dump
|
17 : |
|
|
LOG_HEADER = src/lib/include/diderot/log-events.hxx
|
18 : |
|
|
LOG_GEN_DIR = src/logging/gen
|
19 : |
|
|
endif
|
20 : |
|
|
|
21 : |
|
|
BUILD_DIRS += src/compiler \
|
22 : |
|
|
src/lib/build
|
23 : |
|
|
|
24 : |
|
|
INSTALL_DIR = @prefix@
|
25 : |
|
|
|
26 : |
|
|
# add OpenCL specific targets
|
27 : |
|
|
#
|
28 : |
|
|
# FIXME
|
29 : |
|
|
#
|
30 : |
|
|
#ifeq (@CL_ENABLED@,true)
|
31 : |
|
|
#BUILD_DIRS += src/clinfo
|
32 : |
|
|
#endif
|
33 : |
|
|
|
34 : |
|
|
.PHONY: help build local-install install \
|
35 : |
|
|
clean local-distclean local-devclean
|
36 : |
|
|
|
37 : |
|
|
help:
|
38 : |
|
|
@echo "This Makefile supports the following targets:"
|
39 : |
|
|
@echo " help -- print this message."
|
40 : |
|
|
@echo " build -- build Diderot tools and libraries"
|
41 : |
|
|
@echo " local-install -- install Diderot tools, libraries, and headers in "
|
42 : |
|
|
@echo " @DIDEROT_ROOT@/{bin,lib,include}"
|
43 : |
|
|
@echo " install -- install Diderot tools, libraries, and headers in "
|
44 : |
|
|
@echo " @INSTALL_ROOT@/{bin,lib,include}"
|
45 : |
|
|
@echo " clean -- remove intermediate files generated during building"
|
46 : |
|
|
@echo " distclean -- remove files generated during configuration"
|
47 : |
|
|
@echo " and building; the resulting tree has the same"
|
48 : |
|
|
@echo " files as the distribution."
|
49 : |
|
|
@echo "The following additional targets are primarily for developers:"
|
50 : |
|
|
@echo " devclean -- remove everything that is not part of the SVN"
|
51 : |
|
|
@echo " repository."
|
52 : |
|
|
|
53 : |
|
|
local-install:
|
54 : |
|
|
for dir in $(BUILD_DIRS); do \
|
55 : |
|
|
(cd $$dir && $(MAKE) local-install) || exit $$?; \
|
56 : |
|
|
done
|
57 : |
|
|
mkdir -p include/diderot
|
58 : |
|
|
(cd src/lib/include/diderot/; cp -p *.h *.cuh ../../../../include/diderot) || exit $$?
|
59 : |
|
|
|
60 : |
|
|
install:
|
61 : |
|
|
mkdir -p $(INSTALL_DIR)
|
62 : |
|
|
for dir in $(BUILD_DIRS); do \
|
63 : |
|
|
(cd $$dir && $(MAKE) install) || exit $$?; \
|
64 : |
|
|
done
|
65 : |
|
|
mkdir -p $(INSTALL_DIR)/include/diderot
|
66 : |
|
|
(cd src/lib/include/diderot/; cp -p *.h *.cuh $(INSTALL_DIR)/include/diderot) || exit $$?
|
67 : |
|
|
|
68 : |
|
|
build: $(LOG_HEADER)
|
69 : |
|
|
for dir in $(BUILD_DIRS); do \
|
70 : |
|
|
(cd $$dir && $(MAKE) build) || exit $$?; \
|
71 : |
|
|
done
|
72 : |
|
|
|
73 : |
|
|
doc:
|
74 : |
|
|
(cd doc; $(MAKE))
|
75 : |
|
|
|
76 : |
|
|
ifeq (@LOGGING_ENABLED@,true)
|
77 : |
|
|
$(LOG_HEADER):
|
78 : |
|
|
(cd $(LOG_GEN_DIR); ./log-gen.sh) || exit $$?
|
79 : |
|
|
endif
|
80 : |
|
|
|
81 : |
|
|
#################### Cleanup ####################
|
82 : |
|
|
|
83 : |
|
|
CLEAN_SUBDIRS = $(BUILD_DIRS) $(LOG_GEN_DIR) doc
|
84 : |
|
|
|
85 : |
|
|
CLEAN_FILES = rtest/tests/*/out.nrrd
|
86 : |
|
|
|
87 : |
|
|
DISTCLEAN_FILES += Makefile config.status config.log \
|
88 : |
|
|
autom4te*.cache \
|
89 : |
|
|
bin \
|
90 : |
|
|
lib \
|
91 : |
|
|
include \
|
92 : |
|
|
rtest/scripts/run.sh \
|
93 : |
|
|
rtest/scripts/run-one.sh \
|
94 : |
|
|
rtest/log.* \
|
95 : |
|
|
rtest/report.* \
|
96 : |
|
|
src/lib/include/diderot/config.h \
|
97 : |
|
|
src/lib/include/diderot/log-events.hxx \
|
98 : |
|
|
src/lib/include/diderot/logging.hxx \
|
99 : |
|
|
src/logging/lib/default-log-paths.hxx
|
100 : |
|
|
|
101 : |
|
|
DEVCLEAN_FILES = configure \
|
102 : |
|
|
config/config_h.in \
|
103 : |
|
|
config/config_h.in~
|
104 : |
|
|
|
105 : |
|
|
include @DIDEROT_MKDIR@/clean-rules.gmk
|