2009-03-19 01:50:45 +00:00
|
|
|
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
|
|
|
|
# vim: tabstop=8
|
2002-10-12 11:37:38 +00:00
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
2008-04-16 22:40:48 +00:00
|
|
|
# ***** BEGIN GPL LICENSE BLOCK *****
|
2002-10-12 11:37:38 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
2008-04-16 22:40:48 +00:00
|
|
|
# of the License, or (at your option) any later version.
|
2002-10-12 11:37:38 +00:00
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-10-12 11:37:38 +00:00
|
|
|
#
|
|
|
|
# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# The Original Code is: all of this file.
|
|
|
|
#
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
# Contributor(s): GSR, Stefan Gartner
|
2002-10-12 11:37:38 +00:00
|
|
|
#
|
2008-04-16 22:40:48 +00:00
|
|
|
# ***** END GPL LICENSE BLOCK *****
|
2002-10-12 11:37:38 +00:00
|
|
|
#
|
|
|
|
# Compile and archive
|
|
|
|
|
|
|
|
include nan_definitions.mk
|
|
|
|
|
|
|
|
CPPFLAGS ?= $(NAN_CPPFLAGS)
|
|
|
|
|
|
|
|
# common parts ---------------------------------------------------
|
|
|
|
|
2004-11-14 13:44:47 +00:00
|
|
|
# Uncomment next lines to enable integrated game engine
|
2005-02-18 16:52:03 +00:00
|
|
|
ifneq ($(NAN_NO_KETSJI), true)
|
|
|
|
CFLAGS += -DGAMEBLENDER=1
|
2005-08-18 06:07:02 +00:00
|
|
|
ifeq ($(NAN_USE_BULLET), true)
|
2009-08-18 04:15:28 +00:00
|
|
|
CFLAGS += -DUSE_BULLET
|
|
|
|
CCFLAGS += -DUSE_BULLET
|
2005-08-18 06:07:02 +00:00
|
|
|
endif
|
2005-02-18 16:52:03 +00:00
|
|
|
else
|
|
|
|
CPPFLAGS += -DNO_KETSJI
|
|
|
|
endif
|
2002-12-19 22:06:32 +00:00
|
|
|
|
2009-04-20 15:06:46 +00:00
|
|
|
ifeq ($(BF_PROFILE), true)
|
|
|
|
CFLAGS += -pg
|
|
|
|
CCFLAGS += -pg
|
|
|
|
endif
|
|
|
|
|
2008-03-14 20:11:43 +00:00
|
|
|
ifeq ($(WITH_BF_OPENMP), true)
|
|
|
|
CFLAGS += -fopenmp
|
|
|
|
CCFLAGS += -fopenmp
|
|
|
|
endif
|
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
ifdef NAN_DEBUG
|
|
|
|
CFLAGS += $(NAN_DEBUG)
|
|
|
|
CCFLAGS += $(NAN_DEBUG)
|
|
|
|
endif
|
|
|
|
|
2009-09-13 22:34:47 +00:00
|
|
|
REL_CFLAGS += -DNDEBUG
|
|
|
|
REL_CCFLAGS += -DNDEBUG
|
|
|
|
DBG_CFLAGS += -g
|
|
|
|
DBG_CCFLAGS += -g
|
2002-10-12 11:37:38 +00:00
|
|
|
|
|
|
|
# OS dependent parts ---------------------------------------------------
|
|
|
|
|
|
|
|
ifeq ($(OS),darwin)
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
CC ?= gcc
|
2009-09-13 22:34:47 +00:00
|
|
|
CCC ?= g++
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
ifeq ($(MACOSX_DEPLOYMENT_TARGET), 10.4)
|
|
|
|
CC = gcc-4.0
|
|
|
|
CCC = g++-4.0
|
2009-09-13 22:34:47 +00:00
|
|
|
else
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
ifeq ($(MACOSX_DEPLOYMENT_TARGET), 10.5)
|
|
|
|
CC = gcc-4.2
|
|
|
|
CCC = g++-4.2
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
ifeq ($(CPU),powerpc)
|
2010-04-18 20:47:05 +00:00
|
|
|
CFLAGS += -pipe -fPIC -mcpu=7450 -mtune=G5 -funsigned-char -fno-strict-aliasing
|
|
|
|
CCFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
else
|
2010-04-18 20:47:05 +00:00
|
|
|
CFLAGS += -pipe -fPIC -funsigned-char
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
CCFLAGS += -pipe -fPIC -funsigned-char
|
2009-09-13 22:34:47 +00:00
|
|
|
endif
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
CFLAGS += -arch $(MACOSX_ARCHITECTURE) #-isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MACOSX_MIN_VERS)
|
|
|
|
CCFLAGS += -arch $(MACOSX_ARCHITECTURE) #-isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MACOSX_MIN_VERS)
|
|
|
|
|
|
|
|
ifeq ($(MACOSX_ARCHITECTURE), $(findstring $(MACOSX_ARCHITECTURE), "i386 x86_64"))
|
2010-03-05 14:29:48 +00:00
|
|
|
REL_CFLAGS += -O2 -ftree-vectorize -msse -msse2 -msse3
|
|
|
|
REL_CCFLAGS += -O2 -ftree-vectorize -msse -msse2 -msse3
|
|
|
|
else
|
|
|
|
REL_CFLAGS += -O2
|
|
|
|
REL_CCFLAGS += -O2
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
endif
|
2010-04-18 20:47:05 +00:00
|
|
|
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
CPPFLAGS += -D_THREAD_SAFE -fpascal-strings
|
|
|
|
|
2009-12-21 10:38:04 +00:00
|
|
|
ifeq ($(WITH_COCOA), true)
|
|
|
|
CPPFLAGS += -DGHOST_COCOA
|
|
|
|
endif
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
ifeq ($(USE_QTKIT), true)
|
|
|
|
CPPFLAGS += -DUSE_QTKIT
|
|
|
|
endif
|
|
|
|
|
2009-09-13 22:34:47 +00:00
|
|
|
NAN_DEPEND = true
|
2002-10-12 11:37:38 +00:00
|
|
|
OPENGL_HEADERS = /System/Library/Frameworks/OpenGL.framework
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = ruv
|
|
|
|
RANLIB = ranlib
|
|
|
|
ARFLAGSQUIET = ru
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),freebsd)
|
2009-09-13 22:34:47 +00:00
|
|
|
CC ?= gcc
|
|
|
|
CCC ?= g++
|
2002-10-12 11:37:38 +00:00
|
|
|
JAVAC = javac
|
|
|
|
JAVAH = javah
|
2009-09-13 22:34:47 +00:00
|
|
|
CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing
|
|
|
|
CCFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing
|
|
|
|
REL_CFLAGS += -O2
|
|
|
|
REL_CCFLAGS += -O2
|
|
|
|
CPPFLAGS += -D_THREAD_SAFE
|
|
|
|
NAN_DEPEND = true
|
2002-10-12 11:37:38 +00:00
|
|
|
OPENGL_HEADERS = /usr/X11R6/include
|
|
|
|
JAVA_HEADERS = /usr/local/jdk1.3.1/include
|
|
|
|
JAVA_SYSTEM_HEADERS = /usr/local/jdk1.3.1/include/freebsd
|
2009-09-13 22:34:47 +00:00
|
|
|
AR = ar
|
2002-10-12 11:37:38 +00:00
|
|
|
ARFLAGS = ruv
|
|
|
|
ARFLAGSQUIET = ru
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),irix)
|
2008-12-14 17:32:24 +00:00
|
|
|
ifeq ($(IRIX_USE_GCC),true)
|
2009-09-13 22:34:47 +00:00
|
|
|
CC ?= gcc
|
|
|
|
CCC ?= g++
|
2008-12-14 17:32:24 +00:00
|
|
|
CFLAGS += -fPIC -funsigned-char -fno-strict-aliasing -mabi=n32 -mips4
|
|
|
|
CCFLAGS += -fPIC -fpermissive -funsigned-char -fno-strict-aliasing -mabi=n32 -mips4
|
|
|
|
REL_CFLAGS += -O2
|
2009-11-19 11:49:42 +00:00
|
|
|
REL_CCFLAGS += -O2
|
2008-12-14 17:32:24 +00:00
|
|
|
DBG_CFLAGS += -g3 -gdwarf-2 -ggdb
|
|
|
|
DBG_CCFLAGS += -g3 -gdwarf-2 -ggdb
|
|
|
|
else
|
2009-09-13 22:34:47 +00:00
|
|
|
CC ?= cc
|
|
|
|
CCC ?= CC
|
|
|
|
CFLAGS += -n32 -mips3 -Xcpluscomm
|
|
|
|
CCFLAGS += -n32 -mips3 -Xcpluscomm -LANG:std
|
2008-12-14 17:32:24 +00:00
|
|
|
ifdef MIPS73_ISOHEADERS
|
2009-09-13 22:34:47 +00:00
|
|
|
CCFLAGS += -LANG:libc_in_namespace_std=off -I$(MIPS73_ISOHEADERS)
|
2008-12-14 17:32:24 +00:00
|
|
|
else
|
2009-09-13 22:34:47 +00:00
|
|
|
CCFLAGS += -LANG:libc_in_namespace_std=off
|
2008-12-14 17:32:24 +00:00
|
|
|
endif
|
2009-09-13 22:34:47 +00:00
|
|
|
REL_CFLAGS += -n32 -mips3 -O2 -OPT:Olimit=0
|
2008-12-14 17:32:24 +00:00
|
|
|
REL_CCFLAGS += -n32 -mips3 -O2 -OPT:Olimit=0
|
|
|
|
endif
|
2002-10-12 11:37:38 +00:00
|
|
|
OPENGL_HEADERS = /usr/include
|
|
|
|
NAN_DEPEND = true
|
|
|
|
AR = CC
|
|
|
|
ARFLAGS = -ar -o
|
2008-12-14 17:32:24 +00:00
|
|
|
ARFLAGSQUIET = -ar -o
|
2002-10-12 11:37:38 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),linux)
|
2009-09-13 22:34:47 +00:00
|
|
|
CC ?= gcc
|
|
|
|
CCC ?= g++
|
|
|
|
# CFLAGS += -pipe
|
|
|
|
# CCFLAGS += -pipe
|
2010-04-18 20:47:05 +00:00
|
|
|
CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
|
|
|
|
CCFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
|
2009-09-13 22:34:47 +00:00
|
|
|
REL_CFLAGS += -O2
|
|
|
|
REL_CCFLAGS += -O2
|
2002-10-12 11:37:38 +00:00
|
|
|
NAN_DEPEND = true
|
|
|
|
ifeq ($(CPU),alpha)
|
|
|
|
CFLAGS += -mieee
|
|
|
|
endif
|
|
|
|
OPENGL_HEADERS = /usr/X11R6/include
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = ruv
|
|
|
|
ARFLAGSQUIET = ru
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),openbsd)
|
2009-09-13 22:34:47 +00:00
|
|
|
CC ?= gcc
|
|
|
|
CCC ?= g++
|
|
|
|
CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing
|
|
|
|
CCFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing
|
|
|
|
REL_CFLAGS += -O2
|
2002-10-12 11:37:38 +00:00
|
|
|
REL_CCFLAGS += -O2
|
|
|
|
NAN_DEPEND = true
|
|
|
|
CPPFLAGS += -D__FreeBSD__
|
|
|
|
OPENGL_HEADERS = /usr/X11R6/include
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = ruv
|
|
|
|
ARFLAGSQUIET = ru
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),solaris)
|
2008-01-04 11:55:37 +00:00
|
|
|
# Adding gcc flag to $CC is not good, however if its not there makesdna wont build - Campbell
|
|
|
|
ifeq (x86_64, $(findstring x86_64, $(CPU)))
|
2009-09-13 22:34:47 +00:00
|
|
|
CC ?= gcc -m64
|
|
|
|
CCC ?= g++ -m64
|
2008-01-04 11:55:37 +00:00
|
|
|
else
|
2009-09-13 22:34:47 +00:00
|
|
|
CC ?= gcc
|
|
|
|
CCC ?= g++
|
|
|
|
#CC ?= cc
|
|
|
|
#CCC ?= CC
|
2008-01-04 11:55:37 +00:00
|
|
|
endif
|
2010-04-18 20:47:05 +00:00
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
JAVAC = javac
|
|
|
|
JAVAH = javah
|
2009-09-13 22:34:47 +00:00
|
|
|
CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing
|
|
|
|
CCFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing
|
|
|
|
# CFLAGS += "-fast -xdepend -xarch=v8plus -xO3 -xlibmil -KPIC -DPIC -xchar=unsigned"
|
|
|
|
# CCFLAGS += "-fast -xdepend -xarch=v8plus -xO3 -xlibmil -xlibmopt -features=tmplife -norunpath -KPIC -DPIC -xchar=unsigned"
|
2007-12-20 16:33:45 +00:00
|
|
|
|
2008-01-04 11:55:37 +00:00
|
|
|
# Note, you might still want to compile a 32 bit binary if you have a 64bit system. if so remove the following lines
|
2007-12-21 09:30:37 +00:00
|
|
|
# ifeq ($(findstring 64,$(CPU)), 64)
|
2009-09-13 22:34:47 +00:00
|
|
|
# CFLAGS += -m64
|
|
|
|
# CCFLAGS += -m64
|
2007-12-21 09:30:37 +00:00
|
|
|
# endif
|
2007-12-20 16:33:45 +00:00
|
|
|
|
2009-09-13 22:34:47 +00:00
|
|
|
REL_CFLAGS += -O2
|
|
|
|
REL_CCFLAGS += -O2
|
2007-12-20 16:33:45 +00:00
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
NAN_DEPEND = true
|
2007-12-20 16:33:45 +00:00
|
|
|
# ifeq ($(CPU),sparc)
|
|
|
|
ifeq ($(findstring sparc,$(CPU)), sparc)
|
|
|
|
OPENGL_HEADERS = /usr/openwin/share/include
|
|
|
|
CPPFLAGS += -DSUN_OGL_NO_VERTEX_MACROS
|
|
|
|
JAVA_HEADERS = /usr/java/include
|
|
|
|
JAVA_SYSTEM_HEADERS = /usr/java/include/solaris
|
|
|
|
else
|
2008-01-04 11:55:37 +00:00
|
|
|
# OPENGL_HEADERS = /usr/X11/include/mesa
|
2009-09-13 22:34:47 +00:00
|
|
|
OPENGL_HEADERS = /usr/X11/include/
|
2007-12-20 16:33:45 +00:00
|
|
|
endif
|
2002-10-12 11:37:38 +00:00
|
|
|
AR = ar
|
|
|
|
ARFLAGS = ruv
|
|
|
|
ARFLAGSQUIET = ru
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),windows)
|
2003-05-25 05:22:46 +00:00
|
|
|
ifeq ($(FREE_WINDOWS),true)
|
2009-09-13 22:34:47 +00:00
|
|
|
CC ?= gcc
|
|
|
|
CCC ?= g++
|
2007-08-31 16:16:33 +00:00
|
|
|
CFLAGS += -pipe -mno-cygwin -mwindows -funsigned-char -fno-strict-aliasing
|
|
|
|
CCFLAGS += -pipe -mno-cygwin -mwindows -funsigned-char -fno-strict-aliasing
|
2003-05-25 05:22:46 +00:00
|
|
|
CPPFLAGS += -DFREE_WINDOWS
|
|
|
|
REL_CFLAGS += -O2
|
|
|
|
REL_CCFLAGS += -O2
|
2005-04-18 19:28:38 +00:00
|
|
|
NAN_DEPEND = true
|
2003-05-25 05:22:46 +00:00
|
|
|
#OPENGL_HEADERS = /usr/include/w32api
|
|
|
|
OPENGL_HEADERS = ./
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = ruv
|
|
|
|
ARFLAGSQUIET = ru
|
2009-09-13 22:34:47 +00:00
|
|
|
WINRC = $(wildcard *.rc)
|
2003-05-25 05:22:46 +00:00
|
|
|
RANLIB = ranlib
|
|
|
|
else
|
2009-09-13 22:34:47 +00:00
|
|
|
CC ?= $(SRCHOME)/tools/cygwin/cl_wrapper.pl
|
|
|
|
CCC ?= $(SRCHOME)/tools/cygwin/cl_wrapper.pl
|
2003-05-25 05:22:46 +00:00
|
|
|
JAVAC = $(SRCHOME)/tools/cygwin/java_wrapper.pl -c
|
|
|
|
JAVAH = $(SRCHOME)/tools/cygwin/java_wrapper.pl -h
|
2009-09-13 22:34:47 +00:00
|
|
|
REL_CFLAGS += /O2
|
2003-05-25 05:22:46 +00:00
|
|
|
REL_CCFLAGS += /O2 -GX
|
2009-09-13 22:34:47 +00:00
|
|
|
DBG_CFLAGS += /Fd$(DIR)/debug/
|
2003-05-25 05:22:46 +00:00
|
|
|
DBG_CCFLAGS += /Fd$(DIR)/debug/
|
|
|
|
CFLAGS += /MT
|
|
|
|
CCFLAGS += /MT
|
|
|
|
NAN_DEPEND = true
|
|
|
|
OPENGL_HEADERS = .
|
|
|
|
CPPFLAGS += -DWIN32 -D_WIN32 -D__WIN32
|
|
|
|
CPPFLAGS += -D_M_IX86
|
|
|
|
CPPFLAGS += -I"/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/include"
|
|
|
|
JAVA_HEADERS = /cygdrive/c/j2sdk1.4.0-beta3/include
|
|
|
|
JAVA_SYSTEM_HEADERS = /cygdrive/c/j2sdk1.4.0-beta3/include/win32
|
|
|
|
CPP = $(SRCHOME)/tools/cygwin/cl_wrapper.pl
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = ruv
|
|
|
|
ARFLAGSQUIET = ru
|
|
|
|
WINRC = $(wildcard *.rc)
|
|
|
|
endif
|
2002-10-12 11:37:38 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (debug, $(findstring debug, $(MAKECMDGOALS)))
|
|
|
|
export DEBUG_DIR=debug/
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (x$(DEBUG_DIR), x)
|
|
|
|
CFLAGS +=$(DBG_CFLAGS)
|
|
|
|
CCFLAGS+=$(DBG_CCFLAGS)
|
|
|
|
else
|
|
|
|
CFLAGS +=$(REL_CFLAGS)
|
|
|
|
CCFLAGS+=$(REL_CCFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Note: include nan_warn's LEVEL_*_WARNINGS after CC/OS have been set.
|
|
|
|
include nan_warn.mk
|
|
|
|
|
|
|
|
# compile rules
|
|
|
|
|
|
|
|
default: all
|
|
|
|
|
2006-11-17 18:29:46 +00:00
|
|
|
$(DIR)/$(DEBUG_DIR)%.o: %.c
|
2002-10-12 11:37:38 +00:00
|
|
|
ifdef NAN_DEPEND
|
|
|
|
@set -e; $(CC) -M $(CPPFLAGS) $< 2>/dev/null \
|
|
|
|
| sed 's@\($*\)\.o[ :]*@$(DIR)/$(DEBUG_DIR)\1.o : @g' \
|
|
|
|
> $(DIR)/$(DEBUG_DIR)$*.d; \
|
|
|
|
[ -s $(DIR)/$(DEBUG_DIR)$*.d ] || $(RM) $(DIR)/$(DEBUG_DIR)$*.d
|
|
|
|
endif
|
|
|
|
ifdef NAN_QUIET
|
|
|
|
@echo " -- $< -- "
|
|
|
|
@$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
|
|
|
|
else
|
|
|
|
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
|
|
|
|
endif
|
|
|
|
|
2006-11-17 18:29:46 +00:00
|
|
|
$(DIR)/$(DEBUG_DIR)%.o: %.cpp
|
2002-10-12 11:37:38 +00:00
|
|
|
ifdef NAN_DEPEND
|
|
|
|
@set -e; $(CCC) -M $(CPPFLAGS) $< 2>/dev/null \
|
|
|
|
| sed 's@\($*\)\.o[ :]*@$(DIR)/$(DEBUG_DIR)\1.o : @g' \
|
|
|
|
> $(DIR)/$(DEBUG_DIR)$*.d; \
|
|
|
|
[ -s $(DIR)/$(DEBUG_DIR)$*.d ] || $(RM) $(DIR)/$(DEBUG_DIR)$*.d
|
|
|
|
endif
|
|
|
|
ifdef NAN_QUIET
|
|
|
|
@echo " -- $< -- "
|
|
|
|
@$(CCC) -c $(CCFLAGS) $(CPPFLAGS) $< -o $@
|
|
|
|
else
|
|
|
|
$(CCC) -c $(CCFLAGS) $(CPPFLAGS) $< -o $@
|
|
|
|
endif
|
|
|
|
|
2009-12-21 10:38:04 +00:00
|
|
|
$(DIR)/$(DEBUG_DIR)%.o: %.mm
|
|
|
|
ifdef NAN_DEPEND
|
|
|
|
@set -e; $(CC) -M $(CPPFLAGS) $< 2>/dev/null \
|
|
|
|
| sed 's@\($*\)\.o[ :]*@$(DIR)/$(DEBUG_DIR)\1.o : @g' \
|
|
|
|
> $(DIR)/$(DEBUG_DIR)$*.d; \
|
|
|
|
[ -s $(DIR)/$(DEBUG_DIR)$*.d ] || $(RM) $(DIR)/$(DEBUG_DIR)$*.d
|
|
|
|
endif
|
|
|
|
ifdef NAN_QUIET
|
|
|
|
@echo " -- $< -- "
|
|
|
|
@$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
|
|
|
|
else
|
|
|
|
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
|
|
|
|
endif
|
|
|
|
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
$(DIR)/$(DEBUG_DIR)%.o: %.m
|
|
|
|
ifdef NAN_DEPEND
|
|
|
|
@set -e; $(CC) -M $(CPPFLAGS) $< 2>/dev/null \
|
|
|
|
| sed 's@\($*\)\.o[ :]*@$(DIR)/$(DEBUG_DIR)\1.o : @g' \
|
|
|
|
> $(DIR)/$(DEBUG_DIR)$*.d; \
|
|
|
|
[ -s $(DIR)/$(DEBUG_DIR)$*.d ] || $(RM) $(DIR)/$(DEBUG_DIR)$*.d
|
|
|
|
endif
|
|
|
|
ifdef NAN_QUIET
|
|
|
|
@echo " -- $< -- "
|
|
|
|
@$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
|
|
|
|
else
|
|
|
|
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2006-11-17 18:29:46 +00:00
|
|
|
$(DIR)/$(DEBUG_DIR)%.res: %.rc
|
2003-05-24 20:04:37 +00:00
|
|
|
ifeq ($(FREE_WINDOWS),true)
|
|
|
|
windres $< -O coff -o $@
|
|
|
|
else
|
2002-10-12 11:37:38 +00:00
|
|
|
$(SRCHOME)/tools/cygwin/cl_wrapper.pl - rc /fo$@ $<
|
2003-05-24 20:04:37 +00:00
|
|
|
endif
|
2002-10-12 11:37:38 +00:00
|
|
|
|
2006-11-17 18:29:46 +00:00
|
|
|
$(DIR)/$(DEBUG_DIR)%.class: %.java
|
2002-10-12 11:37:38 +00:00
|
|
|
ifdef JARS
|
|
|
|
$(JAVAC) -verbose -g -deprecation -sourcepath . -classpath "$(JARS)" -d $(DIR)/$(DEBUG_DIR) $<
|
|
|
|
else
|
|
|
|
$(JAVAC) -verbose -g -deprecation -d $(DIR)/$(DEBUG_DIR) $<
|
|
|
|
endif
|
|
|
|
|
2006-11-17 18:29:46 +00:00
|
|
|
$(DIR)/$(DEBUG_DIR)%.h: $(DIR)/$(DEBUG_DIR)%.class
|
2002-10-12 11:37:38 +00:00
|
|
|
$(JAVAH) -classpath $(DIR)/$(DEBUG_DIR) -d $(DIR)/$(DEBUG_DIR) -jni $*
|
|
|
|
|
|
|
|
%.h:
|
|
|
|
@echo "WARNING: Fake header creation rule used, dependencies will be remade"
|
|
|
|
|
|
|
|
CSRCS ?= $(wildcard *.c)
|
|
|
|
CCSRCS ?= $(wildcard *.cpp)
|
|
|
|
JSRCS ?= $(wildcard *.java)
|
|
|
|
|
|
|
|
ifdef NAN_DEPEND
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
-include $(CSRCS:%.c=$(DIR)/$(DEBUG_DIR)%.d) $(CCSRCS:%.cpp=$(DIR)/$(DEBUG_DIR)%.d) $(OCCSRCS:$.mm=$(DIR)/$(DEBUG_DIR)%.d) $(OCSRCS:$.m=$(DIR)/$(DEBUG_DIR)%.d)
|
2002-10-12 11:37:38 +00:00
|
|
|
endif
|
|
|
|
|
2006-02-22 23:26:26 +00:00
|
|
|
OBJS_AR := $(OBJS)
|
|
|
|
OBJS_AR += $(CSRCS:%.c=%.o)
|
|
|
|
OBJS_AR += $(CCSRCS:%.cpp=%.o)
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
OBJS_AR += $(OCCSRCS:%.mm=%.o)
|
|
|
|
OBJS_AR += $(OCSRCS:%.m=%.o)
|
2006-02-22 23:26:26 +00:00
|
|
|
OBJS_AR += $(WINRC:%.rc=%.res)
|
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
OBJS += $(CSRCS:%.c=$(DIR)/$(DEBUG_DIR)%.o)
|
|
|
|
OBJS += $(CCSRCS:%.cpp=$(DIR)/$(DEBUG_DIR)%.o)
|
OS X Makefiles:
* added some new variables (mostly the same as with scons):
- USE_COCOA: use Cocoa for ghost (defaults to true)
- MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture
(ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for
a different architecture, though cross compilation only works on Intel Macs, because makesdna
and makesrna are built for the target architecture.
For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC).
- MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific
OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds)
- MACOSX_SDK: path to a specific SDK. currently not used
- USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit
is mandatory in that case))
* use the same compiler flags as scons
* default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5
* extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might
break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip
When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit
builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults.
For current users of the Makefile system, this commit shouldn't change much.
2010-01-03 20:35:13 +00:00
|
|
|
OBJS += $(OCCSRCS:%.mm=$(DIR)/$(DEBUG_DIR)%.o)
|
|
|
|
OBJS += $(OCSRCS:%.m=$(DIR)/$(DEBUG_DIR)%.o)
|
2002-10-12 11:37:38 +00:00
|
|
|
OBJS += $(WINRC:%.rc=$(DIR)/$(DEBUG_DIR)%.res)
|
|
|
|
|
|
|
|
JCLASS += $(JSRCS:%.java=$(DIR)/$(DEBUG_DIR)%.class)
|
|
|
|
|
|
|
|
LIB_a = $(DIR)/$(DEBUG_DIR)lib$(LIBNAME).a
|
|
|
|
|
|
|
|
$(LIB_a): $(OBJS)
|
|
|
|
# $OBJS can be empty except for some spaces
|
|
|
|
ifneq (x, x$(strip $(OBJS)))
|
|
|
|
ifdef NAN_PARANOID
|
|
|
|
@$(RM) $(LIB_a)
|
|
|
|
ifdef NAN_QUIET
|
|
|
|
@echo " -- lib: lib$(LIBNAME).a -- "
|
2006-02-22 23:26:26 +00:00
|
|
|
@cd $(DIR)/$(DEBUG_DIR); $(AR) $(ARFLAGSQUIET) $@ $(OBJS_AR)
|
2002-10-12 11:37:38 +00:00
|
|
|
else
|
2006-02-22 23:26:26 +00:00
|
|
|
cd $(DIR)/$(DEBUG_DIR); $(AR) $(ARFLAGS) $@ $(OBJS_AR)
|
2002-10-12 11:37:38 +00:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
ifdef NAN_QUIET
|
|
|
|
@echo " -- lib: lib$(LIBNAME).a -- "
|
|
|
|
@$(AR) $(ARFLAGSQUIET) $@ $?
|
|
|
|
else
|
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
ifdef RANLIB
|
|
|
|
$(RANLIB) $@
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ALLTARGETS ?= $(LIB_a)
|
|
|
|
|
|
|
|
all debug :: makedir $(ALLTARGETS)
|
|
|
|
|
|
|
|
lib: $(LIB_a)
|
|
|
|
|
|
|
|
creator: $(OBJS)
|
|
|
|
@echo "====> make creator subtarget in `pwd | sed 's/^.*develop\///'`"
|
|
|
|
@$(MAKE) makedir DIR=$(DIR)/$(DEBUG_DIR)cre
|
|
|
|
@$(MAKE) lib CSRCS="$(CRE_CSRCS)" LIBNAME=$(LIBNAME)$@
|
|
|
|
|
|
|
|
publisher: $(OBJS)
|
|
|
|
@echo "====> make publisher subtarget in `pwd | sed 's/^.*develop\///'`"
|
|
|
|
@$(MAKE) makedir DIR=$(DIR)/$(DEBUG_DIR)pub
|
|
|
|
@$(MAKE) lib CSRCS="$(PUB_CSRCS)" LIBNAME=$(LIBNAME)$@
|
|
|
|
|
|
|
|
player: $(OBJS)
|
|
|
|
@echo "====> make player subtarget in `pwd | sed 's/^.*develop\///'`"
|
|
|
|
@$(MAKE) makedir DIR=$(DIR)/player/$(DEBUG_DIR)
|
|
|
|
@$(MAKE) lib CSRCS="$(SAP_CSRCS)" LIBNAME=$(LIBNAME)$@
|
|
|
|
|
|
|
|
clean:: optclean debugclean
|
|
|
|
|
|
|
|
optclean::
|
|
|
|
@-[ ! -d $(DIR) ] || ( cd $(DIR) && \
|
|
|
|
$(RM) *.o *.a *.d *.res ii_files/*.ii *.class *.h )
|
|
|
|
|
|
|
|
debugclean::
|
|
|
|
@-[ ! -d $(DIR)/debug ] || ( cd $(DIR)/debug && \
|
|
|
|
$(RM) *.o *.a *.d *.res ii_files/*.ii *.class *.h )
|
|
|
|
|
|
|
|
.PHONY: makedir
|
|
|
|
makedir::
|
|
|
|
@# don't use mkdir -p. Cygwin will try to make network paths and fail
|
|
|
|
@[ -d $(DIR) ] || mkdir $(DIR)
|
|
|
|
@[ -d $(DIR)/debug ] || mkdir $(DIR)/debug
|
|
|
|
|