|  | @ -9,6 +9,8 @@ | 
		
	
		
			
				|  |  | LIBS = pthread |  |  | LIBS = pthread | 
		
	
		
			
				|  |  | TOP_DIR   = $(PWD) |  |  | TOP_DIR   = $(PWD) | 
		
	
		
			
				|  |  | TEST_DIR = $(BUILD_DIR)/test |  |  | TEST_DIR = $(BUILD_DIR)/test | 
		
	
		
			
				|  |  |  |  |  | INCLUDE_DIR = -I . \
 | 
		
	
		
			
				|  |  |  |  |  |               -I ./include  | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | # comment this out if you want debug compile info
 |  |  | # comment this out if you want debug compile info
 | 
		
	
		
			
				|  |  | #Q=@
 |  |  | #Q=@
 | 
		
	
	
		
			
				|  | @ -16,10 +18,10 @@ TEST_DIR = $(BUILD_DIR)/test | 
		
	
		
			
				|  |  | ifeq ($(MAKECMDGOALS),test) |  |  | ifeq ($(MAKECMDGOALS),test) | 
		
	
		
			
				|  |  |    GCOV := --coverage |  |  |    GCOV := --coverage | 
		
	
		
			
				|  |  |    CPPUTEST_HOME := $(TOP_DIR)/test/cpputest |  |  |    CPPUTEST_HOME := $(TOP_DIR)/test/cpputest | 
		
	
		
			
				|  |  |    TEST_FW_INCS := -I$(CPPUTEST_HOME)/include -I. |  |  |  | 
		
	
		
			
				|  |  |  |  |  |    INCLUDE_DIR += -I$(CPPUTEST_HOME)/include -I. | 
		
	
		
			
				|  |  |    SUPRESS_WARNINGS := -Wno-write-strings |  |  |    SUPRESS_WARNINGS := -Wno-write-strings | 
		
	
		
			
				|  |  |    CFLAGS_TEST := -DUNIT_TEST $(TEST_FW_INCS) $(GCOV) -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorMallocMacros.h |  |  |  | 
		
	
		
			
				|  |  |    CXXFLAGS_TEST := -DUNIT_TEST $(TEST_FW_INCS) -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorNewMacros.h $(SUPRESS_WARNINGS) |  |  |  | 
		
	
		
			
				|  |  |  |  |  |    CFLAGS_TEST := -DUNIT_TEST  $(GCOV) -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorMallocMacros.h | 
		
	
		
			
				|  |  |  |  |  |    CXXFLAGS_TEST := -DUNIT_TEST -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorNewMacros.h $(SUPRESS_WARNINGS) | 
		
	
		
			
				|  |  |    APP_PREFIX  := test_ |  |  |    APP_PREFIX  := test_ | 
		
	
		
			
				|  |  |    LIBS += CppUTest pthread gcov dl |  |  |    LIBS += CppUTest pthread gcov dl | 
		
	
		
			
				|  |  |    CPPUTEST_BUILD := $(CPPUTEST_HOME)/cpputest_build |  |  |    CPPUTEST_BUILD := $(CPPUTEST_HOME)/cpputest_build | 
		
	
	
		
			
				|  | @ -38,13 +40,13 @@ BUILD_DIR = $(PWD)/build/app | 
		
	
		
			
				|  |  | SRC_C   := $(wildcard *.c)  |  |  | SRC_C   := $(wildcard *.c)  | 
		
	
		
			
				|  |  | SRC_CPP  := $(wildcard *.cpp) |  |  | SRC_CPP  := $(wildcard *.cpp) | 
		
	
		
			
				|  |  | endif |  |  | endif | 
		
	
		
			
				|  |  | SRC_H   += $(wildcard *.h)  |  |  |  | 
		
	
		
			
				|  |  |  |  |  | SRC_H   += $(wildcard *.h) $(wildcard include/*.h) | 
		
	
		
			
				|  |  | SRC_HPP  += $(wildcard *.hpp) |  |  | SRC_HPP  += $(wildcard *.hpp) | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | OUT_BINARY = $(APP_PREFIX)lwrserv |  |  | OUT_BINARY = $(APP_PREFIX)lwrserv | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | CC = g++ |  |  | CC = g++ | 
		
	
		
			
				|  |  | GLOBAL_FLAGS = -g -o2 -ansi -pedantic -DHAVE_SOCKLEN_T |  |  |  | 
		
	
		
			
				|  |  |  |  |  | GLOBAL_FLAGS = -g -o2 -ansi -pedantic -DHAVE_SOCKLEN_T $(INCLUDE_DIR) | 
		
	
		
			
				|  |  | CFLAGS   = $(GLOBAL_FLAGS) $(CFLAGS_TEST) |  |  | CFLAGS   = $(GLOBAL_FLAGS) $(CFLAGS_TEST) | 
		
	
		
			
				|  |  | CXXFLAGS = $(GLOBAL_FLAGS) $(CFLAGS_TEST) |  |  | CXXFLAGS = $(GLOBAL_FLAGS) $(CFLAGS_TEST) | 
		
	
		
			
				|  |  | CPPFLAGS = $(GLOBAL_FLAGS) $(CFLAGS_TEST) |  |  | CPPFLAGS = $(GLOBAL_FLAGS) $(CFLAGS_TEST) | 
		
	
	
		
			
				|  | 
 |