Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorStefan Gartner <stefang@aon.at>2009-12-21 13:38:04 +0300
committerStefan Gartner <stefang@aon.at>2009-12-21 13:38:04 +0300
commit5e6e3453a581f7f2bafae1ce4ebeba113a523c86 (patch)
treee63901f340c6e2e0c8f3f82fa128fd5127ef6c27 /source
parentf7f06d96f3c13623448d899e1fe2577ed6cbf996 (diff)
OS X: added support for building with Cocoa to Makefiles
to build with Cocoa support, set WITH_COCOA to true in user-def.mk
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/Makefile2
-rw-r--r--source/blender/quicktime/apple/Makefile3
-rw-r--r--source/nan_compile.mk27
-rw-r--r--source/nan_link.mk7
4 files changed, 30 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile
index 7923ea1e7de..e4e4e859ed3 100644
--- a/source/blender/makesrna/intern/Makefile
+++ b/source/blender/makesrna/intern/Makefile
@@ -75,7 +75,7 @@ ifeq ($(WITH_OPENJPEG), true)
endif
ifeq ($(WITH_QUICKTIME), true)
- CPPFLAGS += -DWITH_QUICKTIME
+ CPPFLAGS += -DWITH_QUICKTIME -I../../quicktime
endif
ifeq ($(WITH_SDL),true)
diff --git a/source/blender/quicktime/apple/Makefile b/source/blender/quicktime/apple/Makefile
index 0cee45e3af0..19f87ed31e3 100644
--- a/source/blender/quicktime/apple/Makefile
+++ b/source/blender/quicktime/apple/Makefile
@@ -52,6 +52,5 @@ CPPFLAGS += -I..
# stuff needed by quicktime_[import|export].c
CPPFLAGS += -I../../blenloader -I../../imbuf/intern -I../../imbuf
CPPFLAGS += -I../../blenlib -I../../makesdna -I../../editors/include -I../../avi
-CPPFLAGS += -I../../blenkernel -I../../render/extern/include
-
+CPPFLAGS += -I../../blenkernel -I../../render/extern/include -I../../windowmanager -I../../makesrna
diff --git a/source/nan_compile.mk b/source/nan_compile.mk
index 258d06c07b9..9036d0a0f34 100644
--- a/source/nan_compile.mk
+++ b/source/nan_compile.mk
@@ -73,15 +73,18 @@ ifeq ($(OS),darwin)
CC ?= gcc
CCC ?= g++
ifeq ($(CPU),powerpc)
- CFLAGS += -pipe -fPIC -ffast-math -mcpu=7450 -mtune=G5 -funsigned-char -fno-strict-aliasing -Wno-long-double
- CCFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -Wno-long-double
+ CFLAGS += -pipe -fPIC -ffast-math -mcpu=7450 -mtune=G5 -funsigned-char -fno-strict-aliasing
+ CCFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -wno-long-double
else
CFLAGS += -pipe -fPIC -ffast-math -march=pentium-m -funsigned-char -fno-strict-aliasing
- CCFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing
+ CCFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -wno-long-double
endif
# REL_CFLAGS += -O
# REL_CCFLAGS += -O2
CPPFLAGS += -D_THREAD_SAFE
+ ifeq ($(WITH_COCOA), true)
+ CPPFLAGS += -DGHOST_COCOA
+ endif
NAN_DEPEND = true
OPENGL_HEADERS = /System/Library/Frameworks/OpenGL.framework
AR = ar
@@ -307,6 +310,20 @@ $(DIR)/$(DEBUG_DIR)%.o: %.cpp
$(CCC) -c $(CCFLAGS) $(CPPFLAGS) $< -o $@
endif
+$(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
+
$(DIR)/$(DEBUG_DIR)%.res: %.rc
ifeq ($(FREE_WINDOWS),true)
windres $< -O coff -o $@
@@ -332,16 +349,18 @@ CCSRCS ?= $(wildcard *.cpp)
JSRCS ?= $(wildcard *.java)
ifdef NAN_DEPEND
--include $(CSRCS:%.c=$(DIR)/$(DEBUG_DIR)%.d) $(CCSRCS:%.cpp=$(DIR)/$(DEBUG_DIR)%.d)
+-include $(CSRCS:%.c=$(DIR)/$(DEBUG_DIR)%.d) $(CCSRCS:%.cpp=$(DIR)/$(DEBUG_DIR)%.d) $(OCSRCS:$.mm=$(DIR)/$(DEBUG_DIR)%.d)
endif
OBJS_AR := $(OBJS)
OBJS_AR += $(CSRCS:%.c=%.o)
OBJS_AR += $(CCSRCS:%.cpp=%.o)
+OBJS_AR += $(OCSRCS:%.mm=%.o)
OBJS_AR += $(WINRC:%.rc=%.res)
OBJS += $(CSRCS:%.c=$(DIR)/$(DEBUG_DIR)%.o)
OBJS += $(CCSRCS:%.cpp=$(DIR)/$(DEBUG_DIR)%.o)
+OBJS += $(OCSRCS:%.mm=$(DIR)/$(DEBUG_DIR)%.o)
OBJS += $(WINRC:%.rc=$(DIR)/$(DEBUG_DIR)%.res)
JCLASS += $(JSRCS:%.java=$(DIR)/$(DEBUG_DIR)%.class)
diff --git a/source/nan_link.mk b/source/nan_link.mk
index f8bb8e8660d..0524ee7592d 100644
--- a/source/nan_link.mk
+++ b/source/nan_link.mk
@@ -54,8 +54,11 @@ ifeq ($(OS),darwin)
LLIBS += -lz -lstdc++
ifdef USE_OSX10.4STUBS
LLIBS +=-lSystemStubs
- endif
- LLIBS += -framework Carbon -framework AGL -framework OpenGL
+ endif
+ ifeq ($(WITH_COCOA), true)
+ LLIBS += -framework Cocoa
+ endif
+ LLIBS += -framework Carbon -framework AGL -framework OpenGL
LLIBS += -framework QuickTime -framework CoreAudio
LLIBS += -framework AudioUnit -framework AudioToolbox
LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries