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
|
# Shave and a Haircut
# (c) 2019 Epic Games
# US Patent 6720962
#
# This Makefile builds those Shave components which are independent of any
# embedding software (e.g. Maya, C4D, XSI, etc).
#
include ../config-osx.mak
####################################################################
#
# OSX Version
#
####################################################################
osVersion := $(shell ../utils/getos.sh)
ifeq ($(findstring osx,$(osVersion)),)
$(error This Makefile is only for use on OSX)
endif
osVersion := $(subst osx,,$(osVersion))
osVersionMajor := $(word 1,$(subst ., ,$(osVersion)))
osVersionMinor := $(word 2,$(subst ., ,$(osVersion)))
osVersion := $(osVersionMajor).$(osVersionMinor)
# We must be running OS X 10.4 or later.
ifeq ($(filter-out 0 1 2 3 4 5 6 7 8 9,$(osVersionMajor)),)
$(error This is not an OS X 10.4 (or later) system.)
else ifeq ($(osVersionMajor),10)
ifeq ($(filter-out 0 1 2 3,$(osVersionMinor)),)
$(error This is not an OS X 10.4 (or later) system.)
endif
endif
CFLAGS += -fvisibility=hidden -DCC_GNU_ -DOSMac_ -DOSMacOSX_ -DOSMac_MachO_ -fpascal-strings \
-DBits64_ -arch x86_64 -D "CARBON_DEPRECATED"
LDFLAGS += -DBits64_ -arch x86_64
LIBS = -framework System \
-framework CoreServices \
-framework Carbon \
-framework ApplicationServices \
-framework OpenGL \
-framework IOKit
ifdef DEBUG
_DEBUG = 1
endif
ifdef _DEBUG
CFLAGS += -g -ggdb -fno-inline
LDFLAGS += -g
else
CFLAGS += -O3
endif
INCLUDES =
# This is a space-seprated list of source files which do not affect the
# compilation of "the blob" i.e. shavelib1forAWOSX(_INTEL).c
NON_BLOB_SOURCES =
BLOB_SOURCES = $(filter-out $(NON_BLOB_SOURCES),$(wildcard *.c) $(wildcard *.cpp) $(wildcard *.h))
#
# Note that although the source files we use have 'AW' in their names, they
# are really independent of Maya.
#
.PHONY: all
all: libShaveEngine-x86_64.dylib
libShaveEngine-x86_64.dylib: shavelib1forAWOSX_INTEL.xo
$(CC) $^ -o $@ -dynamiclib $(LDFLAGS) $(LIBS) -single_module
shavelib1forAWOSX_INTEL.xo: $(BLOB_SOURCES)
$(CC) shavelib1forAWOSX_INTEL.c -o shavelib1forAWOSX_INTEL.xo -c $(CFLAGS) $(INCLUDES) -DEXTPRIM
.PHONY: clean
clean:
rm -f libShaveEngine-x86_64.dylib *.xo
|