diff --git a/Makefile b/Makefile index f69b12b92a..e004eb30be 100644 --- a/Makefile +++ b/Makefile @@ -74,8 +74,8 @@ srcdir ?= src CXX ?= c++ AR ?= ar PIC ?= PIC -BUILD_TYPE ?= default -SHARED ?= 1 +BUILD_TYPE ?= "default" +SHARED ?= "1" # Internal Variables @@ -84,7 +84,7 @@ include_path = $(prefix)/$(includedir) # BUILD_TYPE specific settings ifeq ($(BUILD_TYPE), debug) - CXXFLAGS : = $(cxxflags_debug) $(CXXFLANGS_EXTRA) + CXXFLAGS = $(cxxflags_debug) libname := $(libname_debug) else CXXFLAGS ?= $(cxxflags_default) diff --git a/SConstruct b/SConstruct index 1dbf72d0dc..7fdaca4c7b 100644 --- a/SConstruct +++ b/SConstruct @@ -104,3 +104,15 @@ wsperf = SConscript('#/examples/wsperf/SConscript', echo_server = SConscript('#/examples/echo_server/SConscript', variant_dir = builddir + 'echo_server', duplicate = 0) + +echo_client = SConscript('#/examples/echo_client/SConscript', + variant_dir = builddir + 'echo_client', + duplicate = 0) + +chat_client = SConscript('#/examples/chat_client/SConscript', + variant_dir = builddir + 'chat_client', + duplicate = 0) + +chat_server = SConscript('#/examples/chat_server/SConscript', + variant_dir = builddir + 'chat_server', + duplicate = 0) diff --git a/examples/chat_client/SConscript b/examples/chat_client/SConscript new file mode 100644 index 0000000000..c987382aa6 --- /dev/null +++ b/examples/chat_client/SConscript @@ -0,0 +1,21 @@ +## chat_client +## + +Import('env') +Import('boostlibs') +Import('wslib') +Import('platform_libs') + +localenv = env.Clone () + +sources = ["chat_client","chat_client_handler.cpp"] + +LIBS = [wslib, platform_libs] + boostlibs(['system', + 'date_time', + 'regex', + 'thread', + 'random']) + +prg = localenv.Program('chat_client', sources, LIBS = LIBS) + +Return('prg') diff --git a/examples/chat_server/SConscript b/examples/chat_server/SConscript new file mode 100644 index 0000000000..fe5bbd949d --- /dev/null +++ b/examples/chat_server/SConscript @@ -0,0 +1,20 @@ +## chat_server +## + +Import('env') +Import('boostlibs') +Import('wslib') +Import('platform_libs') + +localenv = env.Clone () + +sources = ["chat_server.cpp","chat.cpp"] + +LIBS = [wslib, platform_libs] + boostlibs(['system', + 'date_time', + 'regex', + 'thread']) + +prg = localenv.Program('chat_server', sources, LIBS = LIBS) + +Return('prg') diff --git a/examples/echo_client/SConscript b/examples/echo_client/SConscript new file mode 100644 index 0000000000..84e56f1318 --- /dev/null +++ b/examples/echo_client/SConscript @@ -0,0 +1,21 @@ +## echo_client +## + +Import('env') +Import('boostlibs') +Import('wslib') +Import('platform_libs') + +localenv = env.Clone () + +sources = ["echo_client.cpp"] + +LIBS = [wslib, platform_libs] + boostlibs(['system', + 'date_time', + 'regex', + 'thread', + 'random']) + +prg = localenv.Program('echo_client', sources, LIBS = LIBS) + +Return('prg')