File: Makefile

package info (click to toggle)
lomiri-push-service 0.100.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,912 kB
  • sloc: python: 936; ansic: 288; makefile: 96; sh: 61
file content (37 lines) | stat: -rw-r--r-- 1,195 bytes parent folder | download
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
INSTALL ?= install
PKG_CONFIG ?= pkg-config

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
prefix ?= /usr
libdir ?= $(prefix)/lib/$(DEB_HOST_MULTIARCH)

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)
XLDLIBS := $(shell pkg-config --libs json-glib-1.0 gobject-2.0 gio-2.0 lomiri-app-launch-0)

all: exec-tool exec-tool-test

check: exec-tool-test
	    env G_TEST_SRCDIR="$(CURDIR)" \
	    G_TEST_BUILDDIR="$(CURDIR)"   \
	    G_DEBUG=gc-friendly           \
	    MALLOC_CHECK_=2               \
	    MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) \
	    ./exec-tool-test

.PHONY: all check clean install

exec-tool: CPPFLAGS += $(XCPPFLAGS)
exec-tool: CFLAGS += -std=c99 -pedantic -Wall -Wextra -g
exec-tool: LDLIBS += $(XLDLIBS)
exec-tool: find-helper.o

exec-tool-test: CPPFLAGS += $(XCPPFLAGS)
exec-tool-test: CFLAGS += -std=c99 -pedantic -Wall -Wextra -g
exec-tool-test: LDLIBS += $(XLDLIBS)
exec-tool-test: find-helper.o

install: all
	$(INSTALL) -m0755 -D exec-tool $(DESTDIR)$(libdir)/lomiri-app-launch/push-helper/exec-tool

clean:
	-rm -f exec-tool exec-tool-test *.o