PROBE_GRAPHICS_TARGET = swap_probe_graphics.so
PROBE_UI_TARGET = swap_probe_ui.so
PROBE_CAPI_TARGET = swap_probe_capi.so
+PROBE_SCREENSHOT_TARGET = swap_probe_screenshot.so
DUMMY_TARGET = libdaprobe.so
PARSE_ELF_LIB_TARGET = libparserelf.so
PARSE_ELF_BIN_TARGET = parse_elf
-lpthread \
-lrt \
-ldl \
- -lwayland-client \
-Wl,-z,noexecstack
ASMFLAG = -O0 -g -Werror
./probe_capi/probe_capi.c
ifeq ($(TIZEN_FEATURE_WAYLAND),y)
-UTILITY_SRCS += ./helper/dacapture.c
PROBE_EVENT_SRCS += ./probe_event/orientation.c
CFLAGS += -Wno-deprecated-declarations -Wno-unused-const-variable
CFLAGS += -DTIZEN_FEATURE_WAYLAND
CFLAGS += -I/usr/include/wayland-extension/
-TIZEN_LDFLAGS+= \
- -lscreenshooter-client \
- -lwayland-tbm-client
+
+PROBE_SCREENSHOT_SRCS = ./helper/dacapture.c
+PROBE_SCREENSHOT_OBJS = $(patsubst %.cpp,%.o, $(patsubst %.c,%.o, $(PROBE_SCREENSHOT_SRCS)))
+
+screenshot: tizen $(PROBE_SCREENSHOT_TARGET)
+
+PROBE_SCREENSHOT_LDFLAGS = \
+ -L. \
+ -lscreenshooter-client \
+ -lwayland-tbm-client \
+ -lwayland-client \
+ -l:da_probe_tizen.so
+
+$(PROBE_SCREENSHOT_TARGET): LDFLAGS+=$(PROBE_SCREENSHOT_LDFLAGS)
+$(PROBE_SCREENSHOT_TARGET): CPPFLAGS+=-DSELF_LIB_NAME="\"/$(INSTALLDIR)/$(PROBE_SCREENSHOT_TARGET)\"" -DTIZENAPP $(SWAP_PROBE_DEFS)
+$(PROBE_SCREENSHOT_TARGET): CPPFLAGS+=$(DEBUG_FLAGS)
+$(PROBE_SCREENSHOT_TARGET): $(TIZEN_TARGET) $(PROBE_SCREENSHOT_OBJS)
+ $(CC) $(LDFLAGS) $^ -o $@
+
+else
+screenshot: ;
endif # TIZEN_FEATURE_WAYLAND
DUMMY_SRCS = ./custom_chart/da_chart_dummy.c
PARSE_ELF_BIN_OBJ = $(patsubst %.c,%.o, $(PARSE_ELF_BIN_SRC))
-all: elflib tizen dummy event graphics ui capi elfparser
+all: elflib tizen dummy event graphics ui capi screenshot elfparser
tizen: headers $(TIZEN_TARGET)
dummy: headers $(DUMMY_TARGET)
elflib: $(PARSE_ELF_LIB_OBJ) $(PARSE_ELF_LIB_TARGET)
ldheader: $(SOURCE_HEADERS) $(LINKER_HEADER)
-install: install_da install_event install_graphics install_ui install_capi install_ld install_elf install_lsan
+install: install_da install_event install_graphics install_ui install_capi install_screenshot install_ld install_elf install_lsan
install_da: all
[ -d "$(DESTDIR)/$(INSTALLDIR)" ] || mkdir -p $(DESTDIR)/$(INSTALLDIR)
[ -d "$(DESTDIR)/$(INSTALLDIR)" ] || mkdir -p $(DESTDIR)/$(INSTALLDIR)
install $(PROBE_CAPI_TARGET) $(DESTDIR)/$(INSTALLDIR)/
+install_screenshot: screenshot
+ [ -d "$(DESTDIR)/$(INSTALLDIR)" ] || mkdir -p $(DESTDIR)/$(INSTALLDIR)
+ install $(PROBE_SCREENSHOT_TARGET) $(DESTDIR)/$(INSTALLDIR)/
clean:
- rm -f *.so $(TIZEN_OBJS) $(PROBE_EVENT_OBJS) $(PROBE_GRAPHICS_OBJS) $(PROBE_UI_OBJS) $(PROBE_CAPI_OBJS) $(PARSE_ELF_LIB_OBJ) $(PARSE_ELF_BIN_OBJ) $(GENERATED_HEADERS) $(API_NAME_LIST) $(SOURCE_HEADERS)
+ rm -f *.so $(TIZEN_OBJS) $(PROBE_EVENT_OBJS) $(PROBE_GRAPHICS_OBJS) $(PROBE_UI_OBJS) $(PROBE_CAPI_OBJS) $(PROBE_SCREENSHOT_OBJS) $(PARSE_ELF_LIB_OBJ) $(PARSE_ELF_BIN_OBJ) $(GENERATED_HEADERS) $(API_NAME_LIST) $(SOURCE_HEADERS)
-.PHONY: all capi tizen dummy event clean install_ld install_da install_event install_graphics install_ui install_capi install_elf install headers lsan
+.PHONY: all capi tizen dummy event clean install_ld install_da install_event install_graphics install_ui install_capi install_screenshot install_elf install headers lsan