[FEATURE] add tizen network socket probes
[platform/core/system/swap-probe.git] / Makefile
1 CURDIR = `pwd`
2 INSTALLDIR = usr/lib
3
4 DUMMY_VERSION = 0.0.1
5
6 INC_COMMON = -I./include \
7                          -I./probe_thread \
8                          -I/usr/include/system \
9                          -I/usr/include/appfw \
10                          -I/usr/include/ecore-1 \
11                          -I/usr/include/evas-1 \
12                          -I/usr/include/eina-1 \
13                          -I/usr/include/eina-1/eina \
14                          -I/usr/include/elementary-1 \
15                          -I/usr/include/eet-1 \
16                          -I/usr/include/edje-1 \
17                          -I/usr/include/efreet-1 \
18                          -I/usr/include/ethumb-1 \
19                          -I/usr/include/e_dbus-1 \
20                          -I/usr/include/dbus-1.0 \
21                          -I/usr/lib/dbus-1.0/include
22 INC_CAPI = $(INC_COMMON) #-I/usr/include/vconf -I/usr/include/pixman-1
23 INC_TIZEN = $(INC_COMMON) -I/usr/include/osp
24
25 COMMON_SRCS =   ./helper/libdaprobe.c \
26                                 ./helper/dahelper.c \
27                                 ./helper/btsym.c \
28                                 ./helper/dacollection.c \
29                                 ./helper/dacapture.c \
30                                 ./probe_memory/libdamemalloc.c \
31                                 ./probe_memory/libdamemmanage.c \
32                                 ./custom_chart/da_chart.c \
33                                 ./probe_socket/libdasocket.c \
34                                 ./probe_event/da_event.c \
35                                 ./probe_event/keytouch.c \
36                                 ./probe_event/orientation.c \
37                                 ./probe_third/libdaemon.c \
38                                 ./probe_thread/libdathread.c \
39                                 ./probe_thread/libdasync.c \
40                                 ./probe_userfunc/libdauserfunc.c \
41                                 ./probe_file/da_io_posix.c \
42                                 ./probe_file/da_io_stdc.c
43
44 CAPI_SRCS =$(COMMON_SRCS) \
45                         ./helper/addr-capi.c \
46                         ./probe_capi/capi_appfw.c \
47                         ./probe_ui/capi_capture.c
48
49 TIZEN_SRCS =    $(COMMON_SRCS) \
50                         ./helper/addr-tizen.c \
51                         ./probe_memory/libdanew.cpp \
52                         ./probe_tizenapi/tizen_file.cpp \
53                         ./probe_tizenapi/tizen_socket.cpp \
54                         ./probe_tizenapi/tizen_thread.cpp \
55                         ./probe_tizenapi/tizen_lifecycle.cpp \
56                         ./probe_tizenapi/tizen_sync.cpp \
57                         ./probe_tizenapi/tizen_controls.cpp \
58                         ./probe_tizenapi/tizen_constructor.cpp \
59                         ./probe_event/gesture.cpp \
60                         ./probe_ui/tizen_capture.cpp \
61                         ./probe_ui/tizen_scenemanager.cpp \
62                         ./probe_ui/tizen_frameani.cpp \
63                         ./probe_ui/tizen_display.cpp \
64                         ./probe_graphics/da_gles20.cpp
65
66 DUMMY_SRCS = ./custom_chart/da_chart_dummy.c
67
68 CAPI_TARGET = da_probe_capi.so
69 TIZEN_TARGET = da_probe_tizen.so
70 DUMMY_TARGET = libdaprobe.so
71
72 COMMON_FLAGS = -D_GNU_SOURCE -fPIC -shared -Wall -funwind-tables -fomit-frame-pointer -Xlinker --no-undefined
73 CAPI_FLAGS = $(COMMON_FLAGS)
74 TIZEN_FLAGS = $(COMMON_FLAGS) -DTIZENAPP
75
76 LIBDIR_COMMON = 
77 LIBDIR_CAPI = $(LIBDIR_COMMON) 
78 LIBDIR_TIZEN = $(LIBDIR_COMMON) -L/usr/lib/osp
79
80 COMMON_LDFLAGS = -ldl -lpthread -lrt -lecore -levas -lecore_input -leina -lecore_x -lcapi-system-runtime-info -lcapi-appfw-application -lX11 -lXext
81 CAPI_LDFLAGS = $(COMMON_LDFLAGS)
82 TIZEN_LDFLAGS = $(COMMON_LDFLAGS) -lstdc++ -losp-uifw -losp-appfw
83 DUMMY_LDFLAGS =
84
85 all:    $(CAPI_TARGET) $(TIZEN_TARGET) $(DUMMY_TARGET)
86 capi:   $(CAPI_TARGET)
87 tizen:  $(TIZEN_TARGET)
88 dummy:  $(DUMMY_TARGET)
89
90 headers:
91         cat ./scripts/api_names.txt | awk -f ./scripts/gen_api_id_mapping_header.awk > include/api_id_mapping.h
92         cat ./scripts/api_names.txt | awk -f ./scripts/gen_api_id_mapping_header_list.awk > include/api_id_list.h
93         cat ./scripts/api_names.txt | awk -f ./scripts/gen_api_id_mapping_list.awk > include/id_list
94
95 $(CAPI_TARGET): $(CAPI_SRCS)
96         $(CC) $(INC_CAPI) $(CAPI_FLAGS) $(LIBDIR_CAPI) -o $@ $(CAPI_SRCS) $(CAPI_LDFLAGS)
97
98 $(TIZEN_TARGET): $(TIZEN_SRCS)
99         $(CC) $(INC_TIZEN) $(TIZEN_FLAGS) $(LIBDIR_TIZEN) -o $@ $(TIZEN_SRCS) $(TIZEN_LDFLAGS)
100
101 $(DUMMY_TARGET): $(DUMMY_SRCS)
102         $(CC) $(INC_TIZEN) $(COMMON_FLAGS) -o $@ $(DUMMY_SRCS) $(DUMMY_LDFLAGS)
103
104 install:
105         [ -d "$(DESTDIR)/$(INSTALLDIR)" ] || mkdir -p $(DESTDIR)/$(INSTALLDIR)
106         install $(TIZEN_TARGET) $(DUMMY_TARGET) $(DESTDIR)/$(INSTALLDIR)/
107
108 clean:
109         rm -f *.so *.o
110