blob: 5698036e298a70b53fac5e3a9a1867cf84a28511 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
CC :=gcc
DEBUG_CPPFLAGS = \
-DDEBUG \
-DUSE_LOG_ONCE \
# -DMALLOC_DEBUG_LEVEL=1 \#
# -DMALLOC_DEBUG_LEVEL=2 \#
# -DDEB_PRINTBUF \#
# -DPARSE_DEBUG_ON \#
# -DTHREAD_SAMPLING_DEBUG \#
# -DTHREAD_REPLAY_DEBUG #
CPPFLAGS := -I/usr/include \
-I/usr/include/system \
-I/usr/include/capi-system-info \
-I/usr/include/capi-system-runtime-info \
-I/usr/include/vconf \
$(DEBUG_CPPFLAGS)
ifeq (arm, $(findstring arm, $(shell uname -sm)))
CPPFLAGS += -DDEVICE_ONLY
endif
COMMON_LIBS := -lglib-2.0 -lpthread
TARGET_LIBS := $(COMMON_LIBS) -lvconf -lsmack -lcapi-system-info -lecore -leina -lpthread
CFLAGS := -Wall -pthread -g -O0 -I/usr/include/ecore-1 -I/usr/include/eina-1 -I/usr/include/eina-1/eina
DAEMON_SRCS = \
buffer.c \
da_data.c \
da_debug.c \
da_protocol.c \
da_protocol_inst.c \
da_inst.c \
daemon.c \
debug.c \
elf.c \
ioctl_commands.c \
main.c \
sys_stat.c \
threads.c \
transfer_thread.c \
utils.c \
da_protocol_check.c \
md5.c \
input_events.c \
device_vconf.c \
device_system_info.c \
device_camera.c \
smack.c \
malloc_debug.c
DAEMON_OBJS = $(patsubst %.c,%.o, $(DAEMON_SRCS))
TARGET = da_manager
DASCRIPT = da_command
START_SH = start.sh
STOP_SH = stop.sh
all: debug
debug release: $(TARGET_LIBS)
release: CPPFLAGS += -DNOLOGI=1
debug release: $(DAEMON_OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $(TARGET)
install: BINDIR = $(DESTDIR)/usr/bin
install: OPTDIR = $(DESTDIR)/opt/swap/sdk
install: $(TARGET)
mkdir -p $(BINDIR)
mkdir -p $(OPTDIR)
install $(TARGET) $(DASCRIPT) -t $(BINDIR)
install -m 755 $(START_SH) $(STOP_SH) -t $(OPTDIR)
clean:
rm -f $(TARGET) $(DAEMON_OBJS)
.PHONY: all debug release clean install
|