-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
57 lines (46 loc) · 1.37 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
#
# RMANTREE points to the RenderManProServer directory.
# Set it if it's not already set in the environment.
#
RMANTREE ?= /opt/pixar/RenderManProServer-23.2
export RMANTREE
#
# BUILD_DIR is where the built files will go.
# Set it if it's not already set in the environment.
#
SRC_DIR ?= $(CURDIR)
BUILD_DIR ?= $(SRC_DIR)/build
#
# Base command for copying files to the build directory.
#
COPY = rsync -rum --include "*/"
#
# Control variables.
# These subdirectories will be built using their own Makefile.
#
SUBDIRS := osl ris
#
# Targets and prerequisites.
# clean is the list of (phony) targets for cleaning the SUBDIRS directory contents.
# install contains the (phony) targets for installing the SUBDIRS directory contents.
#
clean := $(patsubst %,%.clean,$(SUBDIRS))
install := $(patsubst %,%.install,$(SUBDIRS))
.PHONY : $(SUBDIRS) build
build : $(SUBDIRS) install
#
# Rules.
#
clean : $(clean)
-$(shell rm -rf $(BUILD_DIR))
%.clean :
$(MAKE) -C $(subst .clean,,$@) clean
$(SUBDIRS) :
$(MAKE) -C $@
install : $(install)
-$(shell mkdir -p $(BUILD_DIR))
-$(COPY) --include="*.katana" --exclude="*" scene $(BUILD_DIR)
-$(COPY) --include="*.macro" --exclude="*" katana $(BUILD_DIR)
-$(COPY) --include="*.py" --exclude="*" katana $(BUILD_DIR)
%.install : $(SUBDIRS)
-$(COPY) --include="*.oso" --include="*.so" --include="*.args" --exclude="*" $(subst .install,,$@) $(BUILD_DIR)