[FIX] additional Makefile fix for renaming : tizen -> capi, osp -> tizen
[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_thread.cpp \
54                         ./probe_tizenapi/tizen_lifecycle.cpp \
55                         ./probe_tizenapi/tizen_sync.cpp \
56                         ./probe_tizenapi/tizen_controls.cpp \
57                         ./probe_tizenapi/tizen_constructor.cpp \
58                         ./probe_event/gesture.cpp \
59                         ./probe_ui/tizen_capture.cpp \
60                         ./probe_ui/tizen_scenemanager.cpp \
61                         ./probe_ui/tizen_frameani.cpp \
62                         ./probe_ui/tizen_display.cpp \
63                         ./probe_graphics/da_gles20.cpp
64
65 DUMMY_SRCS = ./custom_chart/da_chart_dummy.c
66
67 CAPI_TARGET = da_probe_capi.so
68 TIZEN_TARGET = da_probe_tizen.so
69 DUMMY_TARGET = libdaprobe.so
70
71 COMMON_FLAGS = -D_GNU_SOURCE -fPIC -shared -Wall -funwind-tables -fomit-frame-pointer -Xlinker --no-undefined
72 CAPI_FLAGS = $(COMMON_FLAGS)
73 TIZEN_FLAGS = $(COMMON_FLAGS) -DTIZENAPP
74
75 LIBDIR_COMMON = 
76 LIBDIR_CAPI = $(LIBDIR_COMMON) 
77 LIBDIR_TIZEN = $(LIBDIR_COMMON) -L/usr/lib/osp
78
79 COMMON_LDFLAGS = -ldl -lpthread -lrt -lecore -levas -lecore_input -leina -lecore_x -lcapi-system-runtime-info -lcapi-appfw-application -lX11 -lXext
80 CAPI_LDFLAGS = $(COMMON_LDFLAGS)
81 TIZEN_LDFLAGS = $(COMMON_LDFLAGS) -lstdc++ -losp-uifw -losp-appfw
82 DUMMY_LDFLAGS =
83
84 all:    $(CAPI_TARGET) $(TIZEN_TARGET) $(DUMMY_TARGET)
85 capi:   $(CAPI_TARGET)
86 tizen:  $(TIZEN_TARGET)
87 dummy:  $(DUMMY_TARGET)
88
89 headers:
90         cat ./scripts/api_names.txt | awk -f ./scripts/gen_api_id_mapping_header.awk > include/api_id_mapping.h
91         cat ./scripts/api_names.txt | awk -f ./scripts/gen_api_id_mapping_header_list.awk > include/api_id_list.h
92
93 $(CAPI_TARGET): $(CAPI_SRCS)
94         $(CC) $(INC_CAPI) $(CAPI_FLAGS) $(LIBDIR_CAPI) -o $@ $(CAPI_SRCS) $(CAPI_LDFLAGS)
95
96 $(TIZEN_TARGET): $(TIZEN_SRCS)
97         $(CC) $(INC_TIZEN) $(TIZEN_FLAGS) $(LIBDIR_TIZEN) -o $@ $(TIZEN_SRCS) $(TIZEN_LDFLAGS)
98
99 $(DUMMY_TARGET): $(DUMMY_SRCS)
100         $(CC) $(INC_TIZEN) $(COMMON_FLAGS) -o $@ $(DUMMY_SRCS) $(DUMMY_LDFLAGS)
101
102 install:
103         [ -d "$(DESTDIR)/$(INSTALLDIR)" ] || mkdir -p $(DESTDIR)/$(INSTALLDIR)
104         install $(TIZEN_TARGET) $(DUMMY_TARGET) $(DESTDIR)/$(INSTALLDIR)/
105
106 clean:
107         rm -f *.so *.o
108