if target_os not in ['windows', 'winrt']:
liboctbstack_env.AppendUnique(CFLAGS = ['-Wall'])
-if target_os == 'android':
- liboctbstack_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
- liboctbstack_env.AppendUnique(LIBS = ['coap', 'm'])
+liboctbstack_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+liboctbstack_env.AppendUnique(LIBS = ['coap', 'm'])
if target_os == 'arduino':
liboctbstack_env.AppendUnique(CPPDEFINES = ['NDEBUG', 'WITH_ARDUINO'])
if target_os in ['darwin', 'ios']:
liboctbstack_env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
- liboctbstack_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
- liboctbstack_env.AppendUnique(LIBS = ['coap'])
if not env.get('RELEASE'):
liboctbstack_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
--- /dev/null
+
+Import('env')
+
+samples_env = env.Clone()
+######################################################################
+# Build flags
+######################################################################
+samples_env.PrependUnique(CPPPATH = [
+ '../../../../ocsocket/include',
+ '../../../../logger/include',
+ '../../../../stack/include',
+ '../../../../ocmalloc/include',
+ '../../../../../../extlibs/cjson',
+ '../../../../../oc_logger/include'
+ ])
+
+samples_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread'])
+
+samples_env.AppendUnique(LIBS = ['-lpthread'])
+
+samples_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+samples_env.PrependUnique(LIBS = ['oc', 'octbstack', 'coap', 'oc_logger', 'm'])
+
+samples_env.AppendUnique(CPPDEFINES = ['CA_INT', 'TB_LOG'])
+
+######################################################################
+# Source files and Targets
+######################################################################
+ocserver = samples_env.Program('ocserver', ['ocserver.cpp', 'common.cpp'])
+occlient = samples_env.Program('occlient', ['occlient.cpp', 'common.cpp'])
+ocserverslow = samples_env.Program('ocserverslow', ['ocserverslow.cpp', 'common.cpp'])
+occlientslow = samples_env.Program('occlientslow', ['occlientslow.cpp', 'common.cpp'])
+ocservercoll = samples_env.Program('ocservercoll', ['ocservercoll.cpp', 'common.cpp'])
+occlientcoll = samples_env.Program('occlientcoll', ['occlientcoll.cpp', 'common.cpp'])
+ocserverbasicops = samples_env.Program('ocserverbasicops', ['ocserverbasicops.cpp', 'common.cpp'])
+occlientbasicops = samples_env.Program('occlientbasicops', ['occlientbasicops.cpp', 'common.cpp'])
+
+Alias("samples", [ocserver, occlient,
+ ocservercoll, occlientcoll,
+ ocserverbasicops, occlientbasicops,
+ ocserverslow, occlientslow
+ ])
+
+env.AppendTarget('samples')
+