Imported Upstream version 1.1.0
[platform/upstream/iotivity.git] / service / simulator / ramlparser / SConscript
1 #******************************************************************\r
2 #\r
3 # Copyright 2015 Samsung Electronics All Rights Reserved.\r
4 #\r
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
6 #\r
7 # Licensed under the Apache License, Version 2.0 (the "License");\r
8 # you may not use this file except in compliance with the License.\r
9 # You may obtain a copy of the License at\r
10 #\r
11 #      http://www.apache.org/licenses/LICENSE-2.0\r
12 #\r
13 # Unless required by applicable law or agreed to in writing, software\r
14 # distributed under the License is distributed on an "AS IS" BASIS,\r
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16 # See the License for the specific language governing permissions and\r
17 # limitations under the License.\r
18 #\r
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
20 \r
21 import os\r
22 Import('env')\r
23 lib_env = env.Clone()\r
24 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')\r
25 raml_env = lib_env.Clone()\r
26 \r
27 ######################################################################\r
28 # Build flags\r
29 ######################################################################\r
30 raml_env.AppendUnique(CPPPATH = ['../../../extlibs/timer'])\r
31 raml_env.AppendUnique(CPPPATH = ['raml/model','raml/jsonSchemaParser','raml', '../../../extlibs/yaml/yaml/src' , '../../../extlibs/yaml/yaml/include'])\r
32 raml_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread'])\r
33 raml_env.AppendUnique(CPPDEFINES = ['LINUX'])\r
34 \r
35 raml_env.Append( RPATH = env.Literal('\\$$ORIGIN'))\r
36 \r
37 raml_env.AppendUnique(CPPPATH = ['../../../extlibs/cjson/'])\r
38 raml_env.PrependUnique(LIBS = ['octbstack', 'YamlParser'])\r
39 raml_env.AppendUnique(LIBS = ['pthread'])\r
40 \r
41 raml_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])\r
42 \r
43 ######################################################################\r
44 # Source files and Targets\r
45 ######################################################################\r
46 raml_src = [env.Glob('raml/model/*.cpp'), env.Glob('raml/jsonSchemaParser/*.cpp'), env.Glob('raml/*.cpp')]\r
47 ramlsdk = raml_env.SharedLibrary('RamlParser', raml_src)\r
48 \r
49 raml_env.InstallTarget(ramlsdk, 'libRaml')\r
50 \r
51 SConscript('../../../extlibs/yaml/SConscript')\r