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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
|
# Shave and a Haircut
# (c) 2019 Epic Games
# US Patent 6720962
####################################################################
#
# Maya Version & Location
#
####################################################################
ifndef MAYA_LOCATION
$(error "MAYA_LOCATION is not defined")
endif
ifeq ($(wildcard $(MAYA_LOCATION)),)
$(error "MAYA_LOCATION contains '$(MAYA_LOCATION)', which does not exist.")
endif
# Get the Maya version number. (Actually, just the API version, but that's
# all we care about.)
#
apiVersion := $(shell grep '^[ \t]*\#define[ \t]*MAYA_API_VERSION' $(MAYA_LOCATION)/include/maya/MTypes.h | sed 's/^[^0-9]*//')
# From Maya 2018 onward the API version number is 8 digits long
#
ifeq ($(shell echo '$(apiVersion) >= 20180000' | bc),1)
mayaMajorVersion := $(shell echo $(apiVersion) | sed 's/\(.*\)[0-9][0-9][0-9][0-9]$$/\1/')
else
mayaMajorVersion := $(shell echo $(apiVersion) | sed 's/\(.*\)[0-9][0-9]$$/\1/')
endif
mayaMinorVersion := 0
mayaVersion := $(mayaMajorVersion)
mayaCompressedVersion2 := $(mayaMajorVersion)
mayaCompressedVersion1 := $(mayaMajorVersion)$(mayaMinorVersion)
ifeq ($(filter-out 1 2 3 4 5,$(mayaMajorVersion)),)
$(error "Version $(mayaVersion) of Maya is not supported.")
endif
####################################################################
#
# Plugin Version
#
####################################################################
#
# Get the plugin version and release from the shaveVersion.mel file.
#
pluginVersion := $(shell grep "return" scripts/shaveVersion.mel | sed 's/^[^"]*"\([^v"]*\)[v"].*$$/\1/')
release := $(shell grep "return" scripts/shaveVersion.mel | sed 's/^[^v]*v\([^"]*\)".*$$/\1/')
###################################################################
#
# Package Name
#
####################################################################
package:= shaveHaircut
packageFull := $(package)_Maya$(mayaMajorVersion)_$(mayaMinorVersion)
####################################################################
#
# Build Variables
#
####################################################################
#
# Get the target architecture for which we are building the package.
#
targetArch := x86_64
libShaveEngine := libShaveEngine-x64.so
packageFull := $(packageFull)_64
mayaRPMVersionRequired := Maya$(mayaMajorVersion)_$(mayaMinorVersion)_64
versionedPackageName := $(packageFull)-$(pluginVersion)
#
# Set up some variables used in the rest of the file.
#
melScripts := $(wildcard scripts/*.mel)
#
# Any sample files which require renaming when building the rpm, cannot
# appear in the following variable and must instead be dealt with
# individually.
#
sampleFiles := mayaPlug/shaveAPITestCmd.cpp mayaPlug/shaveAPITestApp.cpp \
libexe/$(libShaveEngine) libexe/shaveEngine.h libexe/shaveSDKTYPES.h
INSTALL_ROOT ?=
####################################################################
#
# Arnold Location
#
####################################################################
arnoldLocation := /opt/solidangle/mtoa/$(mayaCompressedVersion2)
arnoldVersionDB := $(shell arnold/getMayaConfig.sh $(mayaVersion) versionDB)
arnoldVersions := $(shell grep "^$(mayaVersion):" $(arnoldVersionDB) | sed -e 's/^.*[ \t]\([^ \t]\)/\1/' -e 's/[ \t]*$$//')
$(info maya $(mayaVersion) mtoa/arnold $(arnoldVersions))
####################################################################
#
# RenderMan Studio Versions
#
####################################################################
rmanVersionDB := prman/supportedRManVersions.txt
rmsVersions := $(subst RMS,,$(notdir $(wildcard prman/plugins/RMS*)))
####################################################################
#
# V-Ray Location
#
####################################################################
vrayLocation := $(MAYA_LOCATION)/vray
vrayPluginsLocation := $(vrayLocation)/vrayplugins
vrayVersionDB := $(shell vrayPlug/getMayaConfig.sh $(mayaVersion) versionDB)
vrayTags := $(shell vrayPlug/getMayaConfig.sh $(mayaVersion) versionTags)
####################################################################
#
# Maya Module File
#
####################################################################
moduleFile := $(package).mod
moduleBase := $(MAYA_LOCATION)/modules
moduleLocation := $(moduleBase)/Epic Games/$(package)
.PHONY: module-file
module-file:
@echo "+ "$(package)" "$(pluginVersion)" "$(moduleLocation) \
>$(moduleFile)
####################################################################
#
# Cleanup
#
####################################################################
clean:
-rm -f *.o
Clean:
-rm -f *.o *.so *.bak
####################################################################
#
# Install
#
####################################################################
.PHONY: install
install:
install -d "$(INSTALL_ROOT)$(moduleBase)"
install -m 644 $(moduleFile) "$(INSTALL_ROOT)$(moduleBase)"
install -d "$(INSTALL_ROOT)$(moduleLocation)"
install -m 644 Install.html "$(INSTALL_ROOT)$(moduleLocation)"
install -m 644 arnold/supportedMtoAVersions.txt "$(INSTALL_ROOT)$(moduleLocation)"
install -m 644 prman/supportedRManVersions.txt "$(INSTALL_ROOT)$(moduleLocation)"
install -m 644 vrayPlug/supportedVrayVersions.txt "$(INSTALL_ROOT)$(moduleLocation)"
@# Shave plugin
install -d "$(INSTALL_ROOT)$(moduleLocation)/plug-ins"
install -m 644 mayaPlug/shaveNode.so "$(INSTALL_ROOT)$(moduleLocation)/plug-ins"
install -d "$(INSTALL_ROOT)$(MAYA_LOCATION)/lib"
install -m 644 mayaPlug/libShave.so "$(INSTALL_ROOT)$(MAYA_LOCATION)/lib"
install -m 644 mayaPlug/$(libShaveEngine) "$(INSTALL_ROOT)$(MAYA_LOCATION)/lib"
install -m 644 mayaPlug/libShaveAPI.so "$(INSTALL_ROOT)$(MAYA_LOCATION)/lib"
@# MEL Scripts
install -d "$(INSTALL_ROOT)$(moduleLocation)/scripts"
install -m 644 $(melScripts) "$(INSTALL_ROOT)$(moduleLocation)/scripts"
@# Maya shaders
install -d "$(INSTALL_ROOT)$(MAYA_LOCATION)/bin/Cg"
install -m 644 CgFx/shaveHair.cgfx "$(INSTALL_ROOT)$(MAYA_LOCATION)/bin/Cg"
@# Shave standalone SDK
install -d "$(INSTALL_ROOT)$(MAYA_LOCATION)/include/maya"
install -m 644 mayaPlug/shaveAPI.h "$(INSTALL_ROOT)$(MAYA_LOCATION)/include/maya"
install -m 644 mayaPlug/shaveItHair.h "$(INSTALL_ROOT)$(MAYA_LOCATION)/include/maya"
install -d "$(INSTALL_ROOT)$(moduleLocation)/samples"
for f in $(notdir $(sampleFiles)); do \
install -m 644 mayaPlug/$$f "$(INSTALL_ROOT)$(moduleLocation)/samples"; \
done
install -m 644 mayaPlug/README-samples.linux "$(INSTALL_ROOT)$(moduleLocation)/samples/README"
@# Icons
install -d "$(INSTALL_ROOT)$(moduleLocation)/icons"
install -m 644 mayaPlug/icons/shaveDefaultSwatch.xpm "$(INSTALL_ROOT)$(moduleLocation)/icons"
install -m 644 mayaPlug/icons/shaveDefaultSwatch.png "$(INSTALL_ROOT)$(moduleLocation)/icons"
@# Presets
install -d "$(INSTALL_ROOT)$(MAYA_LOCATION)/presets/attrPresets/shaveHair"
install -m 644 $(wildcard presets/*.mel) "$(INSTALL_ROOT)$(MAYA_LOCATION)/presets/attrPresets/shaveHair"
install -m 644 $(wildcard presets/*.xpm) "$(INSTALL_ROOT)$(MAYA_LOCATION)/presets/attrPresets/shaveHair"
install -m 644 $(wildcard presets/*.png) "$(INSTALL_ROOT)$(MAYA_LOCATION)/presets/attrPresets/shaveHair"
@# More icons
install -d "$(INSTALL_ROOT)$(MAYA_LOCATION)/icons"
install -m 444 mayaPlug/icons/*.xpm \
"$(INSTALL_ROOT)$(MAYA_LOCATION)/icons"
install -m 444 mayaPlug/icons/*.png \
"$(INSTALL_ROOT)$(MAYA_LOCATION)/icons"
@# Arnold extensions and shaders
install -d "$(INSTALL_ROOT)$(arnoldLocation)/extensions"
install -m 644 $(wildcard arnold/shave-*.so) "$(INSTALL_ROOT)$(arnoldLocation)/extensions"
install -m 644 $(wildcard arnold/shave-*.py) "$(INSTALL_ROOT)$(arnoldLocation)/extensions"
install -d "$(INSTALL_ROOT)$(arnoldLocation)/shaders"
install -m 644 $(wildcard arnold/shave_shaders-*.so) "$(INSTALL_ROOT)$(arnoldLocation)/shaders"
@# RenderMan plugins and shaders
install -d "$(INSTALL_ROOT)$(moduleLocation)/plug-ins/prman/shaders"
install -m 644 prman/Shave.slo "$(INSTALL_ROOT)$(moduleLocation)/plug-ins/prman/shaders"
install -d "$(INSTALL_ROOT)$(moduleLocation)/plug-ins/prman/shaders/src"
install -m 644 prman/Shave.sl "$(INSTALL_ROOT)$(moduleLocation)/plug-ins/prman/shaders/src"
install -d "$(INSTALL_ROOT)$(moduleLocation)/plug-ins/prman/RMS19"
for v in $(rmsVersions); do \
install -d "$(INSTALL_ROOT)$(moduleLocation)/plug-ins/prman/RMS$$v"; \
for f in prman/plugins/RMS$$v/*; do \
if `test -f $$f`; then \
install -m 644 $$f "$(INSTALL_ROOT)$(moduleLocation)/plug-ins/prman/RMS$$v"; \
fi; \
done; \
done
@# V-Ray exporter lib
install -d "$(INSTALL_ROOT)$(moduleLocation)/plug-ins/vray"
for f in mayaPlug/vray/libShaveVray*Exporter.so; do \
install -m 644 $$f "$(INSTALL_ROOT)$(moduleLocation)/plug-ins/vray"; \
done
@# V-Ray plugins and shaders
install -d "$(INSTALL_ROOT)$(vrayLocation)"
install -d "$(INSTALL_ROOT)$(vrayPluginsLocation)"
for f in vrayPlug/*.so; do \
install -m 644 $$f "$(INSTALL_ROOT)$(vrayPluginsLocation)"; \
done
####################################################################
#
# RPM Distribution
#
####################################################################
#
# Create the RPM file.
#
# We do it in a subdirectory of the current directory, so that the user has
# access to it, as opposed to /usr/src/redhat, which only the superuser can
# access.
#
rpmTemp := `pwd`/rpm
rpm: module-file spec-file build-archive
echo $(versionedPackageName).tgz
@# Create a temporary RPM build tree.
@rm -rf $(rpmTemp)
@install -d $(rpmTemp)/BUILD
@install -d $(rpmTemp)/RPMS
@install -d $(rpmTemp)/RPMS/$(targetArch)
@install -d $(rpmTemp)/SOURCES
@install -d $(rpmTemp)/SPECS
@install -d $(rpmTemp)/SRPMS
@# Copy the source archive and spec file into the temp build tree.
@mv $(versionedPackageName).tgz $(rpmTemp)/SOURCES
@cp $(package).spec $(rpmTemp)/SPECS
@# Build a binary RPM
@rpmbuild -bb --target $(targetArch)-who-Linux \
--define "_topdir "$(rpmTemp) \
--buildroot $(rpmTemp)/install $(rpmTemp)/SPECS/$(package).spec
@# Move the binary RPM out of the tree and into the current directory.
@mv $(rpmTemp)/RPMS/$(targetArch)/*.rpm .
@# Delete the temp build tree and other generated files.
@rm -rf $(rpmTemp)
@rm -f $(package).spec
@rm -f $(moduleFile)
#
# Create a spec file for this release, using spec.in as a template.
#
.PHONY: spec-file
spec-file:
@echo "# This file was automatically generated from spec.in" >$(package).spec
@m4 -P \
-D_PACKAGE_="$(package)" \
-D_PACKAGE_FULL_="$(packageFull)" \
-D_VERSION_="$(pluginVersion)" \
-D_RELEASE_="$(release)" \
-D_MAYA_MAJOR_VERSION_="$(mayaMajorVersion)" \
-D_MAYA_MINOR_VERSION_="$(mayaMinorVersion)" \
-D_MAYA_SUB_VERSION_="$(mayaSubVersion)" \
-D_MAYA_LOCATION_="$(MAYA_LOCATION)" \
-D_MODULE_BASE_="$(moduleBase)" \
-D_MODULE_LOCATION_="$(moduleLocation)" \
-D_MAYA_VRAYPLUGINS_LOCATION_="$(vrayPluginsLocation)" \
-D_MAYA_RPM_VERSION_REQUIRED_="$(mayaRPMVersionRequired)" \
spec.in >> $(package).spec
@# Add the package's file specifications to the end of the spec file.
@echo "%attr(644, root, root) \"$(moduleBase)/$(moduleFile)\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(moduleLocation)/Install.html\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(moduleLocation)/$(notdir $(arnoldVersionDB))\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(moduleLocation)/$(notdir $(rmanVersionDB))\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(moduleLocation)/$(notdir $(vrayVersionDB))\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(moduleLocation)/plug-ins/shaveNode.so\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(MAYA_LOCATION)/bin/Cg/shaveHair.cgfx\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(MAYA_LOCATION)/lib/libShave.so\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(MAYA_LOCATION)/lib/$(libShaveEngine)\"" \
>> $(package).spec
@for f in $(notdir $(sampleFiles)); do \
echo "%attr(644, root, root) \"$(moduleLocation)/samples/$$f\"" \
>> $(package).spec; \
done
@echo "%attr(644, root, root) \"$(moduleLocation)/samples/README\"" \
>> $(package).spec
@for f in $(notdir $(melScripts)); do \
echo "%attr(644, root, root) \"$(moduleLocation)/scripts/$$f\"" \
>> $(package).spec; \
done
@echo "%attr(644, root, root) \"$(MAYA_LOCATION)/lib/libShaveAPI.so\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(MAYA_LOCATION)/include/maya/shaveAPI.h\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(MAYA_LOCATION)/include/maya/shaveItHair.h\"" \
>> $(package).spec
@# Icons
@echo "%attr(644, root, root) \"$(moduleLocation)/icons/shaveDefaultSwatch.xpm\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(moduleLocation)/icons/shaveDefaultSwatch.png\"" \
>> $(package).spec
@for f in $(notdir $(wildcard libexe/icons/maya/selection/*.xpm)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard libexe/icons/maya/selection/*.png)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard libexe/icons/maya/selectUtils/*.xpm)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard libexe/icons/maya/selectUtils/*.png)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard libexe/icons/maya/tools/*.xpm)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard libexe/icons/maya/tools/*.png)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard libexe/icons/maya/transforms/*.xpm)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard libexe/icons/maya/transforms/*.png)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard libexe/icons/maya/utils/*.xpm)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard libexe/icons/maya/utils/*.png)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard mayaPlug/icons/*.xpm)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard mayaPlug/icons/*.png)); do \
echo "%attr(444, root, root) \"$(MAYA_LOCATION)/icons/$$f\"" \
>> $(package).spec; \
done
@# Presets
@for f in $(notdir $(wildcard presets/*.mel)); do \
echo "%attr(644, root, root) \"$(MAYA_LOCATION)/presets/attrPresets/shaveHair/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard presets/*.xpm)); do \
echo "%attr(644, root, root) \"$(MAYA_LOCATION)/presets/attrPresets/shaveHair/$$f\"" \
>> $(package).spec; \
done
@for f in $(notdir $(wildcard presets/*.png)); do \
echo "%attr(644, root, root) \"$(MAYA_LOCATION)/presets/attrPresets/shaveHair/$$f\"" \
>> $(package).spec; \
done
@# Arnold shaders and plugins
echo "for spec-file arnoldVersions is '$(arnoldVersions)'"
@for v in $(arnoldVersions); do \
mtoaVersion=$${v/\/*/}; \
arnoldVersion=$${v/*\//}; \
echo "%attr(644, root, root) \"$(arnoldLocation)/extensions/shave-$${mtoaVersion//./_}.so\"" >> $(package).spec; \
echo "%attr(644, root, root) \"$(arnoldLocation)/extensions/shave-$${mtoaVersion//./_}.py\"" >> $(package).spec; \
echo "%attr(644, root, root) \"$(arnoldLocation)/shaders/shave_shaders-$${arnoldVersion//./_}.so\"" >> $(package).spec; \
done
@# RenderMan shaders and plugins
@echo "%attr(644, root, root) \"$(moduleLocation)/plug-ins/prman/shaders/Shave.slo\"" \
>> $(package).spec
@echo "%attr(644, root, root) \"$(moduleLocation)/plug-ins/prman/shaders/src/Shave.sl\"" \
>> $(package).spec
@for v in $(rmsVersions); do \
for f in prman/plugins/RMS$$v/maya$(mayaMajorVersion)/linux/*; do \
if `test -f $$f`; then \
echo "%attr(644, root, root) \"$(moduleLocation)/plug-ins/prman/RMS$$v/`basename $$f`\"" \
>> $(package).spec; \
fi; \
done; \
done
@# VRay shaders and plugins
for tag in $(vrayTags); do \
echo "%attr(644, root, root) \"$(vrayPluginsLocation)/libvray_Shave$${tag}.so\"" \
>> $(package).spec; \
echo "%attr(644, root, root) \"$(vrayPluginsLocation)/ShaveSh$${tag}.so\"" \
>> $(package).spec; \
echo "%attr(644, root, root) \"$(moduleLocation)/plug-ins/vray/libShaveVray$${tag}Exporter.so\"" \
>> $(package).spec; \
done
#
# Create an archive, in tgz format, of the files needed by rpmbuild to
# create the RPM file.
#
# Note that normally we would create a source archive and then let rpmbuild
# rebuild the binaries for us. However, when generating RPMs for several
# different versions of Maya, the libexe binaries only need to be built
# once while the others need to be rebuilt for each RPM.
#
# So we handle the building in a script outside of this Makefile and then
# just use this Makefile to put the finished binaries into an RPM.
#
.PHONY: build-archive
build-archive:
@# If a subdirectory with the same name as the package already
@# exists, remove it.
@rm -rf $(versionedPackageName);
@# Create a subdirectory with the same name as the package.
@mkdir $(versionedPackageName)
@# Copy the module file, Makefile and spec file into the main directory
@cp $(moduleFile) Makefile.linux $(package).spec $(versionedPackageName)
@# Copy the installation documentation
@cp install/docs/Install.html $(versionedPackageName)
@cp $(arnoldVersionDB) $(versionedPackageName)
@cp $(rmanVersionDB) $(versionedPackageName)
@cp $(vrayVersionDB) $(versionedPackageName)
@# Copy any utils scripts that this Makefile will need during install
@mkdir $(versionedPackageName)/utils
@# Copy the plugins and executables into their appropriate directories
@mkdir $(versionedPackageName)/mayaPlug
@cp mayaPlug/shaveNode.so $(versionedPackageName)/mayaPlug
@cp mayaPlug/libShave.so $(versionedPackageName)/mayaPlug
@cp libexe/$(libShaveEngine) $(versionedPackageName)/mayaPlug
@cp mayaPlug/libShaveAPI.so $(versionedPackageName)/mayaPlug
@cp mayaPlug/shaveAPI.h $(versionedPackageName)/mayaPlug
@cp mayaPlug/shaveItHair.h $(versionedPackageName)/mayaPlug
@mkdir $(versionedPackageName)/CgFx
@cp CgFx/shaveHair.cgfx $(versionedPackageName)/CgFx
@mkdir $(versionedPackageName)/mayaPlug/icons
@cp libexe/icons/maya/selection/*.xpm \
$(versionedPackageName)/mayaPlug/icons
@cp libexe/icons/maya/selection/*.png \
$(versionedPackageName)/mayaPlug/icons
@cp libexe/icons/maya/selectUtils/*.xpm \
$(versionedPackageName)/mayaPlug/icons
@cp libexe/icons/maya/selectUtils/*.png \
$(versionedPackageName)/mayaPlug/icons
@cp libexe/icons/maya/tools/*.xpm \
$(versionedPackageName)/mayaPlug/icons
@cp libexe/icons/maya/tools/*.png \
$(versionedPackageName)/mayaPlug/icons
@cp libexe/icons/maya/transforms/*.xpm \
$(versionedPackageName)/mayaPlug/icons
@cp libexe/icons/maya/transforms/*.png \
$(versionedPackageName)/mayaPlug/icons
@cp libexe/icons/maya/utils/*.xpm \
$(versionedPackageName)/mayaPlug/icons
@cp libexe/icons/maya/utils/*.png \
$(versionedPackageName)/mayaPlug/icons
@cp mayaPlug/icons/*.xpm $(versionedPackageName)/mayaPlug/icons
@cp mayaPlug/icons/*.png $(versionedPackageName)/mayaPlug/icons
@for f in $(sampleFiles); do \
cp $$f $(versionedPackageName)/mayaPlug/`basename $$f`; \
done
@cp mayaPlug/README-samples.linux $(versionedPackageName)/mayaPlug
@mkdir $(versionedPackageName)/presets
@cp presets/*.mel $(versionedPackageName)/presets
@cp presets/*.xpm $(versionedPackageName)/presets
@cp presets/*.png $(versionedPackageName)/presets
@mkdir $(versionedPackageName)/arnold
@cp arnold/getMayaConfig.sh $(versionedPackageName)/arnold
@cp arnold/supportedMtoAVersions.txt $(versionedPackageName)/arnold
echo "for build-archive arnoldVersions is '$(arnoldVersions)'"
@for v in $(arnoldVersions); do \
mtoaVersion=$${v/\/*/}; \
sdkVersion=$${v/*\//}; \
cp arnold/Release/$(mayaVersion)/$${mtoaVersion}/shave.so $(versionedPackageName)/arnold/shave-$${mtoaVersion//./_}.so; \
cp arnold/plugin/shave.py $(versionedPackageName)/arnold/shave-$${mtoaVersion//./_}.py; \
cp arnold/Release/$(mayaVersion)/$${mtoaVersion}/shave_shaders-$${sdkVersion//./_}.so $(versionedPackageName)/arnold; \
done
@mkdir $(versionedPackageName)/prman
@cp prman/supportedRManVersions.txt $(versionedPackageName)/prman
@cp libexe/Shave.slo $(versionedPackageName)/prman
@cp libexe/Shave.sl $(versionedPackageName)/prman
@for v in $(rmsVersions); do \
mkdir -p $(versionedPackageName)/prman/plugins/RMS$$v; \
for f in prman/plugins/RMS$$v/maya$(mayaMajorVersion)/linux/*; do \
if `test -f $$f`; then \
cp $$f $(versionedPackageName)/prman/plugins/RMS$$v; \
fi; \
done; \
done
mkdir $(versionedPackageName)/vrayPlug
mkdir $(versionedPackageName)/mayaPlug/vray
@cp vrayPlug/getMayaConfig.sh $(versionedPackageName)/vrayPlug
@cp vrayPlug/supportedVrayVersions.txt $(versionedPackageName)/vrayPlug
for tag in $(vrayTags); do \
cp vrayPlug/bin/linux_x64/libvray_Shave$${tag}.so $(versionedPackageName)/vrayPlug; \
cp vrayPlug/bin/linux_x64/ShaveSh$${tag}.so $(versionedPackageName)/vrayPlug; \
cp mayaPlug/vray/libShaveVray$${tag}Exporter.so $(versionedPackageName)/mayaPlug/vray; \
done
@mkdir $(versionedPackageName)/libexe
@# Copy the scripts into the 'scripts' subdirectory.
@mkdir $(versionedPackageName)/scripts
@cp $(melScripts) $(versionedPackageName)/scripts
@# tar it all up
@rm -f $(versionedPackageName).tgz
@tar czf $(versionedPackageName).tgz $(versionedPackageName)
@rm -rf $(versionedPackageName)
|