TARGET	= logger_ut_test
INCDIR	= ../../../l7vsd/include
SRCDIR	= ../../../l7vsd/src
CC	= g++
CFLAGS	= -O0 -g -Wall -Werror -pthread -DPARAMETER_FILE='"./l7vs.cf"' #-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	= 
LOGGER_PROCESS = -DLOGGER_PROCESS_VSD

SRCS	= 	\
	  $(SRCDIR)/logger.cpp \
	  $(SRCDIR)/logger_impl.cpp \
	  $(SRCDIR)/logger_logrotate_utility.cpp \
          $(SRCDIR)/parameter.cpp \
	  $(SRCDIR)/parameter_impl.cpp \
	  strict_time_based_rolling_policy_stub.cpp \
	  time_and_size_based_rolling_policy_stub.cpp \
	  logger_ut_test.cpp

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

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

all:	$(TARGET)

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

logger_ut_test.o: $(SRCDIR)/logger_logrotate_utility.cpp

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


