Addes libopenjpeg (jpeg2000) support to the Makefiles
[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 CPPFLAGS += -I../gpu
72
73 # Only used by py_demo.c !!!
74 CPPFLAGS += -I../radiosity/extern/include
75
76 CPPFLAGS += -I$(SRCHOME)/gameengine/Physics/Sumo/include
77 CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
78 CPPFLAGS += -I$(NAN_MEMUTIL)/include
79
80 CPPFLAGS += -I$(NAN_DECIMATION)/include
81 CPPFLAGS += -I$(NAN_BSP)/include
82 CPPFLAGS += -I$(NAN_OPENNL)/include
83
84 CPPFLAGS += -I../readstreamglue
85 CPPFLAGS += -I../include
86
87 ifdef NAN_BUILDINFO
88     CPPFLAGS += -DNAN_BUILDINFO
89 endif
90
91 ifeq ($(OS),linux)
92     ifeq ($(CPU),alpha)
93         CPPFLAGS += -I$(NAN_MESA)/include
94     endif
95     ifeq ($(CPU),i386)
96         CPPFLAGS += -I$(NAN_MESA)/include
97     endif
98     ifeq ($(CPU),powerpc)
99         CPPFLAGS += -I/usr/src/MesaCVS/include
100     endif
101 endif
102
103 ifeq ($(WITH_QUICKTIME),true)
104         CPPFLAGS += -I../quicktime
105         CPPFLAGS += -DWITH_QUICKTIME
106 endif
107
108 ifeq ($(WITH_ICONV), true)
109         CPPFLAGS += -DWITH_ICONV
110         CPPFLAGS += $(NAN_ICONV_INC)
111 endif
112
113 ifeq ($(WITH_FFMPEG),true)
114         CPPFLAGS += -DWITH_FFMPEG
115         CPPFLAGS += $(NAN_FFMPEGCFLAGS)
116 endif
117
118 ifdef NAN_PTHREADS
119         CPPFLAGS += -I$(NAN_PTHREADS)/include
120 endif
121
122 ifeq ($(WITH_OPENEXR),true)
123         CPPFLAGS += -DWITH_OPENEXR
124 endif
125
126 ifeq ($(WITH_DDS),true)
127         CPPFLAGS += -DWITH_DDS
128 endif
129
130 ifeq ($(WITH_OPENJPEG),true)
131         CPPFLAGS += -DWITH_OPENJPEG
132 endif
133
134 ifeq ($(INTERNATIONAL), true)
135     CPPFLAGS += -DINTERNATIONAL
136 endif
137
138 ifeq ($(WITH_VERSE), true)
139    CPPFLAGS += -DWITH_VERSE
140    CPPFLAGS += -I$(NAN_VERSE)/include
141    # print some other debug information
142    ifeq ($(VERSE_DEBUG_PRINT), true)
143        CPPFLAGS += -DVERSE_DEBUG_PRINT
144    endif
145 endif
146
147 ifeq ($(NAN_TWEAK_MODE), true)
148     CPPFLAGS += -DTWEAK_MODE
149 endif
150
151 CPPFLAGS += -I$(NAN_GLEW)/include
152 CPPFLAGS += -I$(OPENGL_HEADERS)