2013-12-30 23:50:56 +01:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
|
|
import os
|
2009-08-30 09:46:56 +02:00
|
|
|
|
2013-12-30 23:50:56 +01:00
|
|
|
binary = SM.ExtLibrary(builder, 'geoip.ext')
|
2017-10-02 14:18:57 +02:00
|
|
|
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
2014-09-12 02:41:25 +02:00
|
|
|
binary.compiler.cxxflags += ['-fno-rtti']
|
2017-10-02 14:18:57 +02:00
|
|
|
elif binary.compiler.family == 'msvc':
|
2014-09-12 02:41:25 +02:00
|
|
|
binary.compiler.cxxflags += ['/GR-']
|
2017-10-02 14:18:57 +02:00
|
|
|
if builder.target.platform == 'windows':
|
2013-12-30 23:50:56 +01:00
|
|
|
binary.compiler.postlink += ['wsock32.lib']
|
|
|
|
|
|
|
|
binary.sources += [
|
|
|
|
'extension.cpp',
|
|
|
|
'GeoIP.c',
|
2014-04-24 04:19:28 +02:00
|
|
|
'../../public/smsdk_ext.cpp'
|
2013-12-30 23:50:56 +01:00
|
|
|
]
|
|
|
|
|
2013-12-30 23:50:59 +01:00
|
|
|
SM.extensions += [builder.Add(binary)]
|
2012-04-14 02:12:24 +02:00
|
|
|
|