-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile.master
60 lines (51 loc) · 3.09 KB
/
Makefile.master
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
# These may be changed to $(TOP_SRCDIR)/../openfx and $(TOP_SRCDIR)/../openfx-supportext if openfx and openfx-supportext are not included as submodules
OFXPATH ?= $(TOP_SRCDIR)/openfx
OFXSEXTPATH ?= $(TOP_SRCDIR)/SupportExt
PATHTOROOT = $(OFXPATH)/Support
include $(PATHTOROOT)/Plugins/Makefile.master
CXXFLAGS += -DOFX_EXTENSIONS_VEGAS -DOFX_EXTENSIONS_NUKE -DOFX_EXTENSIONS_TUTTLE -DOFX_EXTENSIONS_NATRON -I$(TOP_SRCDIR)/IOSupport -I$(OFXSEXTPATH) -I$(OFXSEXTPATH)/glad
VPATH += $(TOP_SRCDIR)/IOSupport $(TOP_SRCDIR)/IOSupport/SequenceParsing $(OFXSEXTPATH) $(OFXSEXTPATH)/glad
# Comment the following two lines to disable OpenGL support in OpenColorIO plugins
OCIO_OPENGL_CXXFLAGS += -DOFX_SUPPORTS_OPENGLRENDER
# Comment the following three lines to disable OpenColorIO support
OCIO_CXXFLAGS += `pkg-config --cflags OpenColorIO` -DOFX_IO_USING_OCIO $(OCIO_OPENGL_CXXFLAGS)
OCIO_LINKFLAGS += `pkg-config --libs OpenColorIO` $(OCIO_OPENGL_LINKFLAGS)
ifeq ($(OS),Linux)
OCIO_LINKFLAGS += -Wl,-rpath,`pkg-config --variable=libdir OpenColorIO`
endif
ifeq ($(shell pkg-config --modversion OpenColorIO | sed -e 's/\..*//'),2)
#OCIO_OPENGL_LINKFLAGS += -lOpenColorIOoglapphelpers
endif
# OpenEXR
# OpenImageIO includes OpenEXR as #include <OpenEXR/ImathVec.h>, to we also add the
# include dir itself to avoid confusion with a system-installed OpenEXR.
# OpenEXR 2 has IlmBase, OpenEXR 3 has Imath, so we ask for both, but it will always cause harmless errors.
OPENEXR_CXXFLAGS = -I`pkg-config --variable=prefix OpenEXR`/include `pkg-config --cflags IlmBase 2>/dev/null` `pkg-config --cflags Imath 2>/dev/null` `pkg-config --cflags OpenEXR`
OPENEXR_LINKFLAGS =`pkg-config --libs IlmBase 2>/dev/null` `pkg-config --libs Imath 2>/dev/null` `pkg-config --libs OpenEXR`
# Uncomment the following line to enable multithreaded EXR reading (untested, and probably does not make sense)
#OPENEXR_CXXFLAGS += -DOFX_IO_MT_EXR
# FFmpeg
FFMPEG_CXXFLAGS = `pkg-config --cflags libavformat libavcodec libswscale libavutil`
FFMPEG_LINKFLAGS = `pkg-config --libs libavformat libavcodec libswscale libavutil`
# Uncomment the following line to enable multithreaded ffmpeg reading
FFMPEG_CXXFLAGS += -DOFX_IO_MT_FFMPEG
# OpenImageIO
OIIO_CXXFLAGS = $(OCIO_CXXFLAGS) `pkg-config --cflags OpenImageIO` $(OPENEXR_CFLAGS) -DOFX_IO_USING_LIBRAW `pkg-config --cflags libraw_r libwebp libtiff-4 libopenjp2 libpng`
OIIO_LINKFLAGS = $(OCIO_LINKFLAGS) `pkg-config --libs OpenImageIO` $(OPENEXR_LINKFLAGS) `pkg-config --libs libraw_r libwebp libtiff-4 libopenjp2 libpng`
ifeq ($(OS),Linux)
# libraw_r may be in a separate directory for licence reasons (eg in the Natron SDK)
OIIO_LINKFLAGS += -Wl,-rpath,`pkg-config --variable=prefix OpenImageIO`/lib -Wl,-rpath,`pkg-config --variable=libdir libraw_r`
endif
#SeExpr
SEEXPR_HOME ?=/usr
SEEXPR_CXXFLAGS = -I$(SEEXPR_HOME)/include
SEEXPR_LINKFLAGS = -L$(SEEXPR_HOME)/lib -lSeExpr
ifeq ($(OS),Linux)
SEEXPR_LINKFLAGS += -Wl,-rpath,$(SEEXPR_HOME)/lib
endif
#libPNG
PNG_CXXFLAGS = `pkg-config --cflags libpng`
PNG_LINKFLAGS = `pkg-config --libs libpng` -lz
ifeq ($(OS),Linux)
PNG_LINKFLAGS += -Wl,-rpath,`pkg-config --variable=libdir libpng`
endif