TARGET	= logger_impl_test
INCDIR	= ../../../l7vsd/include
SRCDIR	= ../../../l7vsd/src
CC	= g++
CFLAGS	= -O0 -g -Wall -Werror -pthread #-fprofile-arcs -ftest-coverage
LD	= g++
LIBS	= -L/usr/lib64 -lrt \
				-llog4cxx -ldl \
				-lboost_system-mt \
				-lboost_thread-mt \
				-lboost_unit_test_framework-mt 
LDFLAGS	= 
PARAMETERDIR	= ./parameter_stub
PARAMETER	= $(PARAMETERDIR)/parameter.a
LOGGER_PROCESS = -DLOGGER_PROCESS_VSD
SNMPDIR		=../../../l7vsd/snmpagent

SRCS	=  \
	  strict_time_based_rolling_policy_stub.cpp \
	  time_and_size_based_rolling_policy_stub.cpp \
	  logger_impl_test.cpp 
#	  $(SRCDIR)/logger_impl.cpp \
#	  $(SRCDIR)/strict_time_based_rolling_policy.cpp \
#	  $(SRCDIR)/time_and_size_based_rolling_policy.cpp \
#	  logger_impl_test.cpp 

.SUFFIXES: .cpp .o
.cpp.o:
	$(CC) $(CFLAGS) $(LOGGER_PROCESS) -DLOGGER_CONSOLE=\"./test.log\" -I/usr/include/apr-1/ -I./ -I$(PARAMETERDIR) -I$(INCDIR) -I$(SRCDIR) -I$(SNMPDIR) -l$(PARAMETER) -c $< -o $@

OBJS	= $(SRCS:.cpp=.o)

all:	$(TARGET)

$(TARGET): $(OBJS) $(PARAMETER)
	$(LD) $(LDFLAGS) $(LIBS) -o $(TARGET) $(OBJS) $(PARAMETER) #/usr/lib64/libboost_unit_test_framework.a

$(PARAMETER):
	$(MAKE) -C $(PARAMETERDIR)

logger_impl_cpp_test.o: $(SRCDIR)logger_impl.cpp

clean:
	rm -f $(TARGET) *.o
	$(MAKE) -C $(PARAMETERDIR) clean
