Merged 15170:15635 from trunk (no conflicts or even merges)
[blender.git] / source / blender / src / Makefile
1 #
2 # $Id$
3 #
4 # ***** BEGIN GPL LICENSE BLOCK *****
5 #
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software Foundation,
18 # Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19 #
20 # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 # All rights reserved.
22 #
23 # The Original Code is: all of this file.
24 #
25 # Contributor(s): none yet.
26 #
27 # ***** END GPL LICENSE BLOCK *****
28 #
29 #
30
31 ORGLIBNAME = src
32 LIBNAME ?= $(ORGLIBNAME)
33 DIR ?= $(OCGDIR)/blender/$(ORGLIBNAME)
34
35 CSRCS ?= $(wildcard *.c)
36 PUB_CSRCS ?= $(CSRCS)
37 CRE_CSRCS ?= $(CSRCS) $(wildcard cre/*.c)
38
39 OBJS = $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)DNA.o
40
41 ALLTARGETS = publisher
42
43 include nan_compile.mk
44
45 # Cflags stuff ------------------------------------------
46
47 CFLAGS += $(LEVEL_1_C_WARNINGS) 
48 #CFLAGS += $(LEVEL_1_C_WARNINGS) -diag_error 1196
49
50 # PreProcessor stuff ------------------------------------------
51
52 CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
53 CPPFLAGS += -I$(NAN_GHOST)/include
54 CPPFLAGS += -I$(NAN_BMFONT)/include
55 CPPFLAGS += -I$(NAN_ELBEEM)/include
56 CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include $(NAN_SDLCFLAGS)
57
58 # External interfaces of modules:
59 CPPFLAGS += -I../render/extern/include
60 CPPFLAGS += -I../blenkernel
61 CPPFLAGS += -I../blenlib
62 CPPFLAGS += -I../nodes
63 CPPFLAGS += -I../python
64 CPPFLAGS += -I../makesdna
65 CPPFLAGS += -I../imbuf
66 CPPFLAGS += -I../blenloader
67 CPPFLAGS += -I..
68 CPPFLAGS += -I../../kernel/gen_system
69 CPPFLAGS += -I../../gameengine/SoundSystem
70 CPPFLAGS += -I../ftfont
71
72 # Only used by py_demo.c !!!
73 CPPFLAGS += -I../radiosity/extern/include
74
75 CPPFLAGS += -I$(SRCHOME)/gameengine/Physics/Sumo/include
76 CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
77 CPPFLAGS += -I$(NAN_MEMUTIL)/include
78
79 CPPFLAGS += -I$(NAN_DECIMATION)/include
80 CPPFLAGS += -I$(NAN_BSP)/include
81 CPPFLAGS += -I$(NAN_OPENNL)/include
82
83 CPPFLAGS += -I../readstreamglue
84 CPPFLAGS += -I../include
85
86 ifdef NAN_BUILDINFO
87     CPPFLAGS += -DNAN_BUILDINFO
88 endif
89
90 ifeq ($(OS),linux)
91     ifeq ($(CPU),alpha)
92         CPPFLAGS += -I$(NAN_MESA)/include
93     endif
94     ifeq ($(CPU),i386)
95         CPPFLAGS += -I$(NAN_MESA)/include
96     endif
97     ifeq ($(CPU),powerpc)
98         CPPFLAGS += -I/usr/src/MesaCVS/include
99     endif
100 endif
101
102 ifeq ($(WITH_QUICKTIME),true)
103         CPPFLAGS += -I../quicktime
104         CPPFLAGS += -DWITH_QUICKTIME
105 endif
106
107 ifeq ($(WITH_ICONV), true)
108         CPPFLAGS += -DWITH_ICONV
109         CPPFLAGS += $(NAN_ICONV_INC)
110 endif
111
112 ifeq ($(WITH_FFMPEG),true)
113         CPPFLAGS += -DWITH_FFMPEG
114         CPPFLAGS += $(NAN_FFMPEGCFLAGS)
115 endif
116
117 ifdef NAN_PTHREADS
118         CPPFLAGS += -I$(NAN_PTHREADS)/include
119 endif
120
121 ifeq ($(WITH_OPENEXR),true)
122         CPPFLAGS += -DWITH_OPENEXR
123 endif
124
125 ifeq ($(WITH_DDS),true)
126         CPPFLAGS += -DWITH_DDS
127 endif
128
129 ifeq ($(INTERNATIONAL), true)
130     CPPFLAGS += -DINTERNATIONAL
131 endif
132
133 ifeq ($(WITH_VERSE), true)
134    CPPFLAGS += -DWITH_VERSE
135    CPPFLAGS += -I$(NAN_VERSE)/include
136    # print some other debug information
137    ifeq ($(VERSE_DEBUG_PRINT), true)
138        CPPFLAGS += -DVERSE_DEBUG_PRINT
139    endif
140 endif
141
142 ifeq ($(NAN_TWEAK_MODE), true)
143     CPPFLAGS += -DTWEAK_MODE
144 endif
145
146 CPPFLAGS += -I$(NAN_GLEW)/include
147 CPPFLAGS += -I$(OPENGL_HEADERS)