Debian Codegraph @

exec-tool/Makefile

raw
1 INSTALL ?= install
2 PKG_CONFIG ?= pkg-config
3
4 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
5 prefix ?= /usr
6 libexecdir ?= $(prefix)/libexec
7
8 XCPPFLAGS := -DG_LOG_DOMAIN=\"lomiri-push-service-exec-tool\" $(shell pkg-config --cflags json-glib-1.0 gobject-2.0 gio-2.0 lomiri-app-launch-0)
9 XLDLIBS := $(shell pkg-config --libs json-glib-1.0 gobject-2.0 gio-2.0 lomiri-app-launch-0)
10
11 all: exec-tool exec-tool-test
12
13 check: exec-tool-test
14 env G_TEST_SRCDIR="$(CURDIR)" \
15 G_TEST_BUILDDIR="$(CURDIR)" \
16 G_DEBUG=gc-friendly \
17 MALLOC_CHECK_=2 \
18 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) \
19 ./exec-tool-test
20
21 .PHONY: all check clean install
22
23 exec-tool: CPPFLAGS += $(XCPPFLAGS)
24 exec-tool: CFLAGS += -std=c99 -pedantic -Wall -Wextra -g
25 exec-tool: LDLIBS += $(XLDLIBS)
26 exec-tool: find-helper.o
27
28 exec-tool-test: CPPFLAGS += $(XCPPFLAGS)
29 exec-tool-test: CFLAGS += -std=c99 -pedantic -Wall -Wextra -g
30 exec-tool-test: LDLIBS += $(XLDLIBS)
31 exec-tool-test: find-helper.o
32
33 install: all
34 $(INSTALL) -m0755 -D exec-tool $(DESTDIR)$(libexecdir)/lomiri-app-launch/push-helper/exec-tool
35
36 clean:
37 -rm -f exec-tool exec-tool-test *.o