6 INC_COMMON = -I./include \
8 -I/usr/include/system \
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
25 COMMON_SRCS = ./helper/libdaprobe.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
44 CAPI_SRCS =$(COMMON_SRCS) \
45 ./helper/appfw-capi.c \
46 ./helper/addr-capi.c \
47 ./probe_capi/capi_appfw.c \
48 ./probe_ui/capi_capture.c
50 TIZEN_SRCS = $(COMMON_SRCS) \
51 ./helper/appfw-tizen.cpp \
52 ./helper/addr-tizen.c \
53 ./probe_memory/libdanew.cpp \
54 ./probe_tizenapi/tizen_file.cpp \
55 ./probe_tizenapi/tizen_socket.cpp \
56 ./probe_tizenapi/tizen_http.cpp \
57 ./probe_tizenapi/tizen_thread.cpp \
58 ./probe_tizenapi/tizen_lifecycle.cpp \
59 ./probe_tizenapi/tizen_sync.cpp \
60 ./probe_tizenapi/tizen_controls.cpp \
61 ./probe_tizenapi/tizen_constructor.cpp \
62 ./probe_event/gesture.cpp \
63 ./probe_ui/tizen_capture.cpp \
64 ./probe_ui/tizen_scenemanager.cpp \
65 ./probe_ui/tizen_frameani.cpp \
66 ./probe_ui/tizen_display.cpp \
67 ./probe_graphics/da_gles20.cpp
69 DUMMY_SRCS = ./custom_chart/da_chart_dummy.c
71 CAPI_TARGET = da_probe_capi.so
72 TIZEN_TARGET = da_probe_tizen.so
73 DUMMY_TARGET = libdaprobe.so
75 COMMON_FLAGS = -D_GNU_SOURCE -fPIC -shared -Wall -funwind-tables -fomit-frame-pointer -Xlinker --no-undefined -Werror -Wextra -O2 -Wwrite-strings -Wlogical-op -Wpacked -Winline -isystem /usr/include/osp
76 CAPI_FLAGS = $(COMMON_FLAGS)
77 TIZEN_FLAGS = $(COMMON_FLAGS) -DTIZENAPP
80 LIBDIR_CAPI = $(LIBDIR_COMMON)
81 LIBDIR_TIZEN = $(LIBDIR_COMMON) -L/usr/lib/osp
83 COMMON_LDFLAGS = -ldl -lpthread -lrt -lecore -levas -lecore_input -leina -lecore_x -lcapi-system-runtime-info -lcapi-appfw-application -lX11 -lXext
84 CAPI_LDFLAGS = $(COMMON_LDFLAGS)
85 TIZEN_LDFLAGS = $(COMMON_LDFLAGS) -lstdc++ -losp-uifw -losp-appfw
88 all: $(CAPI_TARGET) $(TIZEN_TARGET) $(DUMMY_TARGET)
90 tizen: $(TIZEN_TARGET)
91 dummy: $(DUMMY_TARGET)
94 cat ./scripts/api_names.txt | awk -f ./scripts/gen_api_id_mapping_header.awk > include/api_id_mapping.h
95 cat ./scripts/api_names.txt | awk -f ./scripts/gen_api_id_mapping_header_list.awk > include/api_id_list.h
96 cat ./scripts/api_names.txt | awk -f ./scripts/gen_api_id_mapping_list.awk > include/id_list
98 $(CAPI_TARGET): $(CAPI_SRCS) headers
99 $(CC) $(INC_CAPI) $(CAPI_FLAGS) $(LIBDIR_CAPI) -o $@ $(CAPI_SRCS) $(CAPI_LDFLAGS)
101 $(TIZEN_TARGET): $(TIZEN_SRCS) headers
102 $(CC) $(INC_TIZEN) $(TIZEN_FLAGS) $(LIBDIR_TIZEN) -o $@ $(TIZEN_SRCS) $(TIZEN_LDFLAGS)
104 $(DUMMY_TARGET): $(DUMMY_SRCS) headers
105 $(CC) $(INC_TIZEN) $(COMMON_FLAGS) -o $@ $(DUMMY_SRCS) $(DUMMY_LDFLAGS)
108 [ -d "$(DESTDIR)/$(INSTALLDIR)" ] || mkdir -p $(DESTDIR)/$(INSTALLDIR)
109 install $(TIZEN_TARGET) $(DUMMY_TARGET) $(DESTDIR)/$(INSTALLDIR)/
110 install -m 644 include/id_list $(DESTDIR)/$(INSTALLDIR)/da_api_map