Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / service / simulator / ramlparser / example / 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 import os\r
21 Import('env')\r
22 lib_env = env.Clone()\r
23 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')\r
24 raml_env = lib_env.Clone()\r
25 \r
26 ######################################################################\r
27 # Build flags\r
28 ######################################################################\r
29 raml_env.AppendUnique(CPPPATH = ['../../../../extlibs/timer'])\r
30 raml_env.AppendUnique(CPPPATH = ['../raml/model','../raml/jsonSchemaParser', '../raml' , '../../../../extlibs/yaml/yaml/src' , '../../../../extlibs/yaml/yaml/include'])\r
31 raml_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread'])\r
32 raml_env.AppendUnique(CPPDEFINES = ['LINUX'])\r
33 \r
34 raml_env.AppendUnique(CPPPATH = ['../../../../extlibs/cjson/'])\r
35 raml_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'libcoap'])\r
36 raml_env.AppendUnique(LIBS = ['pthread'])\r
37 raml_env.PrependUnique(LIBS = ['RamlParser','YamlParser'])\r
38 \r
39 raml_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])\r
40 raml_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])\r
41 \r
42 if raml_env.get('SECURED') == '1':\r
43     raml_env.AppendUnique(LIBS = ['tinydtls'])\r
44 ######################################################################\r
45 # Source files and Targets\r
46 ######################################################################\r
47 raml_parser = raml_env.Program('raml-parser', 'raml_parser.cpp')\r
48 \r
49 env.AppendTarget('raml_parser')\r