4 samples_env = env.Clone()
5 ######################################################################
7 ######################################################################
8 samples_env.PrependUnique(CPPPATH = [
9 '../../../../ocsocket/include',
10 '../../../../logger/include',
11 '../../../../stack/include',
12 '../../../../ocmalloc/include',
13 '../../../../../../extlibs/cjson',
14 '../../../../../oc_logger/include',
15 '../../../../../connectivity/lib/libcoap-4.1.1'
18 samples_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread'])
19 samples_env.AppendUnique(LIBS = ['-lpthread'])
20 samples_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
21 samples_env.PrependUnique(LIBS = ['m', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'coap'])
22 if env.get('SECURED') == '1':
23 samples_env.AppendUnique(LIBS = ['tinydtls'])
24 samples_env.ParseConfig('pkg-config --libs glib-2.0');
26 samples_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
28 ######################################################################
29 # Source files and Targets
30 ######################################################################
31 ocserver = samples_env.Program('ocserver', ['ocserver.cpp', 'common.cpp'])
32 occlient = samples_env.Program('occlient', ['occlient.cpp', 'common.cpp'])
33 ocserverslow = samples_env.Program('ocserverslow', ['ocserverslow.cpp', 'common.cpp'])
34 occlientslow = samples_env.Program('occlientslow', ['occlientslow.cpp', 'common.cpp'])
35 ocservercoll = samples_env.Program('ocservercoll', ['ocservercoll.cpp', 'common.cpp'])
36 occlientcoll = samples_env.Program('occlientcoll', ['occlientcoll.cpp', 'common.cpp'])
37 ocserverbasicops = samples_env.Program('ocserverbasicops', ['ocserverbasicops.cpp', 'common.cpp'])
38 occlientbasicops = samples_env.Program('occlientbasicops', ['occlientbasicops.cpp', 'common.cpp'])
40 Alias("samples", [ocserver, occlient,
41 ocservercoll, occlientcoll,
42 ocserverbasicops, occlientbasicops,
43 ocserverslow, occlientslow
46 env.AppendTarget('samples')