-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile.inc
64 lines (45 loc) · 1.48 KB
/
Makefile.inc
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
OBJDIR := $(BUILD_TYPE)-$(PLATFORM)
# ------------------------------------------------------------------
TARGET_SO := $(OBJDIR)/BrowserAdapter.so
TARGET_SO_OBJS := \
$(OBJDIR)/BrowserClientBase.o \
$(OBJDIR)/BrowserAdapter.o \
$(OBJDIR)/BrowserAdapterManager.o \
$(OBJDIR)/Rectangle.o \
$(OBJDIR)/UrlInfo.o \
$(OBJDIR)/InteractiveInfo.o \
$(OBJDIR)/ElementInfo.o \
$(OBJDIR)/ImageInfo.o \
$(OBJDIR)/JsonNPObject.o \
$(OBJDIR)/NPObjectEvent.o \
$(OBJDIR)/KineticScroller.o \
$(OBJDIR)/BrowserOffscreen.o
# ------------------------------------------------------------------
FLAGS_COMMON := -fno-exceptions -fno-rtti -fvisibility=hidden -fPIC -DXP_UNIX -DXP_WEBOS
ifeq ("$(BUILD_TYPE)", "debug")
FLAGS_OPT := -O0 -g $(FLAGS_COMMON)
#-DDEBUG
else
FLAGS_OPT := -O2 -g $(FLAGS_COMMON) -DNDEBUG
endif
INCLUDES := $(INCLUDES) \
-I. \
`pkg-config --cflags glib-2.0`
LIBS := $(LIBS) \
-lglib-2.0 \
-lrt -lpthread -lpbnjson_cpp
LOCAL_CFLAGS += $(CFLAGS) -MD -Wall -Werror $(FLAGS_OPT)
EXPORT_FLAGS = -Wl,--version-script=BrowserAdapter.exports
LOCAL_LFLAGS += $(LDFLAGS) $(EXPORT_FLAGS) $(FLAGS_OPT) $(LIBS) -Wl,--no-undefined
# ------------------------------------------------------------------
all: setup $(TARGET_SO)
setup:
@mkdir -p $(OBJDIR)
$(TARGET_SO): $(TARGET_SO_OBJS)
$(CXX) -o $(TARGET_SO) $(TARGET_SO_OBJS) $(LOCAL_LFLAGS) -shared -fPIC
vpath %.cpp
$(OBJDIR)/%.o: %.cpp
$(CXX) $(INCLUDES) $(LOCAL_CFLAGS) -c $< -o $@
clean:
rm -rf $(OBJDIR)
-include $(wildcard $(OBJDIR)/*.d)