comparison engine/SConscript @ 576:a21915a97237

Added some debug capability when building with mingw on windows. This should work for you if you have debug versions of python available. Added the show and hide functions to the baseobject in the RPG demo.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 05 Jul 2010 19:36:41 +0000
parents 92433f507feb
children ae479ce3f762
comparison
equal deleted inserted replaced
575:872a7a94563e 576:a21915a97237
110 msvcproj9 = env.MSVCProject9(os.path.join('..', '..','..', builders.msvcbuildpath9, 'fife'), projectfiles) 110 msvcproj9 = env.MSVCProject9(os.path.join('..', '..','..', builders.msvcbuildpath9, 'fife'), projectfiles)
111 cbproj_win32 = env.CodeblocksProjectWin32(os.path.join('..', '..','..', builders.cbbuildpath_win32, 'fife'), projectfiles) 111 cbproj_win32 = env.CodeblocksProjectWin32(os.path.join('..', '..','..', builders.cbbuildpath_win32, 'fife'), projectfiles)
112 cbproj_linux = env.CodeblocksProjectLinux(os.path.join('..', '..','..', builders.cbbuildpath_linux, 'fife'), projectfiles) 112 cbproj_linux = env.CodeblocksProjectLinux(os.path.join('..', '..','..', builders.cbbuildpath_linux, 'fife'), projectfiles)
113 113
114 114
115 if opts['DEBUG'] and sys.platform == 'win32':
116 fife_tgt = 'fife_d'
117 else:
118 fife_tgt = 'fife'
119
115 #************************************************************************** 120 #**************************************************************************
116 #shared library target 121 #shared library target
117 #************************************************************************** 122 #**************************************************************************
118 123
119 if sys.platform == 'win32': 124 if sys.platform == 'win32':
120 sharedlib = env.SharedLibrary(target = 'fife', 125 sharedlib = env.SharedLibrary(target = fife_tgt,
121 source = compilefiles, 126 source = compilefiles,
122 OBJPREFIX='shared_', 127 OBJPREFIX='shared_',
123 SHLIBEMITTER = '') 128 SHLIBEMITTER = '')
124 else: 129 else:
125 sharedlib = env.SharedLibrary(target = 'fife', 130 sharedlib = env.SharedLibrary(target = fife_tgt,
126 source = compilefiles) 131 source = compilefiles)
127 132
128 #************************************************************************** 133 #**************************************************************************
129 #python library target 134 #python library target
130 #************************************************************************** 135 #**************************************************************************
131 if sys.platform == 'win32': 136 if sys.platform == 'win32':
132 dest_suffix = '.pyd' 137 dest_suffix = '.pyd'
133 else: 138 else:
134 dest_suffix = '.so' 139 dest_suffix = '.so'
135 140
136 pythonlib = env.SharedLibrary(target = 'fife', 141 pythonlib = env.SharedLibrary(target = fife_tgt,
137 source = pyfiles, 142 source = pyfiles,
138 OBJPREFIX='py_', 143 OBJPREFIX='py_',
139 SHLIBPREFIX='_', 144 SHLIBPREFIX='_',
140 SHLIBSUFFIX=dest_suffix, 145 SHLIBSUFFIX=dest_suffix,
141 SHLIBEMITTER = '') 146 SHLIBEMITTER = '')
145 SWIGFLAGS=['-python','-c++','-w511'], 150 SWIGFLAGS=['-python','-c++','-w511'],
146 SWIGPATH='core', 151 SWIGPATH='core',
147 SWIGOUTDIR=Dir('#/engine/python/fife').srcnode().path) 152 SWIGOUTDIR=Dir('#/engine/python/fife').srcnode().path)
148 153
149 154
150 copy_dest = os.path.join(opts['PYLIB_COPY_DEST'], '_fife' + dest_suffix) 155 if opts['DEBUG'] and sys.platform == 'win32':
156 copy_dest = os.path.join(opts['PYLIB_COPY_DEST'], '_fife_d' + dest_suffix)
157 else:
158 copy_dest = os.path.join(opts['PYLIB_COPY_DEST'], '_fife' + dest_suffix)
159
151 copy_cmd = env.Command(copy_dest, pythonlib, [Copy('$TARGET', '$SOURCE')]) 160 copy_cmd = env.Command(copy_dest, pythonlib, [Copy('$TARGET', '$SOURCE')])
152 copy_cmd2 = env.Command(os.path.join(opts['WRAP_COPY_DEST'], 'fife_wrap.h'), 161 copy_cmd2 = env.Command(os.path.join(opts['WRAP_COPY_DEST'], 'fife_wrap.h'),
153 os.path.join('swigwrappers','python','fife_wrap.h'), 162 os.path.join('swigwrappers','python','fife_wrap.h'),
154 [Copy('$TARGET', '$SOURCE')]) 163 [Copy('$TARGET', '$SOURCE')])
155 copy_cmd3 = env.Command(os.path.join(opts['WRAP_COPY_DEST'], 'fife_wrap.cc'), 164 copy_cmd3 = env.Command(os.path.join(opts['WRAP_COPY_DEST'], 'fife_wrap.cc'),
158 167
159 #************************************************************************** 168 #**************************************************************************
160 #static library target 169 #static library target
161 #************************************************************************** 170 #**************************************************************************
162 171
163 staticlib = env.StaticLibrary(target = 'fife', 172 staticlib = env.StaticLibrary(target = fife_tgt,
164 source = compilefiles, 173 source = compilefiles,
165 LINKFLAGS=['-Wl']) 174 LINKFLAGS=['-Wl'])
166 175
167 #************************************************************************** 176 #**************************************************************************
168 #Install targets 177 #Install targets