OSDN Git Service

trunk整理
[ultramonkey-l7/ultramonkey-l7-v3.git] / l7vsd / unit_tests / module_controls_test / schedule_module_control / Makefile
1 #
2 #
3 #       Makefile for module_control unit test frameworks.
4 #
5 #
6 TARGET          = sched_schedule_module_test1.so sched_schedule_module_test2.so module_control_ut
7 TARGET2         = sched_schedule_module_test1.so sched_schedule_module_test2.so module_control_thread_ut
8 CPP                     = g++
9 CPPFLAGS        = -O0 -g -Wall -Werror -pthread -DMAX_BUFFER_SIZE=65535 -DDEBUG  -D PARAMETER_FILE='"./sample.ini"'
10 INCLUDES        =       -I../../../logger \
11                                 -I../../../parameter \
12                                 -I../../../include \
13                                 -I../../../src
14 LIBS            =       -lboost_system-mt \
15                                 -lboost_thread-mt \
16                                 -lboost_unit_test_framework-mt \
17                                 -llog4cxx \
18                                 -ldl
19
20 LDFLAGS         = -lrt -ldl
21
22 #LOGGER         = libtest_logger.a
23 #PARAMETER      = ligtest_parameter.a
24 #AR                     = ar
25 #ARFLAGS                = cru
26
27 SRCS            =       \
28                         ../../../src/schedule_module_control.cpp \
29                                 schedule_module_control_test.cpp
30
31 SRCS2           =       \
32                         ../../../src/schedule_module_control.cpp \
33                                 schedule_module_control_thread_test.cpp
34
35 SRC_M1          =       schedule_module_test1.cpp
36 SRC_M2          =       schedule_module_test2.cpp
37
38 #PARAMETER_SRCS =       \
39                         ../../../parameter/parameter.cpp \
40                         ../../../parameter/parameter_impl.cpp
41
42 #LOGGER_SRCS    =       \
43                         ../../../logger/logger.cpp \
44                         ../../../logger/logger_impl.cpp \
45                         ../../../logger/strict_time_based_rolling_policy.cpp \
46                         ../../../logger/time_and_size_based_rolling_policy.cpp
47
48 .SUFFIX:        .cpp .o
49 .cpp.o:
50                 $(CPP) $(CPPFLAGS) $(INCLUDES) -c $< -o $@
51
52 OBJS            = $(SRCS:.cpp=.o)
53 OBJS2           = $(SRCS2:.cpp=.o)
54
55 #PARAMETER_OBJS = $(PARAMETER_SRCS:.cpp=.o)
56 #LOGGER_OBJS    = $(LOGGER_SRCS:.cpp=.o)
57
58 all:    $(TARGET) $(TARGET2)
59
60 sched_schedule_module_test1.so:
61         $(CPP) $(CPPFLAGS) -shared -fPIC $(INCLUDES) $(SRC_M1) $(LDFLAGS) -o sched_schedule_module_test1.so
62
63 sched_schedule_module_test2.so:
64         $(CPP) $(CPPFLAGS) -shared -fPIC $(INCLUDES) $(SRC_M2) $(LDFLAGS) -o sched_schedule_module_test2.so
65
66 module_control_ut: $(OBJS) $(PARAMETER) $(LOGGER)
67         $(CPP) $(INCLUDES) -o module_control_ut $(OBJS) $(LIBS) $(PARAMETER) $(LOGGER)
68
69 module_control_thread_ut: $(OBJS2) $(PARAMETER) $(LOGGER)
70         $(CPP) $(INCLUDES) -o module_control_thread_ut $(OBJS2) $(LIBS) $(PARAMETER) $(LOGGER)
71
72 #$(TARGET):     $(OBJS) $(PARAMETER) $(LOGGER)
73 #       $(CPP) $(INCLUDES) -o $@ $(OBJS) $(LIBS) $(PARAMETER) $(LOGGER)
74
75 #$(PARAMETER):  $(PARAMETER_OBJS)
76 #       $(AR) $(ARFLAGS) $@ $(PARAMETER_OBJS)
77
78 #$(LOGGER):     $(LOGGER_OBJS)
79 #       $(AR) $(ARFLAGS) $@ $(LOGGER_OBJS)
80
81 clean:
82         rm -f $(TARGET) $(TARGET2) $(OBJS) $(OBJS2) $(PARAMETER) $(PARAMETER_OBJS) $(LOGGER) $(LOGGER_OBJS)